-
-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Report for features that are not available for the provided engines range #43
Comments
yes, we had a rule no-unsupported-features/es-builtins for such purpose. But it has not been updated to check the new added es features. related: #34 |
Is there any workaround for this? Or, any other way? |
under the ground, it used eslint-plugin-es to do so. but it's no longer actively maintained. A workaround is to use its maintained fork: https://www.npmjs.com/package/eslint-plugin-es-x |
Thank you for the refs. IMHO, this only targets for |
This comment was marked as outdated.
This comment was marked as outdated.
We need to go through and update lib/rules/no-unsupported-features/es-syntax.js |
Description
I have a node-check repository here at repo-link. The project is using NodeJS
>=8.0.0 <=14.20.0
properly configured at theengines
inside thepackage.json
file.What I want to achieve
Now, sometimes we may accidentally add NodeJS code that is not supported in the specified range but available with the latest versions, like while using
replaceAll
with strings. It is only introduced in v15, so if the range does not include15.x.x
, the code will break.Can
eslint-plugin-node
help me in this case? Can we configure this package to report for such issues?Demonstration of the Problem
Here is a Github workflow demonstrating the case: https://github.com/kiranparajuli589/node-check/runs/7738971827?check_suite_focus=true
Here I've used
plugin:n/recommend
in the extends section, but the linter does not report anything :(The text was updated successfully, but these errors were encountered: