-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
76 lines (76 loc) · 2.17 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
/** @type {import('eslint').Linter.Config} */
module.exports = {
root: true,
ignorePatterns: [
'./assets/',
'./coverage/',
'./dist/',
'./node_modules/',
'./WshModules/',
'!*.js',
],
env: {
browser: true,
},
extends: [
'eslint:recommended',
'plugin:jsdoc/recommended',
'plugin:import/recommended',
'plugin:prettier/recommended',
],
globals: {
'WScript': false,
'ActiveXObject': false,
'ScriptEngine': false,
'ScriptEngineMajorVersion': false,
'ScriptEngineMinorVersion': false,
'ScriptEngineBuildVersion': false,
'Enumerator': false,
'GetObject': false,
'VBArray': false
},
rules: {
'array-bracket-spacing': ['warn', 'never'],
'brace-style': ['error', '1tbs', { 'allowSingleLine': true }],
'comma-dangle': ['error', 'never'],
'comma-spacing': ['error', { 'before': false, 'after': true }],
'comma-style': ['error', 'last'],
'curly': ['error', 'multi-line'],
'dot-location': ['warn', 'property'],
'eol-last': ['warn', 'always'],
'func-call-spacing': ['error', 'never'],
'indent': ['warn', 2, {
'flatTernaryExpressions': true,
'MemberExpression': 2
}],
'key-spacing': ['error', { 'afterColon': true }],
'keyword-spacing': ['warn'],
'linebreak-style': ['error', 'windows'],
'no-console': ['off'],
'no-control-regex': ['off'],
'no-multi-spaces': ['warn', { 'ignoreEOLComments': true }],
'no-trailing-spaces': ['warn'],
'no-unneeded-ternary': 'error',
'no-unused-vars': [
'warn', {
'vars': 'all',
'args': 'after-used',
'ignoreRestSiblings': false
}
],
'object-curly-spacing': ['warn', 'always'],
'operator-linebreak': ['warn', 'before'],
'prettier/prettier': 'warn',
'quotes': ['warn', 'single'],
'semi': ['error', 'always'],
'semi-spacing': 'error',
'space-before-blocks': ['warn', 'always'],
'space-before-function-paren': ['warn', 'always'],
'spaced-comment': ['warn', 'always', {
'exceptions': ['-', '+', '/'],
'markers': ['/']
}],
'space-in-parens': ['warn', 'never'],
'space-infix-ops': 'warn'
},
};