Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Closed
Description
Before You File a Bug Report Please Confirm You Have Done The Following...
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I havesearched for related issues and found none that matched my issue.
- I haveread the FAQ and my problem is not listed.
Playground Link
Run the fixer and you'll notice the issue
Repro Code
enumA{B=1,'C-2'=2,[`D-3`]=3,[`E- 4`]=4,}declareconsta:Aswitch(a){caseA.B:{thrownewError('Not implemented yet: A.B case')}}
ESLint Config
module.exports={parser:"@typescript-eslint/parser",rules:{"@typescript-eslint/switch-exhaustiveness-check":["error"],},};
tsconfig
No response
Expected Result
Probably this?
switch(a){caseA.B:{thrownewError('Not implemented yet: A.B case')}caseA['C-2']:{thrownewError('Not implemented yet: A[\'C-2\'] case')}caseA['D-3']:{thrownewError('Not implemented yet: A[\'D-3\'] case')}caseA[`E- 4`]:{thrownewError('Not implemented yet: A[`E-4`]case')}}
Actual Result
switch(a){caseA.B:{thrownewError('Not implemented yet: A.B case')}caseA['C-2']:{thrownewError('Not implemented yet: A['C-2'] case')}caseA['D-3']:{thrownewError('Not implemented yet: A['D-3'] case')}caseA['E-4']:{thrownewError('Not implemented yet: A['E-4'] case')}}
Additional Info
No response