Skip to content

Commit

Permalink
Update: Pass updated eslint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
sttk authored and phated committed Mar 13, 2019
1 parent ef7def3 commit 4ab4aed
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"extends": "gulp",
"rules": {
"max-statements": [1, 40]
"max-statements": [1, 40],
"no-console": "off"
}
}
2 changes: 1 addition & 1 deletion lib/versioned/^3.7.0/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function execute(opts, env, config) {
}
if (opts.tasksJson) {
tree = taskTree(gulpInst.tasks);
if (config.description && isString(config.description)) {
if (config.description && typeof config.description === 'string') {
tree.label = config.description;
} else {
tree.label = 'Tasks for ' + tildify(env.configPath);
Expand Down
2 changes: 1 addition & 1 deletion lib/versioned/^3.7.0/task-tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ module.exports = function(tasks) {
task.nodes.push(child);
});
});
return { label: 'Tasks', nodes: arr, };
return { label: 'Tasks', nodes: arr };
};
5 changes: 4 additions & 1 deletion test/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"extends": "gulp/test"
"extends": "gulp/test",
"rules": {
"no-console": "off"
}
}
1 change: 0 additions & 1 deletion test/config-flags-series.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ var path = require('path');
var skipLines = require('gulp-test-tools').skipLines;
var eraseTime = require('gulp-test-tools').eraseTime;
var eraseLapse = require('gulp-test-tools').eraseLapse;
var runner = require('gulp-test-tools').gulpRunner;

var fixturesDir = path.join(__dirname, 'fixtures/config');
var runner = require('gulp-test-tools').gulpRunner({ verbose: false }).basedir(fixturesDir);
Expand Down
6 changes: 3 additions & 3 deletions test/fixtures/gulpfiles/with-desc-and-flags.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ clean.description = 'Delete dist folder';
gulp.task(clean);

gulp.task('scripts', scripts);
function scripts() {};
function scripts() {}
scripts.description = 'Bundles JavaScript';

var styles = function() {};
Expand All @@ -24,13 +24,13 @@ build.flags = {
gulp.task('build', build);

gulp.task('serve', serve);
function serve() {};
function serve() {}
serve.description = 'Serves files reloading';
serve.flags = {
'--lr': 'with live reloading',
};

function watch() {};
function watch() {}
gulp.task('watch', watch);
watch.description = 'Watch files and build on change';

Expand Down
1 change: 1 addition & 0 deletions test/fixtures/test-error-module.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/* eslint no-unreachable: off */
throw new Error('from error module');
console.log('inside error module');
6 changes: 3 additions & 3 deletions test/lib/task-tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ describe('lib: taskTree', function() {
label: 'test',
type: 'task',
nodes: [
{ label: 'dep1', type: 'task', nodes: [], },
{ label: 'dep2', type: 'task', nodes: [], },
{ label: 'dep1', type: 'task', nodes: [] },
{ label: 'dep2', type: 'task', nodes: [] },
],
},
{
label: 'test2',
type: 'task',
nodes: [
{ label: 'dep3', type: 'task', nodes: [], },
{ label: 'dep3', type: 'task', nodes: [] },
],
},
{
Expand Down

0 comments on commit 4ab4aed

Please sign in to comment.