eslint-config-xo-typescript
eslint-config-xo-typescript copied to clipboard
`switch-exhaustiveness-check` config mismatch?
Error: .eslintrc.js » eslint-config-pixiebrix » eslint-config-xo-typescript:
Configuration for rule "@typescript-eslint/switch-exhaustiveness-check" is invalid:
Value [{"allowDefaultCaseForExhaustiveSwitch":false,"requireDefaultForNonUnion":true}] should NOT have more than 0 items.
I have the latest dependencies in eslint-config-pixiebrix and I'm seeing this issue, but I don't understand why. The peer deps are not being resolved correctly according to npm:
❯ npm ls @typescript-eslint/eslint-plugin
npm ERR! code ELSPROBLEMS
├─┬ @shopify/[email protected]
│ ├── @typescript-eslint/[email protected]
│ └─┬ [email protected]
│ └── @typescript-eslint/[email protected] deduped
└─┬ [email protected]
├── @typescript-eslint/[email protected]
└─┬ [email protected]
└── @typescript-eslint/[email protected] deduped invalid: ">=7.0.2" from node_modules/eslint-config-xo-typescript
I resolved with this in the project's package.json (not the config)
"overrides": {
"@typescript-eslint/eslint-plugin": "7.0.2"
},
It started resolving correctly after mocking around 🤷♂️ I had already npm rm eslint-config-pixiebrix && npm I eslint-config-pixiebrix to no-avail
Mysteries of npm
Reopening since this still happens. It had disappeared because this sequence updates the lockfile, fixing the issue (presumably until a future update of the lockfile):
- add
override - install
- remove
override