johnpapa / angular-styleguide

Angular Style Guide: A starting point for Angular development teams to provide consistency through good practices.
http://johnpapa.net
MIT License
23.84k stars 4.15k forks source link

jshint: why using "esversion": 6? (and below "esnext": false). #822

Open DarthVanger opened 7 years ago

DarthVanger commented 7 years ago

Why do you have "esversion": 6 in jshint config? I guess usually we use Angular 1 with es5? If someone wants es6 he can easily change that, but I was coding in es5 and didn't expect that jshint had esversion: 6 in the config I copied from here.

On the following lines of jshint config there is also "esnext": false, which makes things even more confusing, since this option is supposed to disallow es6 features?

gucu112 commented 6 years ago

I have disabled the "esnext" option and everything is working fine for me, no errors.

By the way, I am using angularJS with es6 and babel so unfortunately you can't assume that Angular 1 is used with es5 always ;)

However you're right that the "esnext": false, should be removed from example config file if I understood you correctly.