Honor stdin-filepath when outputting error messages. (#5878)
This commit is contained in:
1 parent
db560e4e19
commit
ed1db90c68
3 files changed
+4
-2
No files matched your search
@@ -42,6 +42,8 @@ Examples:
|
||||
|
||||
-->
|
||||
|
||||
- CLI: Honor stdin-filepath when outputting error messages.
|
||||
|
||||
- Markdown: Do not align table contents if it exceeds the print width and `--prose-wrap never` is set ([#5701] by [@chenshuai2144])
|
||||
|
||||
The aligned table is less readable than the compact one
|
||||
|
||||
+1
-1
@@ -383,7 +383,7 @@ function formatStdin(context) {
|
||||
|
||||
writeOutput(context, format(context, input, options), options);
|
||||
} catch (error) {
|
||||
handleError(context, "stdin", error);
|
||||
handleError(context, relativeFilepath || "stdin", error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ exports[`output file as-is if stdin-filepath matched patterns in ignore-path (st
|
||||
exports[`output file as-is if stdin-filepath matched patterns in ignore-path (write) 1`] = `Array []`;
|
||||
|
||||
exports[`throw error if stdin content incompatible with stdin-filepath (stderr) 1`] = `
|
||||
"[error] stdin: SyntaxError: Unexpected token (1:1)
|
||||
"[error] abc.js: SyntaxError: Unexpected token (1:1)
|
||||
[error] > 1 | .name { display: none; }
|
||||
[error] | ^
|
||||
"
|
||||
|
||||
Reference in new issue
Block a user