- Clone this repo.
- Install dependencies:
npm ci
. - Run TypeScript and ESLint:
npm test
.
❯ npm test
> test
> tsc && eslint .
/Users/lydell/stuff/typescript-eslint-preact/index.tsx
1:10 error 'h' is defined but never used @typescript-eslint/no-unused-vars
1:13 error 'Fragment' is defined but never used @typescript-eslint/no-unused-vars
Expected: No errors.
Actual: No errors.
Now switch to the previous
branch. It uses @typescript-eslint 5.26.0 instead of 5.27.0.
On that branch there are no errors!
Update: You can add this to your ESLint config to make it work:
"parserOptions": {
"ecmaFeatures": {
"jsx": true
}
}
Switch to the potential-solution
branch to try it out!