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

Incorporate browser compatibility data #22

Open
robatwilliams opened this issue Nov 28, 2019 · 1 comment
Open

Incorporate browser compatibility data #22

robatwilliams opened this issue Nov 28, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@robatwilliams
Copy link

Rather than banning particular ES versions or individual features, I'd like to be able to declare the browser features that are to be supported. This might be for this plugin, or some companion plugin/config that works with it.

As a starting idea...

// .eslinrc.json
{
  "plugins": ["es"],
  "extends": "plugin:es/browserslist"
}
// .browserslistrc
last 3 versions

The es/no-foo rules included in the output config would be dynamic, based on the browsers matching the browserslist spec, looked up against a compatibility database.

Leading on from:

@robatwilliams
Copy link
Author

I ended up making this myself, as a plugin which delegates to this plugin. It uses browserslist and the MDN browser compatibility data. Also made a companion CLI tool.

https://github.com/robatwilliams/es-compat

I've just released a beta version which covers ES2018 and 2019. It shouldn't be much more work to add the other ES20xx versions for a MVP. Let me know if you have any feedback.

If it turns out well, it may be worth linking to as a related tool.

Thanks for your work on this plugin - it does all the hard work so all I had to do was join everything up.

@mysticatea mysticatea added the enhancement New feature or request label Nov 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants