import-js/eslint-plugin-import

How to include hidden files in settings

Open

#930 opened on Sep 18, 2017

 (2 comments) (0 reactions) (0 assignees)JavaScript (1,549 forks)batch import
bughelp wanted

Repository metrics

Stars
 (5,940 stars)
PR merge metrics
 (Avg merge 138d 22h) (3 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