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

How to include hidden files in settings

Open
#930 2 comments 0 reactions 0 assignees View on GitHub
bug help wanted
Dominant language
JavaScript
Stars
5.9k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

I use neomake (vim plugin) which creates temporary files for "on the fly linking", for a normal file
`src/foo/Bar.test.js`
you get
`src/foo/.Bar.test.js@neomake_123_2.js`

I have "no-extraneous-dependencies" rule enabled like in your example (just with more paths):
```
"import/no-extraneous-dependencies": ["error", {"devDependencies": ["**/*.test.js", "**/*.spec.js"]}]
```
from https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md

How do you specify that files like "**/.*.test.js" are also ok to use dev dependencies?

I tried:
* `**/.*.test.js` doesn't exclude the files
* `**/\.*.test.js` triggers an error in eslint config parser
* `**/\\.*.test.js` doesn't exclude the files

Contributor guide

Open the contributing guide

Research direction

Start with the no-extraneous-dependencies rule documentation and its devDependencies glob configuration. Reproduce the three patterns against the example hidden filename src/foo/.Bar.test.js@neomake_123_2.js, then inspect the rule's matching behavior and configuration parsing. Done means an appropriate setting accepts the temporary file without parser errors while preserving existing matching.

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.