-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix ESLint 6 support #7513
Fix ESLint 6 support #7513
Conversation
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.
One question, if that's OK - good to merge! Thanks @ianschmitz
} catch (e) { | ||
// A config couldn't be found. | ||
} | ||
const eslintConfig = eslintCli.getConfigForFile( |
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 threw an error previously if a file wasn't found. I understand it doesn't now?
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 think I may have been getting lucky (eslint config somewhere up the file system tree perhaps?). I was seeing errors in CI so i've reverted to include the catch again.
I also observed a strange error on our PNP test that failed due to eslint-config-react-app
not being defined in package.json
. This catch block is catching that error on master
it appears.
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.
Please don't swallow the eslint config error. I think it would be better to throw the error incase the EXTEND_ESLINT
environment variable is set.
E.g. I had some issues where a plugin referenced in the eslint config was not installed. I had to manually edit this file in order to print the error...
I would prefer a solution similar to this:
You could also solve @n1ru4l's issue by only looking for a config file if The other issue with this PR is the original wanted to ensure the |
This is great work all around. Thanks everyone. I sort of wish |
Fixes #7510.
extends
is no longer available in ESLint 6.