import-js / import-js/eslint-plugin-import

import/ignore does not handle symlinked path?

Open
#1,765 5 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5.9k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

My project creates a symlink called `app` that links to a directory in our monorepo to allow for easier module imports. Unfortunately, this seems to trip the `import/no-extraneous-dependencies` rule.

I want to ignore this rule on any line that imports from `app/**`.

I have added the following to our eslintrc.js:

```
settings: {
"import/ignore": [0, [
/.*app.*/
]],
}
```

Maybe I am missing something about how this setting works, but it is not disabling these warnings.

Contributor guide

Open the contributing guide

Research direction

Start by tracing how the import/ignore setting is read by the import/no-extraneous-dependencies rule, then reproduce the symlinked app/** case described in the issue. Confirm how the configured pattern is matched and verify that the intended imports no longer produce warnings.

Written by the indexing model from the issue text.

Assessment

Tech stack
eslint, javascript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.