News for hackers. Stuff that matters.
Re:ESLint – The pluggable linting utility for JavaScript by hippich on Friday February 13, 2015 @10:59AM (#9044965)
Also, I keep repeating myself, but make sure to check http://ternjs.net
Re:ESLint – The pluggable linting utility for JavaScript by Techbrunch on Friday February 13, 2015 @11:46AM (#9045215)
The is an atom plugin available: https://github.com/artoale/atom-tern
Re:ESLint – The pluggable linting utility for JavaScript by skrebbel on Friday February 13, 2015 @11:21AM (#9045085)
wow, that looks pretty awesome. any experiences here on HN on using Ternjs for production work?
Re:ESLint – The pluggable linting utility for JavaScript by hippich on Friday February 13, 2015 @11:44AM (#9045208)
i am using it with VIM while code. It is helper, so I don't see anything that would prevent you from using it while code. If you thought about incorporating it into deploy process - i don't have that kind of experience.
Re:ESLint – The pluggable linting utility for JavaScript by hippich on Friday February 13, 2015 @10:58AM (#9044953)
Can't give any practical example, but i find eslint more pleasant to use to the point where i am using for any new project. Also, it comes with many useful rules out of the box, like one, which make sure you take care of `err` in callback.
Re:ESLint – The pluggable linting utility for JavaScript by nailer on Friday February 13, 2015 @07:08AM (#9043924)
Anyone familiar with eslint want to give a practical comparison of eslint and jshint?
Re:ESLint – The pluggable linting utility for JavaScript by antouank on Friday February 13, 2015 @07:23AM (#9043959)
I'm using ESLint for all my projects for the last year. I find it much easier to customize ( you can write your own rules ) And because it uses the Esprima parser, it's easier to integrate other things like JSX or ES6.

Check out an older intro by Zakas http://www.nczonline.net/blog/2013/07/16/introducing-eslint/

( Also I think it's a bit faster than JSHint/JSLint ).

Re:ESLint – The pluggable linting utility for JavaScript by jstayton on Friday February 13, 2015 @08:51AM (#9044255)
There's a section in the README about speed: https://github.com/eslint/eslint#how-does-eslint-performance...

"ESLint is slower than JSHint, usually 2-3x slower on a single file. This is because ESLint uses Espree to construct an AST before it can evaluate your code whereas JSHint evaluates your code as it's being parsed. The speed is also based on the number of rules you enable; the more rules you enable, the slower the process.

Despite being slower, we believe that ESLint is fast enough to replace JSHint without causing significant pain."

Re:ESLint – The pluggable linting utility for JavaScript by mmgutz on Friday February 13, 2015 @12:14PM (#9045413)
I do javascript full stack and use eslint + vim for many hours/day. I don't notice the slowness. It may be one of those benchmarks that doesn't translate to real world productivity. Eslint has more rules than JSHint, easier to configure (errors display the rule name) and more accurate.

The real competition is JSCS.

Re:ESLint – The pluggable linting utility for JavaScript by antouank on Friday February 13, 2015 @09:15AM (#9044370)
Oh, I see, thanks for pointing it out. Still, speed is not such an important factor for using a linter. I prefer being able to have custom rules and up-to-date stuff like ES6 and JSX.
Re:ESLint – The pluggable linting utility for JavaScript by orkj on Friday February 13, 2015 @10:31AM (#9044797)
Here is my favorite part: When it complains about something, it also shows the configuration option to turn it off inline or globally, instead of you having to look it up on the website. One example is that it expects double quotes by default, which I personally do not prefer.

Also, there are some other more style related rules that does not exist in jshint. Like requiring `typeof variable` over `typeof(variable)`.

Lastly, their webpage does a great job in explaining each rule, why they put it in there and what you can expect if you ignore them.

Just off the top of my head, that is.

Re:ESLint – The pluggable linting utility for JavaScript by nailer on Friday February 13, 2015 @11:21AM (#9045082)
That's excellent. jslinterrors.com does this for jslint - but that's a lot slower than reading good command line output in the first place.
Re:ESLint – The pluggable linting utility for JavaScript by bytasv on Friday February 13, 2015 @08:17AM (#9044124)
I'm also using it but only on a side project. The primary reason for choosing ESLint over the other two is ability to create your own rules.

I think that whatever style rule You set you should be able to add rule for that or else nobody will care about it.

Talking about other two: - JSLint - is too restricted (heard many calling it too Crockfordish) in many cases and You don't have much control on how one should write code - JSHint is much like JSLint but with a much more options to customise how You want to write Your code

Re:ESLint – The pluggable linting utility for JavaScript by TheAceOfHearts on Friday February 13, 2015 @09:42AM (#9044520)
ES6 support doesn't seem complete yet, otherwise I'd totally be using it! I tried using it with 6to5 this past weekend, but espree is still missing some features. They've been moving really quickly, though! Relevant issue: https://github.com/eslint/espree/issues/10
Re:ESLint – The pluggable linting utility for JavaScript by brendanib on Friday February 13, 2015 @11:50AM (#9045245)
I've been using this for a few months now and it's amazing. They're moving crazy fast to support ES6 features, and the interface for writing a new rule is great.