-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Converting over a lot of files to ES6 (#106)
* Adding in forgotten --esw-version command to readme * Updating simple-success * Updating simple * Updated successHelper * Updating error-warning * updating arg-parser * Updating eslint-help.js * Updating executor * Updating logger * Updating logger file from log to logger. derp * Updating options.js * Adding references badge * Adding node requirement in readme
- Loading branch information
Showing
18 changed files
with
102 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
{ | ||
"plugins": ["add-module-exports"], | ||
"presets": ["es2015-node4", "stage-3", "async-to-bluebird"] | ||
"presets": [ | ||
["env", { "targets": { "node": 4 } }] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,7 @@ | ||
var chalk = require('chalk'); | ||
var space = ' '; | ||
var divider = '/'; | ||
import { red, yellow, white } from 'chalk'; | ||
|
||
module.exports = function(result){ | ||
if(result.errorCount || result.warningCount){ | ||
return chalk.red(result.errorCount) + divider + | ||
chalk.yellow(result.warningCount) + space + | ||
chalk.white(result.filePath); | ||
} else { | ||
return chalk.red(result.messages.length) + space + | ||
chalk.white(result.filePath); | ||
} | ||
export default function errorWarning(result){ | ||
return result.errorCount || result.warningCount ? | ||
`${red(result.errorCount)}/${yellow(result.warningCount)} ${white(result.filePath)}` : | ||
`${red(result.messages.length)} ${white(result.filePath)}`; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
var chalk = require('chalk'); | ||
var c = require('./characters'); | ||
var space = ' '; | ||
var Logger = require('../../log'); | ||
var logger = Logger('success-formatter'); | ||
import chalk from 'chalk'; | ||
|
||
import c from './characters'; | ||
import Logger from '../../logger'; | ||
|
||
const logger = Logger('success-formatter'); | ||
logger.debug('loaded'); | ||
|
||
module.exports = function(result){ | ||
export default function successHelper(result){ | ||
logger.debug(result); | ||
return chalk.green(c.check) + space + chalk.white(result.filePath); | ||
return `${chalk.green(c.check)} ${chalk.white(result.filePath)}`; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,16 @@ | ||
var success = require('./helpers/success'); | ||
var error = require('./helpers/error-warning'); | ||
var c = require('./helpers/characters'); | ||
import _ from 'lodash'; | ||
|
||
module.exports = function (results) { | ||
var message = ''; | ||
for (var i = 0; i < results.length; i++) { | ||
var result = results[i]; | ||
import success from './helpers/success'; | ||
import error from './helpers/error-warning'; | ||
import c from './helpers/characters'; | ||
|
||
export default function simpleSuccess(results) { | ||
return _.reduce(results, (message, result) =>{ | ||
if (result.errorCount === 0 && result.warningCount === 0) { | ||
message += success(result) + c.endLine; | ||
message += `${success(result)}${c.endLine}`; | ||
} else { | ||
message += error(result); | ||
message += c.endLine; | ||
message += `${error(result)}${c.endLine}`; | ||
} | ||
} | ||
return message; | ||
return message; | ||
}, ''); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
var error = require('./helpers/error-warning'); | ||
var c = require('./helpers/characters'); | ||
import _ from 'lodash'; | ||
|
||
module.exports = function (results) { | ||
var message = ''; | ||
for (var i = 0; i < results.length; i++) { | ||
var result = results[i]; | ||
import error from './helpers/error-warning'; | ||
import c from './helpers/characters'; | ||
|
||
export default function simple(results) { | ||
return _.reduce(results, (str, result) =>{ | ||
if (result.errorCount !== 0 || result.warningCount !== 0) { | ||
message += error(result); | ||
message += c.endLine; | ||
str += `${error(result)}${c.endLine}`; | ||
} | ||
} | ||
return message; | ||
return str; | ||
}, ''); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.