import-js / import-js/eslint-plugin-import
import/no-relative-parent-imports report incorrectly in 2.20.1
Open
Nobody has claimed this yet.
bug
help wanted
typescript
- Dominant language
- JavaScript
- Stars
- 5.9k
- Forks
- 1.5k
- PR merge metrics
- No merged PRs in 30d
Description
In version 2.20.1, I start to get errors like:
Relative imports from parent directories are not allowed. Please either pass what ...
for
import React from 'react';
The problem did not occur in 2.20.0.
I use eslint-typescript but since this used to work in 2.20.0 I doubt that this has anything to do with that.
My .eslintrc.js looks like this
parser: '@typescript-eslint/parser',
parserOptions: {
project: path.resolve(__dirname, './tsconfig.json')
},
plugins: [
'react',
'react-hooks'
],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescripts',
]
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
Reproduce the report with eslint-plugin-import 2.20.1 and 2.20.0 using the supplied .eslintrc.js and the React import example. Trace the import/no-relative-parent-imports rule and its version change; done means the valid package import no longer produces this false error while genuine parent-directory imports remain reported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- eslint, javascript
- Domain
- devtools, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100