MiguelCastillo / Brackets-InteractiveLinter

Interactive linting for Brackets
Other
119 stars 26 forks source link

Update ESLint to use .eslintrc.js #177

Open rvarbanov opened 8 years ago

rvarbanov commented 8 years ago

On the ESLint site they say that .eslintrc is deprecated and that we should use one of the following in that order:

  1. .eslintrc.js
  2. .eslintrc.yaml
  3. .eslintrc.yml
  4. .eslintrc.json
  5. .eslintrc (deprecated)
  6. 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?

MiguelCastillo commented 8 years ago

Ah ok. Yeah, it is about time we updated eslint... Would you be interested in submitting a PR to update ESLint and the config?

rvarbanov commented 8 years ago

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

MiguelCastillo commented 8 years ago

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?

rvarbanov commented 8 years ago

ESLint supposed to look for .eslintrc.js first and also I like single quotes better 😃

MiguelCastillo commented 8 years ago

Currently, i only support JSON. Which means that you really cant use single quotes; it has to be valid JSON :/

MiguelCastillo commented 8 years ago

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. :)

rvarbanov commented 8 years ago

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 :)

MiguelCastillo commented 8 years ago

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.