-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbase.js
65 lines (62 loc) · 1.97 KB
/
base.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import eslint from '@eslint/js';
import mocha from 'eslint-plugin-mocha';
import globals from 'globals';
export default [
eslint.configs.recommended,
mocha.configs.flat.recommended,
{
rules: {
// Standard ESLint rules.
//
// See https://eslint.org/docs/rules/.
//
// Stylistic rules are omitted for things that are handled automatically
// by Prettier.
'array-callback-return': 'error',
'block-scoped-var': 'error',
'consistent-this': ['error', 'self'],
'consistent-return': 'error',
curly: 'error',
'dot-notation': 'error',
eqeqeq: 'error',
'guard-for-in': 'error',
'new-cap': 'error',
'no-caller': 'error',
'no-case-declarations': 'error',
'no-console': ['error', { allow: ['warn', 'error'] }],
'no-extra-bind': 'error',
'no-lone-blocks': 'error',
'no-lonely-if': 'error',
'no-self-compare': 'error',
'no-throw-literal': 'error',
'no-undef-init': 'error',
'no-unneeded-ternary': 'error',
'no-unused-expressions': 'error',
'no-useless-concat': 'error',
'one-var-declaration-per-line': ['error', 'always'],
'prefer-arrow-callback': ['error', { allowNamedFunctions: true }],
'prefer-const': ['error', { destructuring: 'all' }],
strict: ['error', 'safe'],
// Stylistic rules about use of ES2015+ features.
//
// See https://eslint.org/docs/rules/#ecmascript-6
'no-var': 'error',
// mocha rules
'mocha/no-exclusive-tests': 'error',
'mocha/no-mocha-arrows': 'off',
'mocha/no-setup-in-describe': 'off',
'mocha/max-top-level-suites': 'off',
'mocha/consistent-spacing-between-blocks': 'off',
'mocha/no-top-level-hooks': 'off',
'mocha/no-sibling-hooks': 'off',
'mocha/no-identical-title': 'off',
},
languageOptions: {
globals: {
...globals.browser,
sinon: 'readonly',
assert: 'readonly',
}
},
}
];