Gatsby's .eslintignore being ignored
See original GitHub issueGatsby version: 0.12.45
Hi, I noticed that npm test
on master fails due to some linting problems in interfaces
folder, however this folder is actually specified in .eslintignore
. But because linting is configured with --ignore-path .gitignore
in package.json
, .eslintignore
is ignored in favour of .gitignore
.
{
"scripts": {
"lint": "eslint --ext .js,.jsx --ignore-path .gitignore ."
}
}
From ESLint docs:
Keep in mind that specifying
--ignore-path
means that any existing.eslintignore
file will not be used.
Short of copying the contents of .gitignore
into .eslintignore
, I’m not sure what the best way to combine .eslintignore
and .gitignore
is.
You can scroll to the bottom of this recent build log to see the exact error
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Using ESLint - Gatsby
ESLint is an open source JavaScript linting utility. Code linting is a type of static analysis that is frequently used to find problematic...
Read more >Ignoring ESLint - next.config.js
Ignoring ESLint. When ESLint is detected in your project, Next.js fails your production build ( next build ) when errors are present.
Read more >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 >Migrating from TSLint to ESLint on Gatsby | by E.Y. - Medium
The whole migration process is split into three parts: ... In this case, you might want to add eslint ignore . After clearing...
Read more >"parserOptions.project" has been set for @typescript-eslint ...
... to lint the file that is mentioned in the error (e.g. babel.config.js ), you can ignore it adding its name to the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Heh, our brain waves connected!
So it turns out you can add multiple
--ignore-path
! https://github.com/gatsbyjs/gatsby/commit/bd068fde91dedb74fa0e863a9000900c50fce61e 😃https://travis-ci.org/gatsbyjs/gatsby/builds/224775750
Thanks for doing the background research on this!