Skip to content
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

feat(bin): 0 exit code when no unused rules found #39

Merged

Conversation

dustinspecker
Copy link
Contributor

Before, no unused rules always returned a non-zero exit code even when
no unused rules were found. Now, -u only returns a non-zero exit code
when an unused rule is found.

This makes eslint-find-rules an even better tool by being able to
be ran on CI when ESLint updates for configs.

@dustinspecker dustinspecker force-pushed the zero-when-no-unused-rules-found branch 3 times, most recently from d5d7d94 to 18068a3 Compare April 15, 2016 00:00
@@ -20,19 +20,23 @@ var getRuleFinder = require('./rule-finder')
var specifiedFile = argv._[0]

var ruleFinder = getRuleFinder(specifiedFile)
var noUnusedRulesFound = false
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noUnusedRulesFound is not required, ...

@sarbbottam
Copy link
Owner

Now, -u only returns a non-zero exit code when an unused rule is found

👍

Before, no unused rules always returned a non-zero exit code even when
no unused rules were found. Now, -u only returns a non-zero exit code
when an unused rule is found.

This makes eslint-find-rules an even better tool by being able to
be ran on CI when ESLint updates for configs.
@dustinspecker dustinspecker force-pushed the zero-when-no-unused-rules-found branch from 18068a3 to 893c5c0 Compare April 15, 2016 00:16
@dustinspecker
Copy link
Contributor Author

Good catch, that's way better!

@sarbbottam
Copy link
Owner

Thanks for the PR!

@sarbbottam sarbbottam merged commit a001620 into sarbbottam:master Apr 15, 2016
@dustinspecker dustinspecker deleted the zero-when-no-unused-rules-found branch April 15, 2016 00:21
@sarbbottam
Copy link
Owner

@dustinspecker please add yourself to all-contributorsrc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants