-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
docs: Clarify usage of no-unreachable
with TypeScript
#18445
docs: Clarify usage of no-unreachable
with TypeScript
#18445
Conversation
|
Hi @benj-dobs!, thanks for the Pull Request The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.
To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page. Read more about contributing to ESLint here |
✅ Deploy Preview for docs-eslint canceled.
|
Hi @benj-dobs!, thanks for the Pull Request The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.
To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page. Read more about contributing to ESLint here |
no-unreachable
with TypeScript
375289f
to
c3335d6
Compare
c3335d6
to
d48fc4a
Compare
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.
LGTM, thanks!
Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
[x] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:
Closes: #18378
What changes did you make? (Give an overview)
I've updated the documentation for
no-unreachable
to clarify that TypeScript will only consider unreachable code an error if configured to do so.I checked whether there are any differences in behaviour between TypeScript an ESLint. The only one I found was in this case:
ESLint reports this
catch
block as unreachable, but TypeScript does not. I did not think this was worth documenting.Is there anything you'd like reviewers to focus on?
I've included a link to the TypeScript documentation; let me know if you would prefer not to have it.