question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

import/no-relative-parent-imports report incorrectly in 2.20.1

See original GitHub issue

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',
]

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:6
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
akphicommented, Feb 23, 2020

@ljharb seems like the problem still show up on Windows 😦

2reactions
akphicommented, Feb 18, 2020

ah, that codebase is on a remote machine 😄. I will spend some time try to setup a repo and test this out later

Read more comments on GitHub >

github_iconTop Results From Across the Web

import/no-relative-parent-imports report incorrectly in 2.20.1
In version 2.20.1, I start to get errors like: Relative imports from parent directories are not allowed. Please either pass what ... for ......
Read more >
eslint-plugin-import/no-relative-parent-imports rule recognizes ...
I'm trying to figure out why does ESlint refuses to accept path aliasing as absolute paths. Below there's an error message of the...
Read more >
eslint-plugin-import | Yarn - Package Manager
This plugin intends to support linting of ES2015+ (ES6+) import/export syntax, and prevent issues with misspelling of file paths and import names.
Read more >
git-fast-import Documentation - Git
In git-fast-import this means that the paths are relative to the ... fast-import does not lock the branch or tag refs it is...
Read more >
git-fast-import(1) — git-man — Debian buster
In git-fast-import this means that the paths are relative to the ... fast-import does not lock the branch or tag refs it is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found