Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot set svelte3/ignore-styles to true when using eslintrc.json #43

Open
radarsh opened this issue Oct 23, 2019 · 2 comments
Open

Cannot set svelte3/ignore-styles to true when using eslintrc.json #43

radarsh opened this issue Oct 23, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@radarsh
Copy link

radarsh commented Oct 23, 2019

In my project, we use the JSON config for ESLint and using it seems impossible to set svelte3/ignore-styles to true.

"settings": {
    "svelte3/ignore-styles": true
}

Gives me:

TypeError: processor_options.ignore_styles is not a function

From looking at the code, it seems that an assumption is made that svelte3/ignore-styles is always going to be a function, which clearly is impossible to specify using JSON config (eslintrc.json).

@Conduitry Conduitry added the enhancement New feature or request label Oct 23, 2019
@Conduitry
Copy link
Member

This was an intentional change in version 2. I understand that ESLint themselves are encouraging people to write CommonJS-formatted .eslintrc.js files, and requiring these to be functions is one less thing to worry about. But I can see how it would be annoying to be forced to convert to a CommonJS format just for this.

@radarsh
Copy link
Author

radarsh commented Oct 24, 2019

Thanks for clarifying that. Yes, it was an annoyance to convert from JSON to JS eslintrc but at least it was a one-off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants