11 comments

[ 3.7 ms ] story [ 53.2 ms ] thread
Been using eslint for a while now, it truly is great. Using it with the airbnb javascript conf for react development often catches stupid style mistakes and helps my team keep in the same style.
Once you are over the initial hurdle of creating a config file, which is sort of like picking words you like while browsing a dictionary, ESLint is a great replacement for the JSHint and JSCS combination - much more compact and less finicky.

Here's a simple .eslintrc that hits pretty much all the high points and syntax conventions that people fight over, while leaving the things that most people agree on as the standard defaults:

https://www.exratione.com/2015/07/eslint-as-a-replacement-fo...

Recommended! My team uses eslint with the "Standard" style, no more arguments about how a for-loop should be written. http://standardjs.com/
Might be worth noting that despite the name, feross/standard uses a very controversial and non-standard style. Notably, it enforces no semicolons.

There's nothing wrong with that as a style, but it's certainly not any sort of standard.

Edit: The airbnb style guide I linked in my other comment is probably a lot closer to what most people would think of as a "standard" config. Not better per se, just more common.

Yes, it's in quotes and capitalized for a reason. I did not pick the name.

About the style itself, it very closely matches what we were doing anyway, before it came along. Semicolons are dumb.

ESLint is pretty awesome - the project has a great team and always adding new functionality (cache and then parallel linting sound great)!

Although it isn't unique for all the features listed, as JSCS has the same things: an autoconfigure feature, built-in (as well as user created) presets/configs, multiple formatters, custom plugins/rules, custom parsers (esprima/espree/babel), autofixing of almost all rules. Hopefully both projects can benefit or integrate better together more in the future? (I contribute to both!)

I think autofixing for all rules (maybe with https://github.com/cst/cst) would be a nice goal for the future when thinking about the next-generation of linters. Making it easier to update configs when new rules/options are added would be nice as well.

speaking of config, keep in mind that eslint comes with easy configurator to get going: `eslint --init`