Brackets-InteractiveLinter
Brackets-InteractiveLinter copied to clipboard
Update ESLint to use .eslintrc.js
On the ESLint site they say that .eslintrc
is deprecated and that we should use one of the following in that order:
-
.eslintrc.js
-
.eslintrc.yaml
-
.eslintrc.yml
-
.eslintrc.json
- .
eslintrc
(deprecated) -
package.json
I could just update the eslint's settings.json to one of those, but that did not seem to work well for me. Is there a way to update the Interactive Linter to look for one of those files?
Ah ok. Yeah, it is about time we updated eslint... Would you be interested in submitting a PR to update ESLint and the config?
I could, but it is not working. That is why I submit an issue and not just a PR 😄
I guess I could submit a PR with the eslint.js only... Is that what you are thinking of?
When I updated the settings.json file to look for .eslintrc.js
I started getting errors, but it worked with .eslintrc
i would submit a PR just to update ESLint... We can tackle the other problem separately.
But why is your .eslintrc
a .eslintrc.js
and not a .eslintrc.json
?
ESLint supposed to look for .eslintrc.js
first and also I like single quotes better 😃
Currently, i only support JSON. Which means that you really cant use single quotes; it has to be valid JSON :/
Also, I know this isn't obvious at all. But I run an independent version of ESLint in a worker thread. So ESLint does not really load the configuration files itself when you are working with Interactive Linter. This is one of the reasons I was saying in the other thread why I need to rethink this whole thing. :)
Right, and that is why I created the issue. It would be nice if there is a way to allow for an array of settingsFiles. I do not know if that is achievable.
Again, I do not know much about how the brackets extensions work so I am only suggesting how it could be improved but have no idea how to do it :)
right. I completely missed that's what you were saying. sorry about that!
fair enough. it is a great suggestion. moving to running the native eslint will allow us to specify eslint configurations in whichever way you want. That's ultimately what we probably should do.