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

Don't lint against Hooks after conditional throw #14040

Merged
merged 1 commit into from Oct 31, 2018

Conversation

@sophiebits
Copy link
Collaborator

@sophiebits sophiebits commented Oct 30, 2018

Seems like this should be OK. Fixes #14038.

Now when tracking paths, we completely ignore segments that end in a throw.

@sophiebits sophiebits requested review from gaearon and acdlite Oct 30, 2018
@sophiebits sophiebits force-pushed the sophiebits:throw-before-hook branch from b38a292 to 8c39ca3 Oct 30, 2018
Copy link
Member

@acdlite acdlite left a comment

Seems fine, with the caveat that I don't know much about ESLint plugins

@sophiebits
Copy link
Collaborator Author

@sophiebits sophiebits commented Oct 30, 2018

It's possible that thrownSegments can help me? I don't know.

@sizebot
Copy link

@sizebot sizebot commented Oct 30, 2018

Details of bundled changes.

Comparing: 169f935...fcd4703

scheduler

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
scheduler.development.js n/a n/a 0 B 19.17 KB 0 B 5.74 KB UMD_DEV
scheduler.production.min.js n/a n/a 0 B 3.16 KB 0 B 1.53 KB UMD_PROD

Generated by 🚫 dangerJS

Seems like this should be OK. Fixes #14038.

Now when tracking paths, we completely ignore segments that end in a throw. In https://eslint.org/docs/developer-guide/code-path-analysis I don't see a way to detect throws other than manually tracking them, so that's what I've done.
@sophiebits sophiebits force-pushed the sophiebits:throw-before-hook branch from 8c39ca3 to fcd4703 Oct 31, 2018
@sophiebits sophiebits merged commit 3db8b80 into facebook:master Oct 31, 2018
1 check was pending
1 check was pending
ci/circleci CircleCI is running your tests
Details
jetoneza added a commit to jetoneza/react that referenced this pull request Jan 23, 2019
Seems like this should be OK. Fixes facebook#14038.

Now when tracking paths, we completely ignore segments that end in a throw.
This was referenced Sep 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants