import-js / import-js/eslint-plugin-import
How to include hidden files in settings
- 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
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