Skip to content

Commit ae4eb19

Browse files
Merge pull request #250 from tschaub/lint
Fix linter-identified issues and run the linter before tests
2 parents 8bad35d + cd73db0 commit ae4eb19

31 files changed

+1330
-1897
lines changed

.eslintrc.js

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,32 @@
11
module.exports = {
2-
'extends': 'airbnb',
3-
'env': {
4-
'mocha': true,
5-
'browser': true,
6-
'worker': true,
7-
'node': true
2+
extends: 'airbnb-base',
3+
env: {
4+
mocha: true,
5+
browser: true,
6+
worker: true,
7+
node: true,
88
},
9-
'rules': {
9+
ignorePatterns: [
10+
'test/lib/**/*',
11+
],
12+
parserOptions: {
13+
ecmaVersion: 'latest',
14+
sourceType: 'module',
15+
},
16+
rules: {
1017
'no-underscore-dangle': 0,
1118
'class-methods-use-this': 0,
1219
'no-plusplus': 0,
1320
'no-loop-func': 0,
1421
'no-mixed-operators': [
1522
'error', {
16-
'allowSamePrecedence': true
17-
}
23+
allowSamePrecedence: true,
24+
},
1825
],
1926
'no-param-reassign': [
2027
'error', {
21-
'props': false
22-
}
28+
props: false,
29+
},
2330
],
2431
'no-prototype-builtins': 0,
2532
'no-restricted-syntax': [
@@ -30,16 +37,17 @@ module.exports = {
3037
'no-console': 0,
3138
'no-bitwise': 0,
3239
'max-classes-per-file': 0,
40+
'max-len': ['error', { code: 130 }],
3341
'import/prefer-default-export': 0,
3442
'prefer-default-export': 0,
3543
'func-names': 0,
3644
'arrow-body-style': 0,
3745
'function-paren-newline': 0,
3846
'object-curly-newline': 0,
3947
'no-await-in-loop': 0,
40-
'prefer-destructuring': ['error', { 'object': true, 'array': false }],
41-
'curly': ['error', 'all'],
42-
'brace-style': ['error', '1tbs', { 'allowSingleLine': false }],
43-
'no-else-return': 0
44-
}
48+
'prefer-destructuring': ['error', { object: true, array: false }],
49+
curly: ['error', 'all'],
50+
'brace-style': ['error', '1tbs', { allowSingleLine: false }],
51+
'no-else-return': 0,
52+
},
4553
};

0 commit comments

Comments
 (0)