question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

do not ignore files started with `.` by default

See original GitHub issue

The 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:closed
  • Created 5 years ago
  • Reactions:11
  • Comments:25 (22 by maintainers)

github_iconTop GitHub Comments

8reactions
jaydensericcommented, Mar 1, 2019

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-ignore node_modules afterwards, otherwise any dotfiles in node_modules would get linted too 😓

https://github.com/jaydenseric/graphql-react/blob/v8.1.1/package.json#L108

{
  "eslintIgnore": ["!.*", "node_modules"]
}

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.

6reactions
mysticateacommented, Jun 23, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found