Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node/no-missing-import false positive on chalk v5 #314

Open
coderaiser opened this issue Jan 7, 2022 · 5 comments
Open

node/no-missing-import false positive on chalk v5 #314

coderaiser opened this issue Jan 7, 2022 · 5 comments

Comments

@coderaiser
Copy link

Looks like the thing is chalk v5 uses export instead of main.

@regseb
Copy link

regseb commented Mar 5, 2022

There is the same problem with the import/no-unresolved rule (import-js/eslint-plugin-import#2132 / import-js/eslint-plugin-import#1810):

/home/regseb/testcase/index.js
  1:19  error  Unable to resolve path to module 'chalk'  import/no-unresolved
  1:19  error  "chalk" is not found                      node/no-missing-import

@hildjj
Copy link

hildjj commented Jan 15, 2023

Ava is also having this issue.

@hildjj
Copy link

hildjj commented Jan 15, 2023

This is related to this issue in resolve.

@CvBlixen
Copy link

CvBlixen commented Feb 4, 2023

It seems got also has this issue.

At least for me. 🤔

image

For now I will just ignore linting that import. (See below.) No biggie, for now. 😌

Part of my .eslintrc.json:

{
  "rules": {
    "import/no-unresolved": ["error", { "ignore": ["got"] }],
    "node/no-missing-import": ["error", { "allowModules": ["got"] }]
  }
}

Note that node/no-missing-import also seems to be affected ... 🤔

@voxpelli
Copy link

eslint-plugin-n is the maintained version of this module.

We switched to it in eg. eslint-config-standard / standard and it is maintained by me and other members of the official ESLint community organization.

Try that module out and if it isn't fixed there, then open a new issue in that project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants