Closed
Description
Before You File a Proposal Please Confirm You Have Done The Following...
- I have searched for related issues and found none that match my proposal.
- I have read the FAQ and my problem is not listed.
Description
I followed the official instructions, but still stumbled upon this ESL rule enabled by default
Impacted Configurations
recommended
Additional Info
eslint.config.mjs
:
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
);
tsconfig.json
:
{
"compilerOptions": {
"target": "ES2023",
"skipLibCheck": true
},
"exclude": [ "node_modules" ]
}
package.json
:
{
"name": "tsesl-min-repro",
"version": "0.0.0",
"main": "main.js",
"devDependencies": {
"@eslint/js": "^9.13.0",
"@types/eslint__js": "^8.42.3",
"eslint": "^9.13.0",
"typescript": "^5.6.3",
"typescript-eslint": "^8.12.1"
}
}
main.ts
:
class c { }
c = null
npx eslint .
:
/home/rudxain/tsesl-min-repro/main.ts
2:1 error 'c' is a class no-class-assign
2:1 error 'c' is assigned a value but never used @typescript-eslint/no-unused-vars
✖ 2 problems (2 errors, 0 warnings)
npx tsc --noEmit
:
main.ts(2,1): error TS2629: Cannot assign to 'c' because it is a class.