1
0
mirror of https://github.com/bobwen-dev/react-templates synced 2025-04-12 00:56:39 +02:00

eslint fixes

This commit is contained in:
ido 2015-04-21 17:32:12 +03:00
parent 1c3bafbfab
commit 8e4af67439
2 changed files with 20 additions and 23 deletions

View File

@ -6,19 +6,19 @@ var chalk = require('chalk');
var _ = require('lodash');
var table = require('text-table');
/**
* @param {MESSAGE} message
* @return {string}
*/
function getMessageType(message) {
if (message.level === 'WARN') {
return chalk.yellow('warning');
}
if (message.level === 'ERROR') {
return chalk.red('error');
}
return chalk.cyan('info');
}
///**
// * @param {MESSAGE} message
// * @return {string}
// */
//function getMessageType(message) {
// if (message.level === 'WARN') {
// return chalk.yellow('warning');
// }
// if (message.level === 'ERROR') {
// return chalk.red('error');
// }
// return chalk.cyan('info');
//}
/**
* Given a word and a count, append an s if count is not one.
@ -34,9 +34,9 @@ function pluralize(word, count) {
// return n === 1 ? single : plural;
//}
function lineText(line) {
return line < 1 ? '' : line;
}
//function lineText(line) {
// return line < 1 ? '' : line;
//}
//module.exports = function (warnings/*, config*/) {
// var _ = require('lodash');
@ -109,10 +109,10 @@ function lineText(line) {
module.exports = function (results) {
results = _.groupBy(results, 'file');
var output = '\n',
total = 0,
errors = 0,
warnings = 0,
var output = '\n',
total = 0,
errors = 0,
warnings = 0,
summaryColor = 'yellow';
_.each(results, function (result, k) {

View File

@ -64,7 +64,6 @@ function normalizeError(err) {
test('invalid tests json', function (t) {
var cli = require('../../src/cli');
var context = require('../../src/context');
t.plan(invalidFiles.length);
invalidFiles.forEach(check);
@ -210,7 +209,6 @@ test('html tests', function (t) {
});
test('test context', function (t) {
var context = require('../../src/context');
context.clear();
t.equal(context.hasErrors(), false);
context.error('hi', '', 1, 1);
@ -223,7 +221,6 @@ test('test context', function (t) {
test('test shell', function (t) {
var shell = require('../../src/shell');
var context = require('../../src/context');
var newContext = _.cloneDeep(context);
var outputJSON = '';
newContext.options.format = 'json';