Skip to content

Commit

Permalink
style: please linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiphe committed Sep 7, 2016
1 parent 6575ad9 commit adff44b
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 15 deletions.
1 change: 1 addition & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable import/no-extraneous-dependencies */
'use strict';

const gulp = require('gulp');
Expand Down
5 changes: 3 additions & 2 deletions lib/plugins/uberconfig/PluginUberconfig.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable class-methods-use-this */
'use strict';

const conflictHandler = require('./conflictHandler');
Expand All @@ -9,8 +10,8 @@ module.exports = class PluginUberconfig {
this.config = uberconfig;
}
validate(toolbox) {
validations.forEach((validate) => {
validate(toolbox);
validations.forEach((validation) => {
validation(toolbox);
});
}
decorateProvider(toolbox) {
Expand Down
4 changes: 2 additions & 2 deletions lib/plugins/uberconfig/validations.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ module.exports = [
},
(toolbox) => {
if (!toolbox.meta.bugs ||
typeof toolbox.meta.bugs !== 'string' &&
typeof toolbox.meta.bugs.url !== 'string'
(typeof toolbox.meta.bugs !== 'string' &&
typeof toolbox.meta.bugs.url !== 'string')
) {
throw new Error(`toolbox ${toolbox.meta.name} does not provide ` +
'required "bugs" url in it\'s meta data.');
Expand Down
1 change: 1 addition & 0 deletions test/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"jasmine": true
},
"rules": {
"import/no-extraneous-dependencies": 0,
"max-statements": 0,
"max-nested-callbacks": 0
}
Expand Down
2 changes: 1 addition & 1 deletion test/plugins/PluginAutoWatchSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ describe('PluginAutoWatch', () => {
let i = 0;

fakeTaker.series.and.returnValue(taskWithWaitingLog);
fakeUberconfig.get.and.callFake(() => relatedFiles[i++]);
fakeUberconfig.get.and.callFake(() => relatedFiles[i++]); // eslint-disable-line no-plusplus
pluginAutoWatch = new PluginAutoWatch({});
pluginAutoWatch.init({ takerInst: fakeTaker });
pluginAutoWatch.decorateTask(args.task);
Expand Down
1 change: 1 addition & 0 deletions test/plugins/emitCleanup/PluginEmitCleanupSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

const proxyquire = require('proxyquire');
const events = require('events');

const EventEmitter = events.EventEmitter;

describe('PluginEmitCleanup', () => {
Expand Down
8 changes: 4 additions & 4 deletions test/plugins/groupTasks/PluginGroupTasksSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('PluginGroupTasks', () => {

describe('init', () => {
it('puts a given store aside for later usage', () => {
const someStore = Symbol();
const someStore = Symbol('fixture');

pluginGroupTasks.init(someStore);

Expand All @@ -44,13 +44,13 @@ describe('PluginGroupTasks', () => {
});

it('builds a grouped task from store', () => {
const aTask = Symbol();
const aTask = Symbol('fixture');
const store = {
tasks: [aTask],
};
const name = 'fuchs';
const args = { name };
const theGroup = Symbol();
const theGroup = Symbol('fixture');
const at = jasmine.anything();

Object.freeze(args);
Expand All @@ -68,7 +68,7 @@ describe('PluginGroupTasks', () => {
});

it('does nothing if no group could be formed', () => {
const aTask = Symbol();
const aTask = Symbol('fixture');
const store = {
tasks: [aTask],
};
Expand Down
12 changes: 6 additions & 6 deletions test/plugins/groupTasks/groupSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@ describe('groupFactory', () => {
describe('group reducer', () => {
it('directly returns task if its the only one', () => {
const group = groupFactory();
const task = Symbol();
const task = Symbol('fixture');
const tasks = [task];

expect(group(null, task, 0, tasks)).toBe(task);
});

it('gets the task from takerInst and pushes it to collection', () => {
const fakeTakerTask = Symbol();
const fakeTakerTask = Symbol('fixture');
const fakeTakerInst = {
task: jasmine.createSpy('task').and.returnValue(fakeTakerTask),
};
const group = groupFactory(fakeTakerInst);
const displayName = 'foo';
const anotherTask = { displayName };
const tasks = [anotherTask, Symbol()];
const tasks = [anotherTask, Symbol('fixture')];

const groupedTasks = group(null, anotherTask, 0, tasks);

Expand All @@ -35,16 +35,16 @@ describe('group reducer', () => {
});

it('wraps the collection for parallel call on last task', () => {
const fakeTakerTask = Symbol();
const fakeParalleled = Symbol();
const fakeTakerTask = Symbol('fixture');
const fakeParalleled = Symbol('fixture');
const fakeTakerInst = {
task: jasmine.createSpy('task').and.returnValue(fakeTakerTask),
parallel: jasmine.createSpy('parallel').and.returnValue(fakeParalleled),
};
const group = groupFactory(fakeTakerInst);
const name = 'bar';
const anotherTask = { name };
const tasks = [Symbol(), anotherTask];
const tasks = [Symbol('fixture'), anotherTask];
const collection = [fakeTakerTask];

expect(group(collection, anotherTask, 1, tasks)).toBe(fakeParalleled);
Expand Down
1 change: 1 addition & 0 deletions test/plugins/groupTasks/skipSpec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

const proxyquire = require('proxyquire');

const fakeArgv = { 'skip-bar': true };
const skip = proxyquire('../../../lib/plugins/groupTasks/skip', {
'../../argv': fakeArgv,
Expand Down
1 change: 1 addition & 0 deletions test/plugins/uberconfig/PluginUberconfigSpec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

const proxyquire = require('proxyquire');

let fakeConflictHandler = null;
let fakeValidations = [];
let PluginUberconfig = null;
Expand Down

0 comments on commit adff44b

Please sign in to comment.