Skip to content

Commit 3c96706

Browse files
committed
Fix: eslint errors.
1 parent b27e936 commit 3c96706

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

.eslintrc.yml

+3
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ rules:
1111
self/report-message-format:
1212
- error
1313
- '^[^a-z].*\.$'
14+
node/no-unpublished-require:
15+
- error
16+
- allowModules: ['espree', 'esutils']

lib/ast-utils.js

+7-5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
'use strict';
77

8+
/* eslint max-len: ["error", 128, { "ignoreComments": true }]*/
9+
810
// ------------------------------------------------------------------------------
911
// Requirements
1012
// ------------------------------------------------------------------------------
@@ -534,12 +536,12 @@ module.exports = {
534536
const comment = node.value.trim();
535537

536538
return (
537-
node.type === 'Line' && comment.indexOf('eslint-') === 0 ||
538-
node.type === 'Block' && (
539+
(node.type === 'Line' && comment.indexOf('eslint-') === 0) ||
540+
(node.type === 'Block' && (
539541
comment.indexOf('global ') === 0 ||
540542
comment.indexOf('eslint ') === 0 ||
541543
comment.indexOf('eslint-') === 0
542-
)
544+
))
543545
);
544546
},
545547

@@ -1282,8 +1284,8 @@ module.exports = {
12821284
const MINUS_TOKENS = new Set(['-', '--']);
12831285

12841286
return !(
1285-
PLUS_TOKENS.has(leftToken.value) && PLUS_TOKENS.has(rightToken.value) ||
1286-
MINUS_TOKENS.has(leftToken.value) && MINUS_TOKENS.has(rightToken.value)
1287+
(PLUS_TOKENS.has(leftToken.value) && PLUS_TOKENS.has(rightToken.value)) ||
1288+
(MINUS_TOKENS.has(leftToken.value) && MINUS_TOKENS.has(rightToken.value))
12871289
);
12881290
}
12891291
return true;

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"eslint-plugin-self": "^1.0.1",
3838
"espree": "^3.4.3",
3939
"estraverse": "^4.2.0",
40+
"esutils": "^2.0.2",
4041
"lodash": "^4.17.2",
4142
"mocha": "^2.4.5"
4243
},

0 commit comments

Comments
 (0)