-
-
Notifications
You must be signed in to change notification settings - Fork 171
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
Improve errors handling in config resolution #90
Comments
Ah yes! Happy to accept a pull request to make that better 👍 |
I'm dealing this too, makes me wonder if the quick fix is to run eslint first for code quality and let it error out if the config is bad, then run What's the suggested behavior/API for this? It will ignore eslint and go on with prettier by itself UNLESS there is an explicit config setting? If there is an eslint config settings file and it's invalid then error out? Just adding some details/questions. Current lint scripts:
|
Prettier-eslint will just run prettier and not fail if no eslint config exists (or is invalid). prettier/prettier-eslint#90
Stale issue |
I'm using this in context of VSCode (via prettier-eslint-code), at some point eslint config resolution stopped working (empty config was resolved internally)
The problem lies here: src/index.js#L206-L209 Whatever error occurs during config resolution it just without backing reason states that no config could be found, and resolves with empty one.
It'll be way better if eventual errors are recognized, and are either rethrown or accurate actions are taken to errors that are understood.
In my case it appeared that some other VSCode extension crashed and it was its error that prevented proper config resolution, if package would just rethrow this error, then on my end the cause would be immediately exposed.
The text was updated successfully, but these errors were encountered: