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

[ESLint] Add opt-in support for dangerous autofix #18437

Merged
merged 1 commit into from
Mar 31, 2020

Conversation

gaearon
Copy link
Collaborator

@gaearon gaearon commented Mar 31, 2020

We've removed the autofix support from our ESLint rule in 2.4.0 in favor of the new Suggestions API. But some people are asking (#18235, #18099) for autofix. Some IDEs haven't updated yet. Coincidentally, FB's VS Code ESLint extension doesn't support this either. So we can't update the rule internally.

This PR adds an escape hatch. Pass { enableDangerousAutofixThisMayCauseInfiniteLoops: true } and you get the old behavior. You've been warned.

If you actually apply fix suggestions automatically, you don't want to enable this.

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 019d926:

Sandbox Source
wizardly-morning-hlqf7 Configuration

@sizebot
Copy link

sizebot commented Mar 31, 2020

Details of bundled changes.

Comparing: da54641...019d926

eslint-plugin-react-hooks

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
eslint-plugin-react-hooks.development.js +1.1% +1.3% 80.03 KB 80.89 KB 18.23 KB 18.47 KB NODE_DEV
eslint-plugin-react-hooks.production.min.js 🔺+1.3% 🔺+1.6% 21.81 KB 22.09 KB 7.34 KB 7.46 KB NODE_PROD

Size changes (stable)

Generated by 🚫 dangerJS against 019d926

@sizebot
Copy link

sizebot commented Mar 31, 2020

Details of bundled changes.

Comparing: da54641...019d926

eslint-plugin-react-hooks

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
eslint-plugin-react-hooks.development.js +1.1% +1.3% 80.04 KB 80.9 KB 18.24 KB 18.47 KB NODE_DEV
eslint-plugin-react-hooks.production.min.js 🔺+1.3% 🔺+1.6% 21.82 KB 22.1 KB 7.35 KB 7.46 KB NODE_PROD

Size changes (experimental)

Generated by 🚫 dangerJS against 019d926

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants