Open seahindeniz opened 2 hours ago
🤦🏻 I think found a solution:
compat.plugins('import', '@stylistic', '@cspell', 'es')
compat.config({
extends: ['plugin:es/restrict-to-es2019']
})
This wasn't documented anywhere, so it is kind of confusing, actually. I wish the plugin parser could work respectively to /
delimited plugins
Use the maintained fork of the plugin instead: https://github.com/eslint-community/eslint-plugin-es-x
🤦🏻 I think found a solution:
compat.plugins('import', '@stylistic', '@cspell', 'es') compat.config({ extends: ['plugin:es/restrict-to-es2019'] }) This wasn't documented anywhere, so it is kind of confusing, actually. I wish the plugin parser could work respectively to
/
delimited plugins
That's correct. 'plugin:es/restrict-to-es2019'
is a config specifier. As stated in the plugin's docs, it should be used in extends
in eslintrc config files, thus with compat.extends()
in eslint.config.js files.
I prepared a PR to update the docs with an example: https://github.com/eslint/eslintrc/pull/173
Hi, I'm trying to use https://eslint-plugin-es.mysticatea.dev/ in a project and I'm not sure how to implement it. The problem is, library suggests to use
es/restrict-to-es2019
as pluginand when I do, ESLint throws the following error