Conversation
mrmckeb
left a comment
There was a problem hiding this comment.
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.
This threw an error previously if a file wasn't found. I understand it doesn't now?
There was a problem hiding this comment.
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.
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.
extendsis no longer available in ESLint 6.