Skip to content

RFC: Support for eslint-plugin-compat #1345

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

Open
amilajack opened this issue Jan 4, 2017 · 14 comments
Open

RFC: Support for eslint-plugin-compat #1345

amilajack opened this issue Jan 4, 2017 · 14 comments

Comments

@amilajack
Copy link

amilajack commented Jan 4, 2017

Recently I've been working on an eslint plugin called eslint-plugin-compat that lints support for API's by using the caniuse db. It seems there is demand from the community for this plugin. Wonder if it has a place in create-react-app. Would a PR for it be welcome?

Here's a demo of it in action

demo of plugin usage

Also planning to add integration with babel-preset-env and browserlist

@gaearon
Copy link
Contributor

gaearon commented Feb 11, 2017

That's pretty cool. Let's take another look at this after #1249.

@amilajack
Copy link
Author

amilajack commented Feb 11, 2017

Great! This actually works with the browserslist config in the package.json 🎉

https://github.com/amilajack/eslint-plugin-compat-demo/blob/master/package.json#L9

@gaearon gaearon added this to the 2.0.0 milestone Jan 8, 2018
@gaearon
Copy link
Contributor

gaearon commented Jan 20, 2018

Do you want to send a PR for this?

@amilajack
Copy link
Author

Sure! I don't know how CRA internals work. Which .eslintrc should I change?

@amilajack
Copy link
Author

amilajack commented Jan 20, 2018

Thanks. I'll start working on this

@Timer
Copy link
Contributor

Timer commented Jan 22, 2018

How would polyfills work in something like CRA? Excited to see your PR.

@stereobooster
Copy link
Contributor

There is also https://github.com/ismay/stylelint-no-unsupported-browser-features

@Timer Timer modified the milestones: 2.0.x, 2.x Sep 26, 2018
@Timer Timer removed this from the 2.x milestone Nov 2, 2018
@ackvf
Copy link

ackvf commented Apr 5, 2019

Is there a way how to use this with create-react-app 2.0 nowadays?

@morsdyce
Copy link

Is this being worked on? Can I open a PR for this?

@amilajack
Copy link
Author

amilajack commented May 20, 2020

I wanted to wait to implement better polyfill and babel interoperability to the plugin before making a PR for this. I'll respond here again once I've implemented it.

@amilajack
Copy link
Author

How would polyfills work in something like CRA? Excited to see your PR.

It detects if you're using babel or TS and if you are, it assumes all ES APIs are polyfilled and lints only WebAPIs

@amilajack
Copy link
Author

I wanted to wait to implement better polyfill and babel interoperability to the plugin before making a PR for this. I'll respond here again once I've implemented it.

@morsdyce The plugin should be good to implement now!

@jakobvase
Copy link

@gaearon You last wrote on this 2 years ago. Would you still accept a PR for this? Or is CRA headed in another direction?

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

No branches or pull requests

7 participants