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
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";exportdefaultfunctionMyComponent(){return<><h1>Hello, world!</h1></>;}
It used to result in no errors. With version 5.27.0, it reportsh andFragment 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 cinpm 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 |