-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
Description
Describe the bug
This must be related to [email protected], eslint issue and this issue
After installing svelte and run pnpm update && pnpm lint, it outputs the following:
> [email protected] lint /Users/shinichiokada/Downloads/svelte/svelte-lint-problem
> prettier --check . && eslint .
Checking formatting...
All matched files use Prettier code style!
Oops! Something went wrong! :(
ESLint: 9.15.0
TypeError: Error while loading rule '@typescript-eslint/no-unused-expressions': Cannot read properties of undefined (reading 'allowShortCircuit')
Occurred while linting /Users/shinichiokada/Downloads/svelte/svelte-lint-problem/e2e/demo.test.ts
at Object.create (/Users/shinichiokada/Downloads/svelte/svelte-lint-problem/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/rules/no-unused-expressions.js:75:13)
at create (/Users/shinichiokada/Downloads/svelte/svelte-lint-problem/node_modules/.pnpm/@[email protected]_@[email protected][email protected]_jiti@1_b7xo6eoa5ndkcprsdlxo2rbzx4/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-expressions.js:28:32)
at Object.create (/Users/shinichiokada/Downloads/svelte/svelte-lint-problem/node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.js:31:20)
at createRuleListeners (/Users/shinichiokada/Downloads/svelte/svelte-lint-problem/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/linter/linter.js:944:21)
at /Users/shinichiokada/Downloads/svelte/svelte-lint-problem/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/linter/linter.js:1082:84
at Array.forEach (<anonymous>)
at runRules (/Users/shinichiokada/Downloads/svelte/svelte-lint-problem/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/linter/linter.js:1013:34)
at #flatVerifyWithoutProcessors (/Users/shinichiokada/Downloads/svelte/svelte-lint-problem/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/linter/linter.js:1911:31)
at Linter._verifyWithFlatConfigArrayAndWithoutProcessors (/Users/shinichiokada/Downloads/svelte/svelte-lint-problem/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/linter/linter.js:1993:49)
at Linter._verifyWithFlatConfigArray (/Users/shinichiokada/Downloads/svelte/svelte-lint-problem/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/linter/linter.js:2082:21)
ELIFECYCLE Command failed with exit code 2.
Reproduction
npx sv create svelte-lint-problem
pnpm update
pnpm lint
Solution
I just need to install [email protected].
pnpm i -D [email protected]
Logs
No response
System Info
System:
OS: macOS 15.1
CPU: (10) arm64 Apple M2 Pro
Memory: 302.03 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.16.0 - ~/.nvm/versions/node/v20.16.0/bin/node
npm: 10.8.1 - ~/.nvm/versions/node/v20.16.0/bin/npm
pnpm: 9.13.2 - /opt/homebrew/bin/pnpm
bun: 1.1.8 - ~/.bun/bin/bun
Browsers:
Chrome: 131.0.6778.70
Edge: 131.0.2903.51
Safari: 18.1
npmPackages:
svelte: ^5.0.0 => 5.2.2Severity
annoyance