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] Support .eslintignore in project root

See original GitHub issue

Is your proposal related to a problem?

ESLint is trying to lint some pre-built files that I dropped into my src directory, but it’s finding “errors”, and causing the build to fail.

Describe the solution you’d like

I want to be able to drop a .eslintignore file in my create-react-app root and have it Just Work ™️.

Describe alternatives you’ve considered

I tried using the EXTENDS_ESLINT env variable and overriding specific rules in my custom src/.eslintrc.js, but overriding each rule one at a time, but it’s easy to miss some. I really just don’t want ESLint even trying to lint the file at all.

Additional context

I’m working on a new version of React Router and it’d be nice if people could just drop react-router.production.js into their src directory and see everything work w/out having to worry about ESLint failing. Google Closure Compiler does some interesting things to our built code that ESLint complains about.

I already submitted #8063 which fixes the main issue, but it’d be nice to just disable ESLint completely on any given file, like you’d be able to in a normal ESLint project.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ianschmitzcommented, Dec 4, 2019

No problem! Our plan is to make this the default behavior in v4 where it will just work as you say, but for v3 we made it an opt in.

1reaction
miraagecommented, Dec 4, 2019

@mjackson I believe there is a typo in the environment variable.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ignoring Code - ESLint - Pluggable JavaScript Linter
You can tell ESLint to ignore specific files and directories by creating a .eslintignore file in your project's root directory. The .eslintignore file...
Read more >
How do I configure eslint to ignore my root folder and to only ...
You can tell ESLint to ignore specific files and directories using ignorePatterns in your config files. ignorePatterns patterns follow the same ...
Read more >
ESLint | WebStorm Documentation - JetBrains
eslintrc.* is found in the current file folder, WebStorm will look for one in its parent folders up to the project root. If...
Read more >
eslintignore is ignored by Visual Studio
Visual Studio integrated ESLint does not respect .eslintignore paths. ... files that are located in the project root will be recognized by ESLint...
Read more >
How to use ESLint with TypeScript | Khalil Stemmler
ESLint is a JavaScript linter that you can use to lint either ... In this post, we'll walk through how to set up...
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