Commit ee51091
feat(eslint-plugin): [switch-exhaustiveness-check] add an option to warn against a
* feat: switch-exhaustiveness-check checks for dangerous default case
* fix: spelling
* fix: comment
* fix: docs
* feat: allowDefaultCase option
* fix: tests
* fix: lint
* fix: prettier
* refactor: finish merge
* fix: format
* fix: lint
* chore: update docs
* chore: update docs
* chore: format
* fix: test
* fix: tests
* fix: tests
* fix: tests
* fix: test
* fix: test
* fix: tests
* Update packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts
Co-authored-by: Josh Goldberg ✨ <git@joshuakgoldberg.com>
* fix: double options in docs
* Update packages/eslint-plugin/docs/rules/switch-exhaustiveness-check.md
Co-authored-by: Josh Goldberg ✨ <git@joshuakgoldberg.com>
* feat: simplify code flow
* Update packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts
Co-authored-by: Josh Goldberg ✨ <git@joshuakgoldberg.com>
* fix: grammar
* Update packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts
Co-authored-by: Josh Goldberg ✨ <git@joshuakgoldberg.com>
* fix: wording on option
* Update packages/eslint-plugin/docs/rules/switch-exhaustiveness-check.md
Co-authored-by: Josh Goldberg ✨ <git@joshuakgoldberg.com>
* docs: add playground link
* Update packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts
Co-authored-by: Josh Goldberg ✨ <git@joshuakgoldberg.com>
* chore: add punctuation
* Update packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts
Co-authored-by: Josh Goldberg ✨ <git@joshuakgoldberg.com>
* chore: remove comment
* refactor: rename option
* fix: prettier
* fix: lint
* fix: tests
* refactor: better metadata
* fix: tests
* refactor: rename interface
* refactor: make interface readonly
---------
Co-authored-by: Josh Goldberg ✨ <git@joshuakgoldberg.com>default case on an already exhaustive switch (typescript-eslint#7539)1 parent e70c19a commit ee51091
File tree
4 files changed
+259
-100
lines changed- packages/eslint-plugin
- docs/rules
- src/rules
- tests
- rules
- schema-snapshots
4 files changed
+259
-100
lines changedLines changed: 41 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
15 | 54 | | |
16 | 55 | | |
17 | 56 | | |
| |||
181 | 220 | | |
182 | 221 | | |
183 | 222 | | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | 223 | | |
206 | 224 | | |
207 | 225 | | |
0 commit comments