-
Notifications
You must be signed in to change notification settings - Fork 580
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
PrettierLintBear regex is incorrect #2365
Comments
Yes, I see. It's a problem for any type of syntax error. |
updated the issue. An error is still thrown as corrected output is empty but stderr will never throw any error. This happens for every syntax error |
Can you assign this to me @jayvdb |
@anctartica are you still on this? |
cc @Nshul |
yes working will make a PR today |
Maybe this is a version thing? Different versions produced different stderr? |
#2421 is semi-related |
When the PrettierBear was written not many tests were added. I later added the tests #2341 so, it is possible that this could have slipped. The format for the syntax error message produced by prettier is here: https://github.com/prettier/prettier/blob/master/src/common/parser-create-error.js which does not match the previous regex. |
Apologies for my late response. |
Thanks for letting us know. |
The output of the prettierLintBear to stderr stream on syntax error for the input
function b(){
is:[error] ../../../../var/folders/x6/p95tfncj57q1lzsbbm02599xmts4q9/T/tmphekpuu5k: SyntaxError: Unexpected token (2:1)\n[error] 1 | function b(){\n[error] > 2 | \n[error] | ^\n
.This does not match
r'L(?P<line>\d+)C(?P<column>\d+): (?P<message>.*)'
the regex that is included inside the bear for stderrThe text was updated successfully, but these errors were encountered: