Before You File a Bug Report Please Confirm You Have Done The Following...
Issue Description
When I have a dependency on
"@types/jest": "^29.5.14",
then I get the following error:
TypeError: Cannot read properties of undefined (reading 'checkFlags')
Occurred while linting /Users/stephen.carter/temp/typescript_eslint_bug/test/dummy.test.ts:5
Rule: "@typescript-eslint/prefer-readonly-parameter-types"
at isTransientSymbolLinksFlagSet (/Users/stephen.carter/temp/typescript_eslint_bug/node_modules/ts-api-utils/lib/index.cjs:143:26)
at isInConstContext (/Users/stephen.carter/temp/typescript_eslint_bug/node_modules/ts-api-utils/lib/index.cjs:994:16)
at /Users/stephen.carter/temp/typescript_eslint_bug/node_modules/ts-api-utils/lib/index.cjs:1088:464
at Array.some (<anonymous>)
at symbolHasReadonlyDeclaration (/Users/stephen.carter/temp/typescript_eslint_bug/node_modules/ts-api-utils/lib/index.cjs:1087:145)
at /Users/stephen.carter/temp/typescript_eslint_bug/node_modules/ts-api-utils/lib/index.cjs:1172:5
at Array.some (<anonymous>)
at isReadonlyPropertyIntersection (/Users/stephen.carter/temp/typescript_eslint_bug/node_modules/ts-api-utils/lib/index.cjs:1154:23)
at Object.isPropertyReadonlyInType (/Users/stephen.carter/temp/typescript_eslint_bug/node_modules/ts-api-utils/lib/index.cjs:1059:41)
at isTypeReadonlyObject (/Users/stephen.carter/temp/typescript_eslint_bug/node_modules/@typescript-eslint/type-utils/dist/isTypeReadonly.js:138:25)
If I remove this dependency then I don't get the error.
Specifically in my jest test file it doesn't seem to like parameters in my describe calls.
I'm not sure if the @typescript-eslint/prefer-readonly-parameter-types rule has a bug or there is a conflict or what. But it took me forever to reduce my project down to this super small reproduction steps.
Reproduction Repository Link
https://github.com/stephen-carter-at-sf/typescript_eslint_bug
Repro Steps
- clone the repo
npm install
npx eslint test/dummy.test.ts
Versions
"@types/jest": "^29.5.14",
"jest": "^29.7.0",
"@eslint/js": "^9.28.0",
"eslint": "^9.28.0",
"typescript": "^5.8.3",
"typescript-eslint": "^8.33.1"
Before You File a Bug Report Please Confirm You Have Done The Following...
Issue Description
When I have a dependency on
"@types/jest": "^29.5.14",
then I get the following error:
If I remove this dependency then I don't get the error.
Specifically in my jest test file it doesn't seem to like parameters in my describe calls.
I'm not sure if the
@typescript-eslint/prefer-readonly-parameter-typesrule has a bug or there is a conflict or what. But it took me forever to reduce my project down to this super small reproduction steps.Reproduction Repository Link
https://github.com/stephen-carter-at-sf/typescript_eslint_bug
Repro Steps
npm installnpx eslint test/dummy.test.tsVersions