Skip to content
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

Review and incorporate from eslint-plugin-es-x #36

Open
brettz9 opened this issue Aug 3, 2024 · 3 comments
Open

Review and incorporate from eslint-plugin-es-x #36

brettz9 opened this issue Aug 3, 2024 · 3 comments

Comments

@brettz9
Copy link
Collaborator

brettz9 commented Aug 3, 2024

eslint-plugin-es-x is an ESLint community project which tracks ES features (some polyfillable and some not) and lets one selectively disable them.

It appears they have some rules this project should probably include, e.g., https://eslint-community.github.io/eslint-plugin-es-x/rules/no-regexp-unicode-property-escapes-2023.html or https://eslint-community.github.io/eslint-plugin-es-x/rules/no-private-in.html

I don't know if you'd think it better for maintenance to just incorporate their rules in a config-like fashion, or adopt from their MIT-licensed source code.

@keithamus
Copy link
Owner

I'd be happy either way, but it seems like there's a high level of duplication between eslint-plugin-es, eslint-plugin-es-x and this plugin. We should endevour to simplify the ecosystem, so I'd be happy to see some of the featureset of this plugin contributed to eslint-plugin-es-x and deprecate this plugin or something.

Either way, I've invited you to maintain this project so please feel free to take decisions you feel are best.

@brettz9
Copy link
Collaborator Author

brettz9 commented Aug 4, 2024

Thanks. I've also since noticed (and hadn't before) that eslint-plugin-compat has its own lintAllEsApis setting, which is rather interesting as I see it is getting its data (including this data) from two large sources of browser support information, MDN and caniuse.com, through the packages of https://www.npmjs.com/package/ast-metadata-inferer (which gets it from https://www.npmjs.com/package/@mdn/browser-compat-data ) and https://www.npmjs.com/package/caniuse-lite (which gets it from https://www.npmjs.com/package/caniuse-db ).

I don't see any expression of intention for eslint-plugin-es-x to work with browserslist detection, so I imagine there may remain a need for at least one of the two compatibility plugins. I'm also not sure whether the "experimental" inclusion of ES data in eslint-plugin-compat means that the sources are limited in the information they provide. So there may remain a need for both plugins unless the metadata sources are maintained with all this information. But would be worth looking into. (My plate is kind of full atm, but wanted to explore the landscape a little.)

If the metadata from eslint-plugin-compat is lacking, I think this plugin ought to expand its scope a little beyond the items which can't be polyfilled to include ES-only features which can be polyfilled (e.g., globalThis support detection). This should ensure that no feature detection type falls through the cracks.

@keithamus
Copy link
Owner

I think that sounds reasonable. Happy to review any PRs or discuss any issues but I won’t have much time for development.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants