sarbbottam / eslint-find-rules

Find built-in ESLint rules you don't have in your custom config
http://npm.im/eslint-find-rules
MIT License
201 stars 33 forks source link

chore: add .editorconfig file #313

Open chrisblossom opened 4 years ago

chrisblossom commented 4 years ago

Noticed my default use of tabs were formatting things incorrectly. This will fix that for any future contributors.

I think I added the project's settings correctly.

chrisblossom commented 4 years ago

FYI these checks are failing because mocha is timing out before the test has a chance to pass. Should not happen anymore if #305 gets merged.

hildjj commented 4 months ago

https://github.com/phanect/eslint-plugin-editorconfig is more maintained than eclint (he said about a 5 year old PR. :) )

ljharb commented 4 months ago

interesting - why would their rules conflict with the eslint core rules tho? the whole point is to have eslint be the source of truth, and just to ensure that editorconfig matches that.

hildjj commented 4 months ago

Think of it as their rules are used instead of the corresponding eslint rules. In my perfect world, the core eslint rules would set their defaults from .editorconfig, but I apparently don't want it enough to send them a PR.

ljharb commented 4 months ago

@hildjj agreed, but lacking that, all i want is a way to verify that editorconfig doesn't conflict with my eslint settings - editorconfig isn't the source of truth, eslint is. This seems to be more like, making editorconfig PLUS eslint config the source of truth.

hildjj commented 4 months ago

Nod, that's reasonable. Maybe a thing that runs through each file in the directory, matches the .editorconfig globs and eslint globs for each, and checks that the rules match. Doing it the "correct" way without enumerating the files would certainly be faster, but much more difficult to get correct, I bet.

I'm willing to write some code and make sure editorconfig-core-js has the needed APIs, as long as it only has to support eslint flat configs.

ljharb commented 4 months ago

Unfortunately flat config is still nonviable for many configurations, so it's not particularly interesting if it doesn't support eslintrc.