I have some files that will be handled with Babel and therefore are written in ES6. However, I also have some files that will not go through Babel and there fore should be in ES5 in the same project. Can I configure Eslint so it would throw errors, if I accidentally use some ES6 features (e.g. arrow functions, destructuring) in those files?
I've noticed, that setting "parserOptions": {"ecmaVersion": 5}
doesn't provide desirable effect as well as setting "env": {"es6": false}
.
As it finally turned out, the problem was in shareable config that I used (xo). In that config ecmaVersion
was set to 6, and ESLint doesn't support override for ecmaVersion
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With