forked from wenzhixin/multiple-select
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
98 lines (98 loc) · 2.81 KB
/
.eslintrc.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
module.exports = {
'root': true,
'env': {
'browser': true,
'node': true
},
'parserOptions': {
'parser': 'babel-eslint',
'ecmaVersion': 2017,
'sourceType': 'module'
},
'extends': [
'plugin:testcafe/recommended'
],
'overrides': [
{
'files': ['rollup*', 'tools/template.js'],
'env': {
'node': true,
'browser': false
}
},
{
'files': ['src/locale/*.js', 'tools/*.js'],
// These are being overwritten for some reason, despite `node: true`
'globals': {
require: 'readonly',
__dirname: 'readonly'
},
'rules': {
'import/no-commonjs': 'off',
'import/unambiguous': 'off',
'node/no-unsupported-features/node-builtins': 'off'
}
}
],
'rules': {
'indent': ['error',
2,
{
'SwitchCase': 1,
'MemberExpression': 1,
'ArrayExpression': 1,
'FunctionDeclaration': {'parameters': 'first'},
'CallExpression': {'arguments': 1},
'ImportDeclaration': 'first',
'ObjectExpression': 1
}
],
'quotes': ['error', 'single'],
'semi': ['error', 'never'],
'semi-style': ['error', 'last'],
'semi-spacing': ['error', {'before': false, 'after': true}],
'default-case': 'error',
'no-new-func': 'error',
'no-void': 'error',
'array-bracket-spacing': ['error', 'never'],
'no-tabs': 'error',
'one-var': ['error', 'never'],
'prefer-const': 'error',
'no-trailing-spaces': 'error',
'operator-assignment': ['error', 'always'],
'dot-location': ['error', 'property'],
'no-console': ['error', { allow: ['log', 'info', 'warn', 'error'] }],
'no-else-return': ['error', {allowElseIf: false}],
'no-multi-spaces': 'error',
'valid-jsdoc': 'warn',
'eqeqeq': 'error',
'guard-for-in': 'warn',
'no-multi-str': 'error',
'no-return-await': 'error',
'no-return-assign': 'error',
'no-throw-literal': 'error',
'no-undef-init': 'error',
'no-use-before-define': 'warn',
'key-spacing': ['error', {'beforeColon': false, 'afterColon': true, 'mode': 'strict'}],
'keyword-spacing': ['error', {'before': true, 'after': true}],
'space-before-blocks': ['error', {'functions': 'always', 'keywords': 'always', 'classes': 'always'}],
'spaced-comment': ['error', 'always'],
'space-infix-ops': 'error',
'arrow-spacing': ['error', { 'before': true, 'after': true }],
'no-useless-constructor': 'warn',
'comma-dangle': ['error', 'never'],
'space-before-function-paren': ['error', 'always'],
'arrow-parens': ['error', 'as-needed'],
'camelcase': 'off',
'no-unused-vars': 'off',
'no-param-reassign': 'off',
'quote-props': 'off',
'linebreak-style': 'off',
'require-unicode-regexp': 'off',
'max-len': 'off'
},
'globals': {
'$': true,
'jQuery': true
}
}