Reputation: 515
Is it possible to make ESLint warn/error when it encounters usage of globals that are known to not exist in environment set in config, and assuming there are no polyfills?
E.g. usage of Object.values
or Object.assign
in ES5 env.
Upvotes: 1
Views: 32
Reputation: 4542
If you're targeting the browser, try eslint-plugin-compat. If you're using Node.js, eslint-plugin-node's no-unsupported-features rule will handle this.
Upvotes: 1