@enormora/eslint-config-ava 0.0.10 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -5
- package/rule-sets/test-rules.js +2 -2
- package/constants.js +0 -4
- package/rule-sets/stylistic.js +0 -234
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
-
"
|
|
4
|
-
"eslint-plugin-ava": "14.0.0",
|
|
5
|
-
"eslint-plugin-destructuring": "2.2.1",
|
|
6
|
-
"eslint-plugin-prettier": "5.0.1"
|
|
3
|
+
"eslint-plugin-ava": "14.0.0"
|
|
7
4
|
},
|
|
8
5
|
"license": "MIT",
|
|
9
6
|
"main": "ava.js",
|
|
10
7
|
"name": "@enormora/eslint-config-ava",
|
|
8
|
+
"peerDependencies": {
|
|
9
|
+
"@enormora/eslint-config-base": "0.0.11"
|
|
10
|
+
},
|
|
11
11
|
"repository": {
|
|
12
12
|
"type": "git",
|
|
13
13
|
"url": "git://github.com/enormora/eslint-config.git"
|
|
14
14
|
},
|
|
15
15
|
"type": "module",
|
|
16
|
-
"version": "0.0.
|
|
16
|
+
"version": "0.0.12"
|
|
17
17
|
}
|
package/rule-sets/test-rules.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { stylisticRuleSet } from '
|
|
1
|
+
import { stylisticRuleSet } from '@enormora/eslint-config-base/rule-sets/stylistic.js';
|
|
2
2
|
|
|
3
3
|
export const testRuleSet = {
|
|
4
4
|
rules: {
|
|
5
|
-
'max-len': [
|
|
5
|
+
'@stylistic/max-len': [
|
|
6
6
|
'error',
|
|
7
7
|
{
|
|
8
8
|
...stylisticRuleSet.rules['@stylistic/max-len'][1],
|
package/constants.js
DELETED
package/rule-sets/stylistic.js
DELETED
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
import prettierPlugin from 'eslint-plugin-prettier';
|
|
2
|
-
import destructuringPlugin from 'eslint-plugin-destructuring';
|
|
3
|
-
import stylisticPlugin from '@stylistic/eslint-plugin';
|
|
4
|
-
import { indentSize } from '../constants.js';
|
|
5
|
-
|
|
6
|
-
export const stylisticRuleSet = {
|
|
7
|
-
plugins: {
|
|
8
|
-
prettier: prettierPlugin,
|
|
9
|
-
destructuring: destructuringPlugin,
|
|
10
|
-
'@stylistic': stylisticPlugin
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
settings: {},
|
|
14
|
-
|
|
15
|
-
rules: {
|
|
16
|
-
'prettier/prettier': 'error',
|
|
17
|
-
|
|
18
|
-
'destructuring/in-methods-params': 'error',
|
|
19
|
-
'destructuring/in-params': ['error', { 'max-params': 0 }],
|
|
20
|
-
'destructuring/no-rename': 'off',
|
|
21
|
-
|
|
22
|
-
'@stylistic/array-bracket-newline': ['error', 'consistent'],
|
|
23
|
-
'@stylistic/array-bracket-spacing': ['error', 'never'],
|
|
24
|
-
'@stylistic/array-element-newline': ['error', 'consistent'],
|
|
25
|
-
'@stylistic/arrow-parens': ['error', 'always'],
|
|
26
|
-
'@stylistic/arrow-spacing': [
|
|
27
|
-
'error',
|
|
28
|
-
{
|
|
29
|
-
before: true,
|
|
30
|
-
after: true
|
|
31
|
-
}
|
|
32
|
-
],
|
|
33
|
-
'@stylistic/block-spacing': 'off',
|
|
34
|
-
'@stylistic/brace-style': ['error', '1tbs', { allowSingleLine: false }],
|
|
35
|
-
'@stylistic/comma-dangle': ['error', 'never'],
|
|
36
|
-
'@stylistic/comma-spacing': [
|
|
37
|
-
'error',
|
|
38
|
-
{
|
|
39
|
-
before: false,
|
|
40
|
-
after: true
|
|
41
|
-
}
|
|
42
|
-
],
|
|
43
|
-
'@stylistic/comma-style': ['error', 'last'],
|
|
44
|
-
'@stylistic/computed-property-spacing': [
|
|
45
|
-
'error',
|
|
46
|
-
'never',
|
|
47
|
-
{
|
|
48
|
-
enforceForClassMembers: true
|
|
49
|
-
}
|
|
50
|
-
],
|
|
51
|
-
'@stylistic/dot-location': ['error', 'property'],
|
|
52
|
-
'@stylistic/eol-last': 'error',
|
|
53
|
-
'@stylistic/func-call-spacing': ['error', 'never'],
|
|
54
|
-
'@stylistic/function-call-spacing': ['error', 'never'],
|
|
55
|
-
'@stylistic/function-call-argument-newline': ['error', 'consistent'],
|
|
56
|
-
'@stylistic/function-paren-newline': 'off',
|
|
57
|
-
'@stylistic/generator-star-spacing': ['error', { before: false, after: true }],
|
|
58
|
-
'@stylistic/indent-binary-ops': ['error', indentSize],
|
|
59
|
-
'@stylistic/implicit-arrow-linebreak': 'off',
|
|
60
|
-
'@stylistic/indent': [
|
|
61
|
-
'error',
|
|
62
|
-
indentSize,
|
|
63
|
-
{
|
|
64
|
-
SwitchCase: 1,
|
|
65
|
-
VariableDeclarator: 1,
|
|
66
|
-
MemberExpression: 1
|
|
67
|
-
}
|
|
68
|
-
],
|
|
69
|
-
'@stylistic/jsx-child-element-spacing': 'off',
|
|
70
|
-
'@stylistic/jsx-closing-bracket-location': 'off',
|
|
71
|
-
'@stylistic/jsx-closing-tag-location': 'off',
|
|
72
|
-
'@stylistic/jsx-curly-brace-presence': 'off',
|
|
73
|
-
'@stylistic/jsx-curly-newline': 'off',
|
|
74
|
-
'@stylistic/jsx-curly-spacing': 'off',
|
|
75
|
-
'@stylistic/jsx-equals-spacing': 'off',
|
|
76
|
-
'@stylistic/jsx-first-prop-new-line': 'off',
|
|
77
|
-
'@stylistic/jsx-indent': 'off',
|
|
78
|
-
'@stylistic/jsx-indent-props': 'off',
|
|
79
|
-
'@stylistic/jsx-max-props-per-line': 'off',
|
|
80
|
-
'@stylistic/jsx-newline': 'off',
|
|
81
|
-
'@stylistic/jsx-one-expression-per-line': 'off',
|
|
82
|
-
'@stylistic/jsx-props-no-multi-spaces': 'off',
|
|
83
|
-
'@stylistic/jsx-self-closing-comp': 'off',
|
|
84
|
-
'@stylistic/jsx-sort-props': 'off',
|
|
85
|
-
'@stylistic/jsx-tag-spacing': 'off',
|
|
86
|
-
'@stylistic/jsx-quotes': 'off',
|
|
87
|
-
'@stylistic/jsx-wrap-multilines': 'off',
|
|
88
|
-
'@stylistic/key-spacing': [
|
|
89
|
-
'error',
|
|
90
|
-
{
|
|
91
|
-
beforeColon: false,
|
|
92
|
-
afterColon: true
|
|
93
|
-
}
|
|
94
|
-
],
|
|
95
|
-
'@stylistic/keyword-spacing': [
|
|
96
|
-
'error',
|
|
97
|
-
{
|
|
98
|
-
before: true,
|
|
99
|
-
after: true
|
|
100
|
-
}
|
|
101
|
-
],
|
|
102
|
-
'@stylistic/linebreak-style': ['error', 'unix'],
|
|
103
|
-
'@stylistic/lines-between-class-members': [
|
|
104
|
-
'error',
|
|
105
|
-
'always',
|
|
106
|
-
{
|
|
107
|
-
exceptAfterSingleLine: true
|
|
108
|
-
}
|
|
109
|
-
],
|
|
110
|
-
'@stylistic/lines-around-comment': 'off',
|
|
111
|
-
'@stylistic/max-len': [
|
|
112
|
-
'error',
|
|
113
|
-
{
|
|
114
|
-
code: 120,
|
|
115
|
-
tabWidth: indentSize,
|
|
116
|
-
ignoreComments: true,
|
|
117
|
-
ignoreTrailingComments: true,
|
|
118
|
-
ignoreUrls: true,
|
|
119
|
-
ignoreStrings: false,
|
|
120
|
-
ignoreTemplateLiterals: false,
|
|
121
|
-
ignoreRegExpLiterals: true
|
|
122
|
-
}
|
|
123
|
-
],
|
|
124
|
-
'@stylistic/max-statements-per-line': ['error', { max: 1 }],
|
|
125
|
-
'@stylistic/member-delimiter-style': [
|
|
126
|
-
'error',
|
|
127
|
-
{
|
|
128
|
-
multiline: {
|
|
129
|
-
delimiter: 'semi',
|
|
130
|
-
requireLast: true
|
|
131
|
-
},
|
|
132
|
-
singleline: {
|
|
133
|
-
delimiter: 'semi',
|
|
134
|
-
requireLast: false
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
],
|
|
138
|
-
'@stylistic/multiline-ternary': 'off',
|
|
139
|
-
'@stylistic/new-parens': 'error',
|
|
140
|
-
'@stylistic/newline-per-chained-call': 'off',
|
|
141
|
-
'@stylistic/no-confusing-arrow': 'error',
|
|
142
|
-
// Currently this rule conflicts with prettier, because in some cases prettier adds unnecessary extra parens. Unfortunately there is no way to turn this off yet. We should re-enable this rule once this has been fixed in prettier or once there is a better formatter that doesn’t add unnecessary parens. See https://github.com/prettier/prettier/issues/3089
|
|
143
|
-
'@stylistic/no-extra-parens': 'off',
|
|
144
|
-
'@stylistic/no-extra-semi': 'error',
|
|
145
|
-
'@stylistic/no-floating-decimal': 'error',
|
|
146
|
-
'@stylistic/no-mixed-operators': 'off',
|
|
147
|
-
'@stylistic/no-mixed-spaces-and-tabs': 'error',
|
|
148
|
-
'@stylistic/no-multi-spaces': 'error',
|
|
149
|
-
'@stylistic/no-multiple-empty-lines': ['error', { max: 1 }],
|
|
150
|
-
'@stylistic/no-tabs': 'error',
|
|
151
|
-
'@stylistic/no-trailing-spaces': 'error',
|
|
152
|
-
'@stylistic/no-whitespace-before-property': 'error',
|
|
153
|
-
'@stylistic/nonblock-statement-body-position': 'off',
|
|
154
|
-
'@stylistic/object-curly-newline': 'off',
|
|
155
|
-
'@stylistic/object-curly-spacing': ['error', 'always'],
|
|
156
|
-
'@stylistic/object-property-newline': 'off',
|
|
157
|
-
'@stylistic/one-var-declaration-per-line': 'error',
|
|
158
|
-
'@stylistic/operator-linebreak': ['error', 'after', { overrides: { '?': 'before', ':': 'before' } }],
|
|
159
|
-
'@stylistic/padded-blocks': [
|
|
160
|
-
'error',
|
|
161
|
-
'never',
|
|
162
|
-
{
|
|
163
|
-
allowSingleLineBlocks: false
|
|
164
|
-
}
|
|
165
|
-
],
|
|
166
|
-
'@stylistic/padding-line-between-statements': [
|
|
167
|
-
'error',
|
|
168
|
-
{
|
|
169
|
-
blankLine: 'always',
|
|
170
|
-
prev: 'directive',
|
|
171
|
-
next: '*'
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
blankLine: 'any',
|
|
175
|
-
prev: 'directive',
|
|
176
|
-
next: 'directive'
|
|
177
|
-
}
|
|
178
|
-
],
|
|
179
|
-
'@stylistic/quote-props': ['error', 'as-needed'],
|
|
180
|
-
'@stylistic/quotes': ['error', 'single', { avoidEscape: true }],
|
|
181
|
-
'@stylistic/rest-spread-spacing': ['error', 'never'],
|
|
182
|
-
'@stylistic/semi': ['error', 'always'],
|
|
183
|
-
'@stylistic/semi-spacing': [
|
|
184
|
-
'error',
|
|
185
|
-
{
|
|
186
|
-
before: false,
|
|
187
|
-
after: true
|
|
188
|
-
}
|
|
189
|
-
],
|
|
190
|
-
'@stylistic/semi-style': ['error', 'last'],
|
|
191
|
-
'@stylistic/space-before-blocks': ['error', 'always'],
|
|
192
|
-
'@stylistic/space-before-function-paren': [
|
|
193
|
-
'error',
|
|
194
|
-
{
|
|
195
|
-
anonymous: 'always',
|
|
196
|
-
named: 'never',
|
|
197
|
-
asyncArrow: 'always'
|
|
198
|
-
}
|
|
199
|
-
],
|
|
200
|
-
'@stylistic/space-in-parens': ['error', 'never'],
|
|
201
|
-
'@stylistic/space-infix-ops': 'error',
|
|
202
|
-
'@stylistic/space-unary-ops': 'error',
|
|
203
|
-
'@stylistic/spaced-comment': [
|
|
204
|
-
'error',
|
|
205
|
-
'always',
|
|
206
|
-
{
|
|
207
|
-
line: {
|
|
208
|
-
exceptions: ['-', '+', '*'],
|
|
209
|
-
markers: ['!', '/', '=>']
|
|
210
|
-
},
|
|
211
|
-
block: {
|
|
212
|
-
exceptions: ['-', '+', '*'],
|
|
213
|
-
markers: ['!', '*'],
|
|
214
|
-
balanced: true
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
],
|
|
218
|
-
'@stylistic/switch-colon-spacing': [
|
|
219
|
-
'error',
|
|
220
|
-
{
|
|
221
|
-
after: true,
|
|
222
|
-
before: false
|
|
223
|
-
}
|
|
224
|
-
],
|
|
225
|
-
'@stylistic/template-curly-spacing': 'error',
|
|
226
|
-
'@stylistic/template-tag-spacing': ['error', 'never'],
|
|
227
|
-
'@stylistic/type-annotation-spacing': 'error',
|
|
228
|
-
'@stylistic/type-generic-spacing': 'error',
|
|
229
|
-
'@stylistic/type-named-tuple-spacing': 'error',
|
|
230
|
-
'@stylistic/wrap-iife': ['error', 'inside'],
|
|
231
|
-
'@stylistic/wrap-regex': 'off',
|
|
232
|
-
'@stylistic/yield-star-spacing': ['error', { before: false, after: true }]
|
|
233
|
-
}
|
|
234
|
-
};
|