Skip to content

Bug: n/no-missing-imports doesn't work correctly for workspace modules #184

@JeremyLoy

Description

@JeremyLoy

Environment

Node version: 20
yarn version: 4
ESLint version: 8.56
eslint-plugin-n version: 16.6.2
Operating System: MacOS

What rule do you want to report?

no-missing-imports

Link to Minimal Reproducible Example

https://github.com/JeremyLoy/hidden-module-import-issue-example/tree/main

What did you expect to happen?

In this monorepo using yarn workspaces, I have a local package named @myorg/math. It is encapsulating an implementation, and only exposing one module via it's package.json exports property.

All imports from this package are getting reported as missing by eslint-plugin-n, when only the private module implementation.js should be getting reported as missing. See the test file for comments.

Participation

  • I am willing to submit a pull request for this issue.

Additional comments

I'm willing to help contribute if you point me in the correct direction!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions