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 have searched for related issues and found none that matched my issue.
- I have read the FAQ and my problem is not listed.
Issue Description
I use Preact and have this in my tsconfig.json:
"jsx": "react",
"jsxFactory": "h",
"jsxFragmentFactory": "Fragment"
I use it like so:
import { h, Fragment } from "preact";
export default function MyComponent() {
return <><h1>Hello, world!</h1></>;
}
It used to result in no errors. With version 5.27.0, it reports h
and Fragment
as unused.
I’ve searched through the issue tracker, and also in TypeScript’s and Preact’s issue trackers, but couldn’t find anything. I apologize if I missed something, or this is a misunderstanding on my side that just happened to work before!
Reproduction Repository Link
https://github.com/lydell/typescript-eslint-preact-issue
Repro Steps
- clone the repo
npm ci
npm test
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
5.27.0 |
@typescript-eslint/parser |
5.27.0 |
TypeScript |
4.7.3 |
ESLint |
8.17.0 |
node |
18.1.0 |