digidem / mapeo-core-next

The upcoming version of Mapeo Core
MIT License
7 stars 1 forks source link

chore: require `default` case in `switch` statements #607

Closed EvanHahn closed 2 months ago

EvanHahn commented 2 months ago

This enables ESLint's default-case and default-case-last rules to ensure that all switch statements end with a default.

There was one spot where we weren't doing this, which I fixed.

EvanHahn commented 2 months ago

I don't think so (not 100% sure). The only thing I could find was the TypeScript noFallthroughCasesInSwitch option, which wouldn't be worsened by this.