[2048] - Adds cli argument to fail silently when no files matched #2117

Merged
merged 1 commit into from Nov 26, 2016

Projects

None yet

4 participants

@nikolasleblanc
Contributor

Which issue, if any, is this issue related to?

#2048

Is there anything in the PR that needs further explanation?

FIrst pass at this, welcome comments on coding conventions, styles etc.

@nikolasleblanc nikolasleblanc changed the title from [2048] - Adds cli argument to faily siltently when no files matched to [2048] - Adds cli argument to fail siltently when no files matched Nov 24, 2016
@nikolasleblanc nikolasleblanc changed the title from [2048] - Adds cli argument to fail siltently when no files matched to [2048] - Adds cli argument to fail silently when no files matched Nov 24, 2016
@davidtheclark

Two minor comments. Otherwise 👍 from me! @stylelint/core any other feedback on this new feature?

@@ -24,6 +24,7 @@ const minimistOptions = {
rd: "report-needless-disables",
s: "syntax",
v: "version",
+ aei: "allow-empty-input",
@davidtheclark
davidtheclark Nov 25, 2016 Contributor

No need to create an alias if it's not going to be documented.

src/cli.js
@@ -101,6 +102,10 @@ const meowOptions = {
Force enabling/disabling of color.
+ --allow-empty-input
+
+ If no files match glob pattern, exits gracefully.
@davidtheclark
davidtheclark Nov 25, 2016 Contributor

Can you please be more precise than "gracefully"?

@evilebottnawi

LGTM

@nikolasleblanc
Contributor

I've been spoiled by Webstorm's auto saving, did this in sublime and never noticed I hadn't saved my alias change to cli.js. Also, rephrased the description as per recommendation. I can be more specific, just trying to balance it with brevity.

@davidtheclark

👌

@nikolasleblanc nikolasleblanc [2048] - Adds cli argument to fail silently when no files matched by …
…glob pattern
09a843e
@jeddy3 jeddy3 merged commit 3003aad into stylelint:master Nov 26, 2016

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.04%) to 95.645%
Details
@jeddy3
Member
jeddy3 commented Nov 26, 2016

@nikolasleblanc Thank you.

Added to the changelog as:

  • Added: allow-empty-input flag to CLI (#2117)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment