4 ms·
ESLint: A Next-Generation JavaScript Linter
- Tankenstein 11y agoBeen 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.
- exratione 11y agoOnce 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-for-jshint-and-jscs/ https://www.exratione.com/2015/07/eslint-as-a-replacement-fo...
- Lazare 11y agoESLint is a very solid tool. As others have noted, you do need to find a good config, but the airbnb JS style guide comes with a very, very good one: https://github.com/airbnb/javascript https://github.com/airbnb/javascript
- lhnz 11y agoESLint is nice but it's a pain to setup. A lot of people are beginning to use standard linters built on top of it like `semistandard` [0] . [0] https://github.com/Flet/semistandard https://github.com/Flet/semistandard
- draw_down 11y agoRecommended! My team uses eslint with the "Standard" style, no more arguments about how a for-loop should be written. http://standardjs.com/ http://standardjs.com/
- Lazare 11y agoMight 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.
- draw_down 11y agoYes, 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.
- SerpentJoe 11y agoESLint combined with Babel for syntax highlighting has made my life so much nicer. https://medium.com/@dan_abramov/lint-like-it-s-2015-6987d44c5b48 https://medium.com/@dan_abramov/lint-like-it-s-2015-6987d44c...
- eltaco 11y agoESLint 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 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.
- deadprogram 11y agoWe switched Cylon.js (https://github.com/hybridgroup/cylon/ https://github.com/hybridgroup/cylon/) to use ESLint a few months back. Great tool!
- hippich 11y agospeaking of config, keep in mind that eslint comes with easy configurator to get going: `eslint --init`