-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
107 lines (104 loc) · 2.72 KB
/
index.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
99
100
101
102
103
104
105
106
107
/* eslint-disable quote-props */
const LVL_LOW = 'off';
const LVL_MID = 'warn';
const LVL_HIGH = 'error';
module.exports = {
extends: [
'airbnb-base',
],
env: {
node: true,
browser: true,
es2021: true,
},
parserOptions: {
parser: '@babel/eslint-parser',
ecmaVersion: 13,
requireConfigFile: false,
},
rules: {
'array-bracket-spacing': LVL_LOW,
'arrow-body-style': [LVL_MID, 'as-needed'],
'arrow-parens': LVL_LOW,
'camelcase': LVL_LOW,
'class-methods-use-this': LVL_LOW,
'comma-dangle': [LVL_MID, 'always-multiline'],
'consistent-return': LVL_LOW,
'eol-last': LVL_MID,
'func-names': LVL_LOW,
'generator-star-spacing': LVL_LOW,
'global-require': LVL_LOW,
'implicit-arrow-linebreak': LVL_LOW,
'import/export': 'error',
'import/extensions': LVL_LOW,
'import/first': LVL_LOW,
'import/named': 'error',
'import/namespace': 'error',
'import/no-dynamic-require': LVL_LOW,
'import/no-extraneous-dependencies': LVL_LOW,
'import/no-unresolved': LVL_LOW,
'import/prefer-default-export': LVL_MID,
'indent': [LVL_MID, 2, { SwitchCase: 1 }],
'max-classes-per-file': LVL_LOW,
'max-len': LVL_LOW,
'newline-after-import': LVL_LOW,
'no-async-promise-executor': LVL_LOW,
'no-await-in-loop': LVL_LOW,
'no-bitwise': LVL_LOW,
'no-console': LVL_LOW,
'no-continue': LVL_LOW,
'no-debugger': LVL_LOW,
'no-empty': LVL_MID,
'no-empty-function': LVL_LOW,
'no-mixed-operators': LVL_LOW,
'no-multi-assign': LVL_LOW,
'no-multiple-empty-lines': LVL_LOW,
'no-nested-ternary': LVL_LOW,
'no-new': LVL_LOW,
'no-param-reassign': LVL_LOW,
'no-plusplus': [LVL_LOW, { allowForLoopAfterthoughts: true }],
'no-promise-executor-return': LVL_LOW,
'no-restricted-syntax': LVL_LOW,
'no-shadow': LVL_LOW,
'no-tabs': LVL_LOW,
'no-undef': LVL_MID,
'no-underscore-dangle': LVL_LOW,
'no-unreachable': LVL_LOW,
'no-unused-expressions': LVL_LOW,
'no-unused-vars': LVL_MID,
'no-use-before-define': [LVL_MID, { functions: false }],
'no-useless-constructor': LVL_LOW,
'no-void': LVL_LOW,
'object-curly-newline': LVL_MID,
'object-shorthand': LVL_LOW,
'one-var': LVL_LOW,
'one-var-declaration-per-line': LVL_LOW,
'operator-assignment': LVL_MID,
'padded-blocks': LVL_MID,
'prefer-const': LVL_MID,
'prefer-destructuring': LVL_MID,
'prefer-promise-reject-errors': LVL_LOW,
'quotes': [LVL_HIGH, 'single', { allowTemplateLiterals: true }],
'semi': LVL_MID,
'space-before-function-paren': LVL_MID,
'spaced-comment': LVL_LOW,
'strict': LVL_LOW,
'valid-typeof': LVL_LOW,
// 'vue/no-unused-components': 1,
},
overrides: [
{
files: ['*.vue', '*.html'],
env: {
browser: true,
},
},
{
files: ['*.test.js'],
env: {
mocha: true,
node: true,
},
},
],
};