4 ms·
We use a linter (jshintrc) and we put a .jshintrc with the configs we agree on our team on every project. We work a lot with opensource projects and you need t
by jfroma 12y ago
We use a linter (jshintrc) and we put a .jshintrc with the configs we agree on our team on every project.
We work a lot with opensource projects and you need to respect the project style. Since some of our stuff was created from other things, we can't even keep the same jshintrc configuration for all our things.
I use SublimeLinter [1] in Sublime. It shows me the errors in an integrated fashion.
Once the project has some maturity it is better to not change the rules because you don't want to waste a lot of time changing stupid things like double quotes to single quotes.
If I see 150 errors in a file, it is likely that I will introduce the 151, and it usually means that your jshintrc is a fantasy. If I see less than 5 errors I will fix them all and use git blame to know who introduce these bugs and kindly recommend using an integrated linter with the editor.
I don't think is good idea to run a linter like this on any kind of CI. If someone breaks something serious the test suite will fail anyway, and if is not so serious why wasting time fixing it. I think is definitely better an easier to educate your team to use some plugin on their editor.
[1]: https://github.com/SublimeLinter/SublimeLinter-for-ST2 https://github.com/SublimeLinter/SublimeLinter-for-ST2