-
-
Notifications
You must be signed in to change notification settings - Fork 65
Add reporter option
#55
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
Changes from 3 commits
ab80d63
476c884
f1dfc7a
2cbb3d1
acb4b48
a1aaccf
b60de42
4890b0b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,6 +58,10 @@ lint.report = async options => { | |
|
|
||
| if (messages.length === 0) { | ||
| spinner.succeed(); | ||
| if (options.customReporter) { | ||
| console.log(options.customReporter([])); | ||
| } | ||
|
|
||
| return; | ||
| } | ||
|
|
||
|
|
@@ -69,7 +73,11 @@ lint.report = async options => { | |
| process.exitCode = 1; | ||
|
|
||
| file.path = path.basename(file.path); | ||
| console.log(vfileReporterPretty([file])); | ||
| if (options.customReporter) { | ||
| console.log(options.customReporter([file])); | ||
| } else { | ||
| console.log(vfileReporterPretty([file])); | ||
| } | ||
|
||
| }; | ||
|
|
||
| module.exports = lint; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| { | ||
| "name": "awesome-lint", | ||
| "version": "0.8.0", | ||
| "version": "0.9.0", | ||
|
||
| "description": "Linter for Awesome lists", | ||
| "license": "MIT", | ||
| "repository": "sindresorhus/awesome-lint", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The option name can simply be named
reporter.