Replies: 2 comments 2 replies
-
ESLint doesn't run
ESLint returns exit code 1 if there are errors, so the command fails. This output with
Can you check this log to see what happened? |
Beta Was this translation helpful? Give feedback.
-
Interesting... I'll look into what's going on some more on my local machine and then file with npm/cli. Probably will do the following:
It definitely makes sense to not change the behavior around the error code. Since it's most likely not an issue with eslint, feel free to close this issue. I encountered this while working on a personal project for the sake of learning eslint, so I may not get to fully troubleshooting/investigating. Thanks for looking into this! |
Beta Was this translation helpful? Give feedback.
-
Tell us about your environment
What parser (default,
@babel/eslint-parser
,@typescript-eslint/parser
, etc.) are you using?Please show your full configuration:
Configuration
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
I installed ESLint using
npm install eslint
, set up ESLint usingnpx eslint --init
, and then rannpx eslint README.md
.What did you expect to happen?
I expected it the output to be
/Users/project_path/README.md 1:1 error Parsing error: Unexpected character '#' ✖ 1 problem (1 error, 0 warnings)
What actually happened? Please include the actual, raw output from ESLint.
It looks like some part of ESLint is also doing a
sh -c eslint "README.md"
inside the command. However,eslint
isn't a command that can run by itself since I installed it locally using npm. It has to be run usingnpx eslint
.This issue doesn't occur when I run ESLint on a file without any errors/warnings.
Are you willing to submit a pull request to fix this bug?
I unfortunately don't know what is causing the issue or how to fix this bug.
Beta Was this translation helpful? Give feedback.
All reactions