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.

ESLint doesn't respect the .eslintignore and hangs on the last step

See original GitHub issue

Tell us about your environment

  • Node version: v10.18.0
  • npm version: v6.13.4
  • Local ESLint version: v6.8.0

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

babel-eslint and for ts, tsx files @typescript-eslint/parser

Please show your full configuration:

I created a small project to demonstrate the issue.

https://github.com/lipis/eslint-ts-bug

Just clone it, run yarn and then yarn test.

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

When I run yarn test it also parses the lib directory, which is ignored inside the .eslintignore… why is that?

yarn test

# the actual command
# eslint --ignore-path .gitignore --ext .js,.ts,.tsx . --debug

What did you expect to happen?

To ignore the lib directory and finish the task.

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

Doesn’t ignore the lib and hangs in the end.

Are you willing to submit a pull request to fix this bug?

No 😦

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
kaicataldocommented, Jan 15, 2020

ESLint only ignores /node_modules/* and /bower_components/* by default. Feel free to make an RFC if you’d like to propose a change!

0reactions
lipiscommented, Jan 14, 2020

Does ESLint ignore the files in .gitignore by default?

what I did to solve my problem is to add the ignore list inside the eslint.json file with the additional patterns that are not part of .gitignore

I think the idea would be for ESLint to ignore .gitignore by default as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ignoring Code - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
How to disable ESLint in vue-cli? - Stack Overflow
I know I can opt out of ESLint during the initialization phase, but how can I disable it after my project has been...
Read more >
ESLint - npm
An AST-based pattern checker for JavaScript.. Latest version: 8.30.0, last published: 12 days ago. Start using eslint in your project by ...
Read more >
eslint | Yarn - Package Manager
ESLint is a tool for identifying and reporting on patterns found in ECMAScript/JavaScript code. In many ways, it is similar to JSLint and...
Read more >
Enforcing Consistent Code in Expo React Native Projects
Improve your team's code quality and efficiency by using ESLint, ... need to add an .eslintignore file to ensure our linter doesn't go...
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