Skip to content

Conversation

@bershanskiy
Copy link
Contributor

@bershanskiy bershanskiy commented Jun 14, 2022

Summary

Enable noFallthroughCasesInSwitch. I find it easier to just use this rule than insert a break; or a comment // fall through in every case. Also, this particular case of fall-through just happens to be easier to read without a fall-through. Also, note that it's possible to disable this rule on a line-per-line basis via a special comment.

Set allowUnreachableCode to false to make TS compiler error out on dead code.

Test results and supporting details

N/A

Related issues

N/A

@github-actions github-actions bot added the linter Issues or pull requests regarding the tests / linter of the JSON files. label Jun 14, 2022
@bershanskiy bershanskiy changed the title TSConfig: enable noFallthroughCasesInSwitch rule TSConfig: noFallthroughCasesInSwitch, allowUnreachableCode Jun 14, 2022
Copy link
Contributor

@queengooborg queengooborg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good to me, thanks!

@queengooborg queengooborg merged commit 48e2afc into mdn:main Jun 17, 2022
@bershanskiy bershanskiy deleted the tsconfig-noFallthroughCasesInSwitch branch June 18, 2022 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

linter Issues or pull requests regarding the tests / linter of the JSON files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants