-
Notifications
You must be signed in to change notification settings - Fork 717
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
Added new formatter #188
Added new formatter #188
Conversation
How does it look with errors? |
@sarvaje Sorry about that :( |
|
No problem! :) |
a84b43f
to
a6d668c
Compare
/** | ||
* @fileoverview The basic formatter, it just a table format with diferent colors | ||
* for errors and warnings. | ||
*/ |
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.
Add reference to https://www.npmjs.com/package/eslint-stylish and mention sindresorhus
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.
I didn't use that, I have used as reference this one https://github.com/eslint/eslint/blob/master/lib/formatters/stylish.js
tests/lib/formatters/stylish.ts
Outdated
t.is(t.context.logger.log.callCount, 0); | ||
}); | ||
|
||
test(`Stylish formatter print a table and a summary for each resource`, (t) => { |
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.
Stylish formatter prints a table and a summary for each resource
const sortedMessages = _.sortBy(msgs, ['line', 'column']); | ||
const tableData = []; | ||
|
||
logger.log(chalk.cyan(`${resource}: ${msgs.length} issues`)); |
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.
We don't need : ${msgs.length} issues
. We are doing the summary after all the issues for that resource.
@molant done! |
* Fix how `formatter` is used in `cli.ts` * Fix #187
Fixed how formatter is used in cli.ts
Fix #187