-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.cjs
165 lines (164 loc) · 3.84 KB
/
.eslintrc.cjs
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution');
module.exports = {
ignorePatterns: ['*.min.*'],
root: true,
extends: [
'eslint:recommended',
],
globals: {
document: 'readonly',
window: 'readonly',
URL: 'readonly',
},
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: ['@stylistic'],
rules: {
'@stylistic/array-bracket-spacing': 'error',
'@stylistic/arrow-parens': 'error',
'@stylistic/arrow-spacing': 'error',
'@stylistic/block-spacing': 'error',
'@stylistic/brace-style': [
'error',
'1tbs',
{ allowSingleLine: false },
],
'@stylistic/comma-dangle': [
'error',
'always-multiline',
],
'@stylistic/comma-spacing': 'error',
'@stylistic/comma-style': 'error',
'@stylistic/computed-property-spacing': 'error',
'@stylistic/dot-location': [
'error',
'property',
],
'@stylistic/eol-last': 'error',
'@stylistic/function-call-argument-newline': [
'error',
'consistent',
],
'@stylistic/function-call-spacing': 'error',
'@stylistic/function-paren-newline': [
'error',
'consistent',
],
'@stylistic/generator-star-spacing': 'error',
'@stylistic/implicit-arrow-linebreak': 'error',
'@stylistic/indent': [
'error',
'tab',
],
'@stylistic/indent-binary-ops': [
'error',
'tab',
],
'@stylistic/key-spacing': 'error',
'@stylistic/keyword-spacing': 'error',
'@stylistic/linebreak-style': 'error',
'@stylistic/lines-around-comment': [
'error',
{
afterBlockComment: false,
afterLineComment: false,
},
],
'@stylistic/lines-between-class-members': [
'error',
{
enforce: [
{
blankLine: 'always',
next: 'method',
prev: 'method',
},
{
blankLine: 'never',
next: 'field',
prev: 'field',
},
],
},
],
'@stylistic/max-statements-per-line': 'error',
'@stylistic/member-delimiter-style': 'error',
'@stylistic/multiline-ternary': [
'error',
'always-multiline',
],
'@stylistic/new-parens': 'error',
'@stylistic/newline-per-chained-call': 'error',
'@stylistic/no-extra-parens': 'error',
'@stylistic/no-extra-semi': 'error',
'@stylistic/no-floating-decimal': 'error',
'@stylistic/no-mixed-spaces-and-tabs': 'error',
'@stylistic/no-multi-spaces': 'error',
'@stylistic/no-multiple-empty-lines': 'error',
'@stylistic/no-trailing-spaces': [
'error',
{ ignoreComments: true },
],
'@stylistic/no-whitespace-before-property': 'error',
'@stylistic/object-curly-spacing': [
'error',
'always',
],
'@stylistic/one-var-declaration-per-line': [
'error',
'always',
],
'@stylistic/operator-linebreak': [
'error',
'before',
],
'@stylistic/padded-blocks': [
'error',
'never',
],
'@stylistic/quote-props': [
'error',
'consistent-as-needed',
],
'@stylistic/quotes': [
'error',
'single',
{ allowTemplateLiterals: false },
],
'@stylistic/rest-spread-spacing': 'error',
'@stylistic/semi': 'error',
'@stylistic/semi-spacing': 'error',
'@stylistic/semi-style': 'error',
'@stylistic/space-before-blocks': 'error',
'@stylistic/space-before-function-paren': [
'error',
{ named: 'never' },
],
'@stylistic/space-in-parens': 'error',
'@stylistic/space-infix-ops': 'error',
'@stylistic/space-unary-ops': 'error',
'@stylistic/spaced-comment': 'error',
'@stylistic/switch-colon-spacing': 'error',
'@stylistic/template-curly-spacing': 'error',
'@stylistic/template-tag-spacing': 'error',
'@stylistic/type-annotation-spacing': 'error',
'@stylistic/type-generic-spacing': 'error',
'@stylistic/type-named-tuple-spacing': 'error',
'@stylistic/wrap-iife': [
'error',
'inside',
{ functionPrototypeMethods: true },
],
'@stylistic/yield-star-spacing': 'error',
'eqeqeq': 'error',
},
overrides: [
{
files: ['*.cjs', '*.config.js'],
env: { node: true },
},
],
};