-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
Add ESLint rule playground #14609
Add ESLint rule playground #14609
Conversation
I don't think this seems to be working for me. Maybe I'm misunderstanding something? When I modify the But I've opened the |
Did you open |
Ah, that would be it then. I assumed you could open the full react project (since you would also be editing the rule). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it works for me now 👍
I'm also a Sublime user. I only fired up and tested Code because of your readme:
|
I figured most our users are on Code so we should probably test in that in general. Autofix support is nice too. |
* Add ESLint rule playground * Update index.js * Update index.js
* Add ESLint rule playground * Update index.js * Update index.js
I found it rather annoying to iterate on our lint rules. Www/Nuclide has been too slow, and tests, while nice, make it too cumbersome to experiment with one particular use case, or just explore how the rule "feels" in practice.
This adds a "playground" fixture that lets you edit a file in an editor like VSCode and have any changes to rule source be reflected immediately on recheck. I had to make a hacky "proxy" rule for that to work because Node would cache the actual rule normally. The resulting workflow is pretty nice and I want to check this in — it'll definitely be useful to me but maybe to someone else too.
Obligatory gif: