问题
Is there an elegant way to tell ESLint to ensure that we're not using any ES6 / EMCAScript 2015 syntax / functions?
I've found the following answer somewhat helpful but it seems that it doesn't take care of everything (e.g. I don't see how to catch the usage of Object.assign()): How to disable usage of certain ES2015 features with ESLint 2?
回答1:
eslint-plugin-es5 is the package dedicated to your use case. For example the rule es5/no-es6-static-methods
forbids the usage of Object.assign
.
来源:https://stackoverflow.com/questions/37013985/is-there-an-elegant-way-to-tell-eslint-to-ensure-that-were-not-using-any-es6-sy