Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Bug: 5.27.0 regression: @typescript-eslint/no-unused-vars wrongly reports the jsxFactory set in tsconfig.json #5153

Closed
Labels
accepting prsGo ahead, send a pull request that resolves this issuebugSomething isn't workinggood first issueGood for newcomerspackage: parserIssues related to @typescript-eslint/parser
@lydell

Description

@lydell

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

  1. clone the repo
  2. npm ci
  3. npm test

Versions

packageversion
@typescript-eslint/eslint-plugin5.27.0
@typescript-eslint/parser5.27.0
TypeScript4.7.3
ESLint8.17.0
node18.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuebugSomething isn't workinggood first issueGood for newcomerspackage: parserIssues related to @typescript-eslint/parser

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp