do not ignore files started with `.` by default
See original GitHub issueThe version of ESLint you are using.
master
The problem you want to solve.
eslint ingore .eslintrc.js
by default, so I have to add a file .eslintignore
, then add !.eslintrc.js
in.
Your take on the correct solution to problem.
do not ignore file/dir beginning with a dot by default, except for .
and ..
(not sure .git
can be exception)
In some cases ignoring is a good idea, while ingoring all .*
files seems an overkill.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:11
- Comments:25 (22 by maintainers)
Top Results From Across the Web
Why is .gitignore not ignoring my files? - Stack Overflow
The easiest, most thorough way to do this is to remove and cache all files in the repository, then add them all back....
Read more >ls: long listing format but ignore files starting with dot
Save this question. Show activity on this post. The default behaviour of the ls command is to ignore files starting with dot, but...
Read more >gitignore Documentation - Git
A gitignore file specifies intentionally untracked files that Git should ignore. Files already tracked by Git are not affected; see the NOTES below...
Read more >.gitignore file - ignoring files in Git | Atlassian Git Tutorial
Ignored files are tracked in a special file named .gitignore that is checked in at the root of your repository. There is no...
Read more >Ignoring Files | Tower Help - Tower Git Client
By default, ignored files are not displayed in the file listings in your Working Copy, anymore. In case you should ever need to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s better to blacklist, rather than whitelist, dotfiles from being linted.
People can tell right away when something undesired is being linted; and it’s intuitive and easy to add it to their ESLint ignore config. The other way around is a hassle.
For example, if you want to lint dotfiles such as
.babelrc
you not only have to un-ignore the dotfiles, but re-ignorenode_modules
afterwards, otherwise any dotfiles innode_modules
would get linted too 😓https://github.com/jaydenseric/graphql-react/blob/v8.1.1/package.json#L108
It’s weird that you use an ignore list to un-ignore things.
Heaps of tools use cosmiconfig for config files, so there are hundreds of variations of
.examplerc
and.examplerc.js
out in the wild. Supporting just one (.babelrc
) and leaving a major learning curve and inconvenience for all the others is not ideal.My case is VuePress (I have written some documentation of my OSS with VuePress). I write many
*.js
and*.vue
files in.vuepress
directory, but ESLint ignores those by default. Plus, I want to check.eslintrc.js
as well.I feel odd if I have to use
.eslintignore
to not ignore files. I feel good if I have to use.eslintignore
to ignore files.