简体   繁体   中英

Is there an elegant way to tell eslint to ensure that we're not using any ES6 syntax / functions?

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 (eg I don't see how to catch the usage of Object.assign()): How to disable usage of certain ES2015 features with ESLint 2?

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM