-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable .eslintignore with extend flag (#7562)
- Loading branch information
Showing
1 changed file
with
1 addition
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6f5221c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're having difficulty getting this to work, could a quick example file be provided, please?
Currently, we've tried injecting env variables in the command line and with a .env file:
and we have a
.eslintignore
file in the root dir with a few potential paths:And does this commit allow us to actually extend the .eslint config/rules or does it just allow us to ignore files? Currently attempting to migrate from react-scripts-ts and not being able to customize eslint is a difficult surprise
6f5221c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not work and it is not ok that problems with a linter cause so much trouble.
6f5221c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For what it's worth, I was able to use it by adding these files to my project root (with react-scripts 3.3.0):
.env
:.eslintignore
:6f5221c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a bit more information here: https://create-react-app.dev/docs/setting-up-your-editor/#experimental-extending-the-eslint-config
6f5221c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got it working, had to restart the
npm start
both after the change in.env
(as usual) and after adding the.eslintignore
. I'm runningreact-scripts@3.3.0
FWIW.