You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What actually happened (e.g. what warnings or errors did you get)?
Same output as stylelint --help
A mighty, modern CSS linter.
Usage: stylelint [input] [options]
Input: Files(s), glob(s), or nothing to use stdin.
If an input argument is wrapped in quotation marks, it will be passed to
globby for cross-platform glob support. node_modules are always ignored.
You can also pass no input and use stdin, instead.
Options:
...
@alypeng Thanks for the report and for using the template.
What did you expect to happen?
Same output as stylelint a.css
That does seem like the best behaviour. I suspect ESLint has its --stdin flag to support this behaviour. Without the flag ESLint, like stylelint, prints help when an empty file is piped to it.
Ideally, we can achieve this without a new flag because turning off stdin support by default would be a breaking change.
I'll label as a discussion to see if anyone else has an opinion on this.
I suggest we implement this as a non-breaking change. We can keep the existing default behaviour, but add a new --stdin flag that changes the behaviour of the CLI to not trigger help if an empty file it piped in.
If
a.css
is an empty file thencat a.css | stylelint
outputs help instead of an error.no-empty-source
An empty file (e.g.
touch a.css
)13.0.0
CLI
No
Same output as
stylelint a.css
Same output as
stylelint --help
Possibly related to #1557
The text was updated successfully, but these errors were encountered: