import-js / import-js/eslint-plugin-import
Resolve .jsx? to .tsx? and force the .jsx? extensions
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 5.9k
- Forks
- 1.5k
- PR merge metrics
- No merged PRs in 30d
Description
Hello!
Thank you for this great library!
However, I can't really figure out how to configure it in ESM TypeScript React project.
I would like the ESLint to report (and autofix) missing .js and .jsx extensions, however, it forces me to use the .ts(x) extensions instead.
In other words I want:
import { Component } from './component' to be corrected to
import { Component } from './component.jsx'
import { util } from './util' to be corrected to
import { util } from './util.js'
import { Component } from './component.tsx' and
import { util } from './util.ts'
should raise error.
Thanks!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no specific file, test, or rule entry point; start by locating the ESLint configuration and extension-resolution logic involved in import autofixes. Reproduce the listed JavaScript and TypeScript import examples, then verify that missing .js/.jsx extensions are autofixed while .ts/.tsx extensions are reported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- eslint, javascript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100