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
pretty option is ignored in terminal #1418
Comments
Sounds like we want 3x states for the pretty flag: true forces it enabled, false forces it disabled, and undefined (not specified anywhere) allows the default to be determined based on Are you able to send a pull request for this? |
The docs will need to be updated to match, as well. |
I'll whip up a PR right now. |
I replied to the PR before seeing this comment. It might be untested. Most of the tests invoke the CLI, which isn't the fastest but is simple to think about. Feel free to write a couple tests that do that. |
* fix: allow to specify pretty errors in TTY closes #1418 * lint fix Co-authored-by: Andrew Bradley <cspotcode@gmail.com>
Expected Behavior
When I specify
pretty: false
I expect the errors to respect that.This is particularly useful if I am developing a tool that uses ts-node and I need to handle 3rd party potentially faulty code.
Actual Behavior
Because of this line, when I use a terminal as the main output for my tool,
pretty
is ignored:ts-node/src/index.ts
Lines 628 to 630 in e8a4d76
Steps to reproduce the problem
Run ts-node on a faulty codebase with
--pretty false
option.Errors are still styled with terminal only decoration.
Minimal reproduction
TypeStrong/ts-node-repros#16
Specifications
ts-node v8.3.0
node v14.17.0
compiler v4.3.5
tsconfig.json
The text was updated successfully, but these errors were encountered: