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.

Seems broken be working with eslint-plugin-import@2.20.1

See original GitHub issue

eslint-import-resolver-alias works fine with eslint-plugin-import 2.18.2, after update to the latest 2.20.1, all of the aliases won’t find anymore.

The eslintrc is - https://github.com/Tencent/Hippy/blob/master/.eslintrc.js#L82

Hippy on  chore/update-dependencies [$!] via ⬢ v12.16.1 took 2s 
➜ npm ls eslint-plugin-import eslint-import-resolver-alias
hippy@ /Users/xqkuang/Projects/github/Hippy
├── eslint-import-resolver-alias@1.1.2 
└── eslint-plugin-import@2.20.1 


Hippy on  chore/update-dependencies [$!] via ⬢ v12.16.1 took 2s 
➜ npm run lint

> hippy@ lint /Users/xqkuang/Projects/github/Hippy
> eslint "packages/**/*.@(js|ts|tsx)" "examples/hippy-react-demo/**/*.@(js|jsx)"


/Users/xqkuang/Projects/github/Hippy/packages/hippy-vue/src/elements/index.js
  1:1  error  'shared' should be listed in the project's dependencies. Run 'npm i -S shared' to add it  import/no-extraneous-dependencies

/Users/xqkuang/Projects/github/Hippy/packages/hippy-vue/src/renderer/native/event/emitter.js
  5:1  error  'shared' should be listed in the project's dependencies. Run 'npm i -S shared' to add it  import/no-extraneous-dependencies

/Users/xqkuang/Projects/github/Hippy/packages/hippy-vue/src/runtime/index.js
   5:1  error  'core' should be listed in the project's dependencies. Run 'npm i -S core' to add it      import/no-extraneous-dependencies
   6:1  error  'core' should be listed in the project's dependencies. Run 'npm i -S core' to add it      import/no-extraneous-dependencies
   7:1  error  'shared' should be listed in the project's dependencies. Run 'npm i -S shared' to add it  import/no-extraneous-dependencies
   8:1  error  'core' should be listed in the project's dependencies. Run 'npm i -S core' to add it      import/no-extraneous-dependencies
   9:1  error  'web' should be listed in the project's dependencies. Run 'npm i -S web' to add it        import/no-extraneous-dependencies
  10:1  error  'core' should be listed in the project's dependencies. Run 'npm i -S core' to add it      import/no-extraneous-dependencies
  16:1  error  'shared' should be listed in the project's dependencies. Run 'npm i -S shared' to add it  import/no-extraneous-dependencies
....

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:28
  • Comments:5

github_iconTop GitHub Comments

11reactions
noppacommented, Aug 18, 2021

As a tip to @fengerzh and anyone who’s blocked by this - I switched to eslint-import-resolver-custom-alias, which works fine at least for my needs

4reactions
fengerzhcommented, Aug 18, 2021

Yes! Everyone who come to this page, you can replace your plugin to eslint-import-resolver-custom-alias. Thanks, @noppa !

Read more comments on GitHub >

github_iconTop Results From Across the Web

[import/order] Regression in 2.20.1 · Issue #1643 - GitHub
Installed 2.20.1, started getting ordering errors like the following; ... Rolling back eslint-plugin-import to 2.20.0 resolves the issue.
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 >
Migrating to v7.0.0 - ESLint - Pluggable JavaScript Linter
This guide is intended to walk you through the breaking changes. ... ESLint resolved all plugins from the current working directory by default....
Read more >
Code Quality report fails when ESLint is set up (with plugins ...
I use a .eslintrc.js generated by ESLint, which looks as follows (most ... and Remove eslint plugin from codeclimate.yml if they do not...
Read more >
Failed to load plugin 'import' declared in '... » eslint-config ...
js This can happen for a couple of reasons: - The plugin name is spelled incorrectly in an ESLint configuration file (e.g. .eslintrc)....
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