antfu / eslint-config

Anthony's ESLint config preset
https://eslint-config.antfu.me/
MIT License
3.81k stars 426 forks source link

feat(typescript): add `ts/switch-exhaustiveness-check` rule #508

Closed ryoppippi closed 3 months ago

ryoppippi commented 3 months ago

This commit adds the 'ts/switch-exhaustiveness-check' rule to the TypeScript configuration. This rule helps ensure that all possible cases in a switch statement are handled. https://typescript-eslint.io/rules/switch-exhaustiveness-check Without this PR, it causes an error like below:


Error: Error while loading rule 'ts/switch-exhaustiveness-check': You have used a rule which requires parserServices to be generated. You must therefore provide a value for the "parserOptions.project" property for @typescript-eslint/parser.
Parser: undefined
Note: detected a parser other than @typescript-eslint/parser. Make sure the parser is configured to forward "parserOptions.project" to @typescript-eslint/parser.```
netlify[bot] commented 3 months ago

Deploy Preview for melodious-froyo-4871f8 ready!

Name Link
Latest commit 5838e891cf3acf8f27c17f3d866c5b56d57bbf7a
Latest deploy log https://app.netlify.com/sites/melodious-froyo-4871f8/deploys/667217498b59f000080f6bea
Deploy Preview https://deploy-preview-508--melodious-froyo-4871f8.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.