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.

eslintignore ! not working. (exclude)

See original GitHub issue

Using eslint 2.5.1

my .eslintignore file is:

node_modules
app/assets/javascripts
!app/assets/javascripts/pickAnyFolder

This doesn’t work. It ignores pickAnyFolder. I can’t seem to use the ! syntax at all with ‘conflicting rules’.

Is this a known issue (I can’t seem to find it)

so I have to do:

node_modules
app/assets/javascripts/folder1
...
app/assets/javascripts/foldern

basically… and then just not include a specific directory in the ignore. Pain!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
zirhocommented, Sep 12, 2016

To exclude nested folders, something like this works.

public/js/* !public/js/webpack public/js/webpack/* !public/js/webpack/src

0reactions
albertocommented, Mar 31, 2016

@IanVS According to the git docs it should, but I tested on my machine (git 2.6.2) and it didn’t work either. Maybe the docs are wrong?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ignoring Code - ESLint - Pluggable JavaScript Linter
When ESLint is run, it looks in the current working directory to find a .eslintignore file before determining which files to lint. If...
Read more >
eslintignore file not working - Stack Overflow
eslintignore file may need to be placed at the root of the workspace folder, in order to be recognized by the vscode plugin....
Read more >
eslintignore is ignored by Visual Studio
Visual Studio integrated ESLint does not respect .eslintignore paths. Only way to exclude files from linting is putting them in "bower_components" folder.
Read more >
Ignoring Code - Prettier
Use .prettierignore to ignore (i.e. not reformat) certain files and folders completely. Use “prettier-ignore” comments to ignore parts of files.
Read more >
.eslintignore - mozsearch - Searchfox
Exclude mozilla directory, this one is checked separately. mozilla/**. # These directories don't contain any js and are not meant to. config/**.
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