Skip to content

Commit 8992031

Browse files
committed
Restore lint default
1 parent 1c481a0 commit 8992031

File tree

8 files changed

+24
-21
lines changed

8 files changed

+24
-21
lines changed

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ module.exports = {
2424
},
2525
extends: 'eslint:recommended',
2626
rules: {
27+
'semi': ["error", "always"],
2728
'indent': ['error', 2],
2829
'no-console': 'off',
2930
'no-empty': 'off',

lib/parseargs.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
*/
1818

1919
let parseargs = {};
20-
let isOpt = function (arg) { return arg.indexOf('-') === 0 };
21-
let removeOptPrefix = function (opt) { return opt.replace(/^--/, '').replace(/^-/, '') };
20+
let isOpt = function (arg) { return arg.indexOf('-') === 0; };
21+
let removeOptPrefix = function (opt) { return opt.replace(/^--/, '').replace(/^-/, ''); };
2222

2323
/**
2424
* @constructor

lib/task/task.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class Task extends EventEmitter {
122122
this._initInvocationChain();
123123

124124
this.args = Array.prototype.slice.call(arguments);
125-
this.reenabled = false
125+
this.reenabled = false;
126126
this.runPrereqs();
127127
}
128128

@@ -137,7 +137,7 @@ class Task extends EventEmitter {
137137

138138
this.args = Array.prototype.slice.call(arguments);
139139
this.reenable();
140-
this.reenabled = true
140+
this.reenabled = true;
141141
this.run();
142142
}
143143

@@ -420,7 +420,9 @@ class Task extends EventEmitter {
420420

421421
_getParams() {
422422
if (!this.action) return "";
423-
let params = (new RegExp('(?:'+this.action.name+'\\s*|^)\\s*\\((.*?)\\)').exec(this.action.toString().replace(/\n/g, '')) || [,''])[1].replace(/\/\*.*?\*\//g, '').replace(/ /g, '');
423+
console.log(this.action.name, this.action.toString());
424+
let params = (new RegExp('(?:'+this.action.name+'\\s*|^)\\s*\\((.*?)\\)').exec(this.action.toString().replace(/\n/g, '')) || [''])[1].replace(/\/\*.*?\*\//g, '').replace(/ /g, '');
425+
console.log(params);
424426
return params;
425427
}
426428

lib/utils/file.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ let fileUtils = new (function () {
2828

2929
// Recursively copy files and directories
3030
let _copyFile = function (fromPath, toPath, opts) {
31-
let from = path.normalize(fromPath)
32-
let to = path.normalize(toPath)
33-
let options = opts || {}
31+
let from = path.normalize(fromPath);
32+
let to = path.normalize(toPath);
33+
let options = opts || {};
3434
let fromStat;
3535
let toStat;
3636
let destExists;

test/integration/concurrent.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,27 @@ suite('concurrent', function () {
99
this.timeout(7000);
1010

1111
test(' simple concurrent prerequisites 1', function () {
12-
let out = exec(`${JAKE_CMD} -q concurrent:simple1`).toString().trim()
12+
let out = exec(`${JAKE_CMD} -q concurrent:simple1`).toString().trim();
1313
assert.equal('Started A\nStarted B\nFinished B\nFinished A', out);
1414
});
1515

1616
test(' simple concurrent prerequisites 2', function () {
17-
let out = exec(`${JAKE_CMD} -q concurrent:simple2`).toString().trim()
17+
let out = exec(`${JAKE_CMD} -q concurrent:simple2`).toString().trim();
1818
assert.equal('Started C\nStarted D\nFinished C\nFinished D', out);
1919
});
2020

2121
test(' sequential concurrent prerequisites', function () {
22-
let out = exec(`${JAKE_CMD} -q concurrent:seqconcurrent`).toString().trim()
22+
let out = exec(`${JAKE_CMD} -q concurrent:seqconcurrent`).toString().trim();
2323
assert.equal('Started A\nStarted B\nFinished B\nFinished A\nStarted C\nStarted D\nFinished C\nFinished D', out);
2424
});
2525

2626
test(' concurrent concurrent prerequisites', function () {
27-
let out = exec(`${JAKE_CMD} -q concurrent:concurrentconcurrent`).toString().trim()
27+
let out = exec(`${JAKE_CMD} -q concurrent:concurrentconcurrent`).toString().trim();
2828
assert.equal('Started A\nStarted B\nStarted C\nStarted D\nFinished B\nFinished C\nFinished A\nFinished D', out);
2929
});
3030

3131
test(' concurrent prerequisites with subdependency', function () {
32-
let out = exec(`${JAKE_CMD} -q concurrent:subdep`).toString().trim()
32+
let out = exec(`${JAKE_CMD} -q concurrent:subdep`).toString().trim();
3333
assert.equal('Started A\nFinished A\nStarted Ba\nFinished Ba', out);
3434
});
3535

test/integration/jakefile.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ task('noActionNoPrereqs');
1414

1515
desc('Top-level zerbofrangazoomy task');
1616
task('zerbofrangazoomy', function () {
17-
console.log('Whaaaaaaaa? Ran the zerbofrangazoomy task!')
17+
console.log('Whaaaaaaaa? Ran the zerbofrangazoomy task!');
1818
});
1919

2020
desc('Task that throws');
@@ -237,7 +237,7 @@ namespace('fileTest', function () {
237237
desc('File task, run if the prereq file changes');
238238
task('touch-prereq', function () {
239239
fs.writeFileSync('foo/prereq.txt', 'UPDATED');
240-
})
240+
});
241241

242242
desc('File task, has a preexisting file (with no associated task) as a prereq');
243243
file('foo/from-prereq.txt', ['fileTest:foo', 'foo/prereq.txt'], function () {
@@ -332,6 +332,6 @@ namespace("large", function () {
332332

333333
desc("Task with a large number of different prereqs");
334334
task("different", different, { concurrency: 2 } , function () {
335-
console.log("large:different")
336-
})
335+
console.log("large:different");
336+
});
337337
});

test/integration/jakelib/publish.jake.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ publishTask('zerb', function () {
3131
, 'tmp_publish/**'
3232
]);
3333
this.publishCmd = 'node -p -e "\'%filename\'"';
34-
this.gitCmd = 'echo'
34+
this.gitCmd = 'echo';
3535
this.scheduleDelay = 0;
3636

3737
this._ensureRepoClean = function () {};
3838
this._getCurrentBranch = function () {
39-
return 'v0.0'
39+
return 'v0.0';
4040
};
4141
});
4242

test/integration/selfdep.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ suite('selfDep', function () {
2424
exec(`${JAKE_CMD} selfdepconst`);
2525
}
2626
catch(e) {
27-
assert(e.message.indexOf('dependency of itself') > -1)
27+
assert(e.message.indexOf('dependency of itself') > -1);
2828
}
2929
});
3030

@@ -33,7 +33,7 @@ suite('selfDep', function () {
3333
exec(`${JAKE_CMD} selfdepdyn`);
3434
}
3535
catch(e) {
36-
assert(e.message.indexOf('dependency of itself') > -1)
36+
assert(e.message.indexOf('dependency of itself') > -1);
3737
}
3838
});
3939

0 commit comments

Comments
 (0)