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
--allow-empty-input CLI flag not working #4649
Comments
@yipei1028 Thanks for the report. I can't reproduce this locally. % npx stylelint -v
13.2.1
% npx stylelint "*.none" --allow-empty-input
% echo $?
0
% npx stylelint "*.none" --aei
% echo $?
0
% npx stylelint "*.none"
Error: No files matching the pattern "*.none" were found.
at /Users/jeddy3/Projects/stylelint/lib/standalone.js:213:12
at processTicksAndRejections (internal/process/task_queues.js:97:5)
% echo $?
1
Unless you are piping std-in to stylelint, you need to specify an input glob. From the CLI help:
Using Do you have a use case where you aren't specifying a glob? |
Hi @jeddy3 , Only running the stylelint command should display the stylelint CLI help. (I found it here) Not sure should it throw error or not 😕 And will u consider changing the name of the option? Say something like Thank you in advance. 👍 👍 👍
|
What's your use case for providing no glob? I suspect all users would provide a glob unless they are piping in from stdin. |
Closing due to inactivity. |
BTW, the same set works with eslint |
Glob is slower than only linting modified files. The nested git command returns empty when there are no modified files and It should exit FWIW, workaround it with this:
If |
While stylelint running CLI with
--allow-empty-input
, there are still error throwed...None.
None.
None.
13.2.0
CLI with
stylelint --allow-empty-input
None.
No error, while no input files it should exit quietly.
Error and exit code 2. It seems like there is no flag
--aei
This issue is related to #2048 #3880 #4029
The text was updated successfully, but these errors were encountered: