Skip to content

Commit dae3a44

Browse files
committed
make XO happy
Locking the version as 0.17.0 requires Node.js 4
1 parent c258d03 commit dae3a44

11 files changed

+16
-25
lines changed

bench/run.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ if (process.argv.length === 2) {
7676
}
7777
currentArgs.push(arg);
7878
});
79-
if (currentArgs.length) {
79+
if (currentArgs.length > 0) {
8080
list.push({
8181
args: currentArgs,
8282
shouldFail: shouldFail

lib/babel-config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ var defaultPresets = lazy(function () {
4747

4848
return [
4949
require('babel-preset-stage-2'),
50-
require(esPreset)
50+
require(esPreset) // eslint-disable-line import/no-dynamic-require
5151
];
5252
});
5353

lib/process-adapter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ if (debug.enabled) {
5959
process.argv.push('--sorted');
6060
}
6161

62-
require('time-require');
62+
require('time-require'); // eslint-disable-line import/no-unassigned-import
6363
}
6464

6565
var sourceMapCache = Object.create(null);

lib/reporters/mini.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ MiniReporter.prototype._update = function (data) {
260260
lastLine = lastLine.substring(lastLine.length - (lastLine.length % columns));
261261

262262
// Don't delete the last log line if it's completely empty.
263-
if (lastLine.length) {
263+
if (lastLine.length > 0) {
264264
ct++;
265265
}
266266

@@ -270,7 +270,7 @@ MiniReporter.prototype._update = function (data) {
270270
// Rewrite the last log line.
271271
str += lastLine;
272272

273-
if (str.length) {
273+
if (str.length > 0) {
274274
this.stream.write(str);
275275
}
276276

@@ -282,7 +282,7 @@ MiniReporter.prototype._update = function (data) {
282282

283283
var currentStatus = this.currentStatus;
284284

285-
if (currentStatus.length) {
285+
if (currentStatus.length > 0) {
286286
lastLine = this.lastLineTracker.lastLine();
287287
// We need a newline at the end of the last log line, before the status message.
288288
// However, if the last log line is the exact width of the terminal a newline is implied,

lib/test-worker.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22
/* eslint-disable import/order */
33
var process = require('./process-adapter');
4+
45
var opts = process.opts;
56
var testPath = opts.file;
67

@@ -29,7 +30,7 @@ process.installPrecompilerHook();
2930
var dependencies = [];
3031
process.installDependencyTracking(dependencies, testPath);
3132

32-
require(testPath);
33+
require(testPath); // eslint-disable-line import/no-dynamic-require
3334

3435
process.on('unhandledRejection', throwsHelper);
3536

lib/throws-helper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var path = require('path');
44
var chalk = require('chalk');
55
var globals = require('./globals');
66

7-
module.exports = function throwsHelper(error) {
7+
module.exports = function (error) {
88
if (!error || !error._avaThrowsHelperData) {
99
return;
1010
}

package.json

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -184,22 +184,12 @@
184184
"source-map-fixtures": "^2.1.0",
185185
"tap": "^7.1.2",
186186
"touch": "^1.0.0",
187-
"xo": "*",
187+
"xo": "^0.16.0",
188188
"zen-observable": "^0.3.0"
189189
},
190190
"xo": {
191191
"rules": {
192-
"import/newline-after-import": 0
193-
},
194-
"overrides": [
195-
{
196-
"files": [
197-
"test/**/*.js"
198-
],
199-
"rules": {
200-
"max-lines": 0
201-
}
202-
}
203-
]
192+
"import/newline-after-import": "off"
193+
}
204194
}
205195
}

test/assert.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ test('.deepEqual()', function (t) {
259259
});
260260

261261
t.throws(function () {
262-
assert.deepEqual(function a() {}, function a() {});
262+
assert.deepEqual(function () {}, function () {});
263263
});
264264

265265
t.doesNotThrow(function () {

test/runner.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ test('tests must be declared synchronously', function (t) {
5252
test('runner emits a "test" event', function (t) {
5353
var runner = new Runner();
5454

55-
runner.test(function foo(a) {
55+
runner.test('foo', function (a) {
5656
a.pass();
5757
});
5858

test/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ test('callback is required', function (t) {
8787
});
8888

8989
test('infer name from function', function (t) {
90-
var result = ava(function foo(a) {
90+
var result = ava(function foo(a) { // eslint-disable-line func-names
9191
a.pass();
9292
}).run();
9393

test/watcher.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ var setImmediate = require('../lib/globals').setImmediate;
1414

1515
// Helper to make using beforeEach less arduous.
1616
function makeGroup(test) {
17-
return function group(desc, fn) {
17+
return function (desc, fn) {
1818
test(desc, function (t) {
1919
var beforeEach = function (fn) {
2020
t.beforeEach(function (done) {

0 commit comments

Comments
 (0)