Add silent flag to avoid default node error message on --fix
See original GitHub issueNot clear how to run xo --fix
in silent mode to avoid the exit code 1 error displayed.
Please advice. Thanks 😃
18:19 $ npm run fix
> nodelib-2017@1.0.0 fix /Users/kristianmandrup/repos/node-libs/nodelib-2017
> xo --fix --quiet
src/a.test.js:2:8
✖ 2:8 goofy is defined but never used. no-unused-vars
1 error
npm ERR! Darwin 16.1.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "fix"
npm ERR! node v6.9.1
npm ERR! npm v4.0.1
npm ERR! code ELIFECYCLE
npm ERR! nodelib-2017@1.0.0 fix: `xo --fix --quiet`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nodelib-2017@1.0.0 fix script 'xo --fix --quiet'.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:7 (2 by maintainers)
Top Results From Across the Web
How to suppress output when running npm scripts
All scripts: You can fix this by suppressing the output of npm overall, by setting the log level to silent in a couple...
Read more >Command-line API | Node.js v19.3.0 Documentation
To prevent from an existing add-on from crashing the process, this flag is not enabled by default. In the future, this flag will...
Read more >[BUG] npm ci can't resolve dependencies without --force, or ...
Fix the upstream dependency conflict, or retry npm ERR! this command ... May you can add any flags that work like "--force" before...
Read more >Command Line Interface - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >config | npm Docs
Run npm config ls -l to see a set of configuration parameters that are internal to npm, and are defaults if nothing else...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You can add
|| true
after the xo command. It would have the same effect as the-s
flagClosing as resolved. || true is the native way to do this and it’s shorter than any flag ever could.
Eslint doesn’t offer such a flag either https://eslint.org/docs/latest/user-guide/command-line-interface