Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch-exhaustiveness-check config mismatch? #83

Open
fregante opened this issue Feb 24, 2024 · 3 comments
Open

switch-exhaustiveness-check config mismatch? #83

fregante opened this issue Feb 24, 2024 · 3 comments

Comments

@fregante
Copy link
Member

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/eslint-plugin@44.0.0
│ ├── @typescript-eslint/eslint-plugin@6.10.0
│ └─┬ eslint-plugin-jest@27.6.0
│   └── @typescript-eslint/eslint-plugin@6.10.0 deduped
└─┬ eslint-config-pixiebrix@0.36.0
  ├── @typescript-eslint/eslint-plugin@7.0.2
  └─┬ eslint-config-xo-typescript@3.0.0
    └── @typescript-eslint/eslint-plugin@6.10.0 deduped invalid: ">=7.0.2" from node_modules/eslint-config-xo-typescript
@fregante
Copy link
Member Author

I resolved with this in the project's package.json (not the config)

  "overrides": {
    "@typescript-eslint/eslint-plugin": "7.0.2"
  },

@fregante
Copy link
Member Author

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

@fregante fregante closed this as not planned Won't fix, can't repro, duplicate, stale Feb 24, 2024
@fregante
Copy link
Member Author

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):

  1. add override
  2. install
  3. remove override

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant