Skip to content

Commit

Permalink
improved linting
Browse files Browse the repository at this point in the history
  • Loading branch information
igorklopov committed Aug 23, 2016
1 parent 51177c8 commit 65efc94
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 12 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
/node_repository
/runtime
/test/test-50-many-arrow-functions/test-x-index.js
/test/test-50-many-callbacks/test-x-index.js
/test/test-50-no-super-in-constructor/test-x-index.js
1 change: 1 addition & 0 deletions examples/23-thrust/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
'use strict';

require('node-thrust')(function (error, api) {
if (error) throw error;
let w = api.window({
root_url: 'http://enclosejs.com'
});
Expand Down
1 change: 0 additions & 1 deletion lib/walker.js
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,6 @@ Walker.prototype.start = function (opts, cb) {

};


module.exports = function (opts) {
return new Promise((resolve, reject) => {
const w = new Walker();
Expand Down
14 changes: 11 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,20 @@
"babel-plugin-transform-runtime": "6.12.0",
"babel-preset-es2015": "6.13.2",
"babel-register": "6.9.0",
"json-stable-stringify": "^1.0.1",
"klopov-eslint": "0.6.2"
"eslint-config-klopov": "0.8.0",
"json-stable-stringify": "^1.0.1"
},
"scripts": {
"babel": "babel lib --out-dir lib-es5",
"bin": "node lib-es5/bin.js",
"lint": "klopov-eslint . || true"
"lint": "eslint-klopov . || true"
},
"eslintConfig": {
"extends": "klopov",
"parser": "babel-eslint",
"rules": {
"one-var": "off",
"padded-blocks": "off"
}
}
}
2 changes: 2 additions & 0 deletions test/test-50-fs-runtime-layer/test-x-index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable indent */

'use strict';

require('./test-x1-index.js');
Expand Down
1 change: 1 addition & 0 deletions test/test-50-fs-runtime-layer/test-x2-index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable camelcase */
/* eslint-disable indent */
/* eslint-disable no-path-concat */
/* eslint-disable no-undefined */

Expand Down
1 change: 1 addition & 0 deletions test/test-50-fs-runtime-layer/test-x3-index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable camelcase */
/* eslint-disable indent */
/* eslint-disable no-path-concat */
/* eslint-disable no-undefined */

Expand Down
1 change: 0 additions & 1 deletion test/test-79-npm/diff/diff.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ diff.forEach(function (part) {
join += color + ':[' + part.value + ']';
});


if (join === 'grey:[beep boo]red:[p]green:[b blah]') {
console.log('ok');
}
10 changes: 6 additions & 4 deletions test/test-79-npm/gulp/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ let concat = require('gulp-concat');
gulp.task('default', function () {
gulp.src('gulp-concat-*.txt')
.pipe(concat('gulp-concat-out.txt', { newLine: '' }))
.on('data', function (c) {
if (c._contents.toString() === '123456') {
(console._log_ || console.log)('ok');
.on('data',
function (c) {
if (c._contents.toString() === '123456') {
(console._log_ || console.log)('ok');
}
}
});
);
});
5 changes: 2 additions & 3 deletions test/test-79-npm/usage/usage.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
let usage = require('usage');
let pid = process.pid;
usage.lookup(pid, function (error, result) {
if (result.memory) {
console.log('ok');
}
if (error) throw error;
if (result.memory) console.log('ok');
});
1 change: 1 addition & 0 deletions test/test-79-npm/xml2js/xml2js.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
let parse = require('xml2js').parseString;
let xml = '<root>Hello xml2js!</root>';
parse(xml, function (error, result) {
if (error) throw error;
if (result.root === 'Hello xml2js!') {
console.log('ok');
}
Expand Down

0 comments on commit 65efc94

Please sign in to comment.