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.

Symlinks to ignored files should be ignored

See original GitHub issue

Tell us about your environment

  • ESLint Version: 4.14.0
  • Node Version: 9.3.0
  • npm Version: 5.5.1

What parser (default, Babel-ESLint, etc.) are you using?

babel-eslint

What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.

My files are stored in an src/ directory and compiled into dist/ and I use symlinks to expose some files:

dist/
src/
  |- index.js
  -- bar.js 
bar.js --> dist/bar.js

I only want to lint files in src/, not the ones output by Babel.

.gitignore:

/dist/

Command line used to run ESLint:

eslint --ignore-path .gitignore .

What did you expect to happen?

I expect ignored files to not be analyzed.

What actually happened? Please include the actual, raw output from ESLint.

ESLint finds errors in my symlink.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
not-an-aardvarkcommented, Dec 29, 2017

It seems like the question is whether we decide to ignore files based on the path which is provided by the user (current behavior), or whether we decide to ignore files based on the realpaths of the files provided by the user (requested behavior).

Personally, the current behavior seems more expected to me. If a symlink exists in a directory I’m linting, I would expect ESLint to follow that symlink and lint whatever it finds, regardless of where the realpath of the file exists.

0reactions
eslint-deprecated[bot]commented, Dec 11, 2018

Unfortunately, it looks like there wasn’t enough interest from the team or community to implement this change. While we wish we’d be able to accommodate everyone’s requests, we do need to prioritize. We’ve found that issues failing to reach accepted status after 21 days tend to never be accepted, and as such, we close those issues. This doesn’t mean the idea isn’t interesting or useful, just that it’s not something the team can commit to.

Thanks for contributing to ESLint and we appreciate your understanding.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Telling git to ignore symlinks - Stack Overflow
This seems to be a better idea find . -type l | sed -e s'/^\.\///g' >> .gitignore. Find outputs a "./" prefix for...
Read more >
gitignore Documentation - Git
DESCRIPTION. A gitignore file specifies intentionally untracked files that Git should ignore. Files already tracked by Git are not affected; see the NOTES ......
Read more >
gitignore not being honored when using SymLinks
gitignore file but they will never be ignored, making it impossible for me to use Visual Studio to commit my changes as it...
Read more >
gitignore - Specifies intentionally untracked files to ignore
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 >
How to skip symlinks when using git stash - Super User
Ignore symlinks. Add all symbolic links to your .gitignore : ... Other useful commands can also be found in this link.
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