Skip to content

Commit

Permalink
BLD: add eslint-fix task
Browse files Browse the repository at this point in the history
  • Loading branch information
royriojas committed Nov 1, 2015
1 parent e94e176 commit fd29e52
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
10 changes: 4 additions & 6 deletions cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ var cache = {
* @param key {String} the key to remove from the object
*/
removeKey: function ( key ) {
delete this._visited[ key ];
delete this._persisted[ key ];
delete this._visited[ key ]; // esfmt-ignore-line
delete this._persisted[ key ]; // esfmt-ignore-line
},
/**
* Return the value of the provided key
Expand Down Expand Up @@ -180,10 +180,8 @@ module.exports = {
* @method clearAll
* @returns {Boolean} true if the cache folder was deleted. False otherwise
*/
clearAll: function (cacheDir) {
clearAll: function ( cacheDir ) {
var filePath = cacheDir ? path.resolve( cacheDir ) : path.resolve( __dirname, './.cache/' );
return del( filePath, {
force: true
} ).length > 0;
return del( filePath, { force: true } ).length > 0;
}
};
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@
],
"scripts": {
"beautify": "esbeautifier 'cache.js' 'specs/**/*.js'",
"beautify-check": "esbeautifier -k 'cache.js' 'specs/**/*.js'",
"beautify-check": "npm run beautify -- -k",
"eslint": "eslinter 'cache.js' 'specs/**/*.js'",
"lint": "npm run beautify && npm run eslint",
"verify": "npm run beautify-check && npm run eslint && npm run test:cache",
"eslint-fix": "npm run eslint -- --fix",
"autofix": "npm run beautify && npm run eslint-fix",
"check": "npm run beautify-check && npm run eslint",
"verify": "npm run check && npm run test:cache",
"install-hooks": "prepush install && changelogx install-hook && precommit install",
"changelog": "changelogx -f markdown -o ./changelog.md",
"do-changelog": "npm run changelog && git add ./changelog.md && git commit -m 'DOC: Generate changelog' --no-verify",
Expand Down Expand Up @@ -63,8 +65,8 @@
"devDependencies": {
"chai": "^3.2.0",
"changelogx": "^1.0.18",
"esbeautifier": "^4.2.11",
"eslinter": "^2.3.3",
"esbeautifier": "^6.1.8",
"eslinter": "^3.2.1",
"glob-expand": "^0.1.0",
"istanbul": "^0.3.19",
"mocha": "^2.3.2",
Expand Down

0 comments on commit fd29e52

Please sign in to comment.