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.
Issue Description
A strange case - when runningnpm run lint
onthis sample repo, theno-misused-spread
rule crashes with the following error:
Oops! Something went wrong! :(ESLint: 9.19.0TypeError: Cannot read properties of undefined (reading '0')Occurred while linting /Users/benj-dobs/Documents/tseslint-repro/index.tsx:6Rule: "@typescript-eslint/no-misused-spread" at Object.getWellKnownSymbolPropertyOfType (/Users/benj-dobs/Documents/tseslint-repro/node_modules/ts-api-utils/lib/index.cjs:919:72) at /Users/benj-dobs/Documents/tseslint-repro/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-spread.js:156:30 at Array.some (<anonymous>) at isIterable (/Users/benj-dobs/Documents/tseslint-repro/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-spread.js:156:10) at checkObjectSpread (/Users/benj-dobs/Documents/tseslint-repro/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-spread.js:122:17) at ruleErrorHandler (/Users/benj-dobs/Documents/tseslint-repro/node_modules/eslint/lib/linter/linter.js:1160:48) at /Users/benj-dobs/Documents/tseslint-repro/node_modules/eslint/lib/linter/safe-emitter.js:45:58 at Array.forEach (<anonymous>) at Object.emit (/Users/benj-dobs/Documents/tseslint-repro/node_modules/eslint/lib/linter/safe-emitter.js:45:38) at NodeEventGenerator.applySelector (/Users/benj-dobs/Documents/tseslint-repro/node_modules/eslint/lib/linter/node-event-generator.js:297:26)
There seems to be something about theStyleSystemObject
type that causes the rule to crash. I haven't been able to reproduce this with simple types.
Reproduction Repository Link
https://github.com/benj-dobs/tseslint-repro
Repro Steps
- clone the repo
npm install
npm run lint
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin | 8.22.0 |
@typescript-eslint/parser | 8.22.0 |
@typescript-eslint/scope-manager | 8.22.0 |
@typescript-eslint/typescript-estree | 8.22.0 |
@typescript-eslint/type-utils | 8.22.0 |
@typescript-eslint/utils | 8.22.0 |
TypeScript | 5.7.3 |
ESLint | 9.19.0 |
node | 22.13.1 |
Also reproduced with node 20.16.0