@naturalcycles/dev-lib 15.9.0 → 15.10.1
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/cfg/eslint-prettier-rules.js +110 -0
- package/cfg/eslint-rules.js +3 -12
- package/cfg/eslint.config.js +1 -3
- package/package.json +1 -2
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
// These rules are disabled, because prettier handles it
|
|
2
|
+
// Copy-pasted from https://github.com/prettier/eslint-config-prettier
|
|
3
|
+
module.exports = {
|
|
4
|
+
rules: {
|
|
5
|
+
// The following rules can be used in some cases. See the README for more
|
|
6
|
+
// information. These are marked with `0` instead of `0` so that a
|
|
7
|
+
// script can distinguish them. Note that there are a few more of these
|
|
8
|
+
// in the deprecated section below.
|
|
9
|
+
// "curly": 0,
|
|
10
|
+
'no-unexpected-multiline': 0,
|
|
11
|
+
'@typescript-eslint/lines-around-comment': 0,
|
|
12
|
+
'@typescript-eslint/quotes': 0,
|
|
13
|
+
'babel/quotes': 0,
|
|
14
|
+
'unicorn/template-indent': 0,
|
|
15
|
+
'vue/html-self-closing': 0,
|
|
16
|
+
'vue/max-len': 0,
|
|
17
|
+
|
|
18
|
+
// The rest are rules that you never need to enable when using Prettier.
|
|
19
|
+
'@babel/object-curly-spacing': 0,
|
|
20
|
+
'@babel/semi': 0,
|
|
21
|
+
'@typescript-eslint/block-spacing': 0,
|
|
22
|
+
'@typescript-eslint/brace-style': 0,
|
|
23
|
+
'@typescript-eslint/comma-dangle': 0,
|
|
24
|
+
'@typescript-eslint/comma-spacing': 0,
|
|
25
|
+
'@typescript-eslint/func-call-spacing': 0,
|
|
26
|
+
'@typescript-eslint/indent': 0,
|
|
27
|
+
'@typescript-eslint/key-spacing': 0,
|
|
28
|
+
'@typescript-eslint/keyword-spacing': 0,
|
|
29
|
+
'@typescript-eslint/member-delimiter-style': 0,
|
|
30
|
+
'@typescript-eslint/no-extra-parens': 0,
|
|
31
|
+
'@typescript-eslint/no-extra-semi': 0,
|
|
32
|
+
'@typescript-eslint/object-curly-spacing': 0,
|
|
33
|
+
'@typescript-eslint/semi': 0,
|
|
34
|
+
'@typescript-eslint/space-before-blocks': 0,
|
|
35
|
+
'@typescript-eslint/space-before-function-paren': 0,
|
|
36
|
+
'@typescript-eslint/space-infix-ops': 0,
|
|
37
|
+
'@typescript-eslint/type-annotation-spacing': 0,
|
|
38
|
+
'babel/object-curly-spacing': 0,
|
|
39
|
+
'babel/semi': 0,
|
|
40
|
+
'flowtype/boolean-style': 0,
|
|
41
|
+
'flowtype/delimiter-dangle': 0,
|
|
42
|
+
'flowtype/generic-spacing': 0,
|
|
43
|
+
'flowtype/object-type-curly-spacing': 0,
|
|
44
|
+
'flowtype/object-type-delimiter': 0,
|
|
45
|
+
'flowtype/quotes': 0,
|
|
46
|
+
'flowtype/semi': 0,
|
|
47
|
+
'flowtype/space-after-type-colon': 0,
|
|
48
|
+
'flowtype/space-before-generic-bracket': 0,
|
|
49
|
+
'flowtype/space-before-type-colon': 0,
|
|
50
|
+
'flowtype/union-intersection-spacing': 0,
|
|
51
|
+
'react/jsx-child-element-spacing': 0,
|
|
52
|
+
'react/jsx-closing-bracket-location': 0,
|
|
53
|
+
'react/jsx-closing-tag-location': 0,
|
|
54
|
+
'react/jsx-curly-newline': 0,
|
|
55
|
+
'react/jsx-curly-spacing': 0,
|
|
56
|
+
'react/jsx-equals-spacing': 0,
|
|
57
|
+
'react/jsx-first-prop-new-line': 0,
|
|
58
|
+
'react/jsx-indent': 0,
|
|
59
|
+
'react/jsx-indent-props': 0,
|
|
60
|
+
'react/jsx-max-props-per-line': 0,
|
|
61
|
+
'react/jsx-newline': 0,
|
|
62
|
+
'react/jsx-one-expression-per-line': 0,
|
|
63
|
+
'react/jsx-props-no-multi-spaces': 0,
|
|
64
|
+
'react/jsx-tag-spacing': 0,
|
|
65
|
+
'react/jsx-wrap-multilines': 0,
|
|
66
|
+
'standard/array-bracket-even-spacing': 0,
|
|
67
|
+
'standard/computed-property-even-spacing': 0,
|
|
68
|
+
'standard/object-curly-even-spacing': 0,
|
|
69
|
+
'unicorn/empty-brace-spaces': 0,
|
|
70
|
+
'unicorn/no-nested-ternary': 0,
|
|
71
|
+
'unicorn/number-literal-case': 0,
|
|
72
|
+
'vue/array-bracket-newline': 0,
|
|
73
|
+
'vue/array-bracket-spacing': 0,
|
|
74
|
+
'vue/array-element-newline': 0,
|
|
75
|
+
'vue/arrow-spacing': 0,
|
|
76
|
+
'vue/block-spacing': 0,
|
|
77
|
+
'vue/block-tag-newline': 0,
|
|
78
|
+
'vue/brace-style': 0,
|
|
79
|
+
'vue/comma-dangle': 0,
|
|
80
|
+
'vue/comma-spacing': 0,
|
|
81
|
+
'vue/comma-style': 0,
|
|
82
|
+
'vue/dot-location': 0,
|
|
83
|
+
'vue/func-call-spacing': 0,
|
|
84
|
+
'vue/html-closing-bracket-newline': 0,
|
|
85
|
+
'vue/html-closing-bracket-spacing': 0,
|
|
86
|
+
'vue/html-end-tags': 0,
|
|
87
|
+
'vue/html-indent': 0,
|
|
88
|
+
'vue/html-quotes': 0,
|
|
89
|
+
'vue/key-spacing': 0,
|
|
90
|
+
'vue/keyword-spacing': 0,
|
|
91
|
+
'vue/max-attributes-per-line': 0,
|
|
92
|
+
'vue/multiline-html-element-content-newline': 0,
|
|
93
|
+
'vue/multiline-ternary': 0,
|
|
94
|
+
'vue/mustache-interpolation-spacing': 0,
|
|
95
|
+
'vue/no-extra-parens': 0,
|
|
96
|
+
'vue/no-multi-spaces': 0,
|
|
97
|
+
'vue/no-spaces-around-equal-signs-in-attribute': 0,
|
|
98
|
+
'vue/object-curly-newline': 0,
|
|
99
|
+
'vue/object-curly-spacing': 0,
|
|
100
|
+
'vue/object-property-newline': 0,
|
|
101
|
+
'vue/operator-linebreak': 0,
|
|
102
|
+
'vue/quote-props': 0,
|
|
103
|
+
'vue/script-indent': 0,
|
|
104
|
+
'vue/singleline-html-element-content-newline': 0,
|
|
105
|
+
'vue/space-in-parens': 0,
|
|
106
|
+
'vue/space-infix-ops': 0,
|
|
107
|
+
'vue/space-unary-ops': 0,
|
|
108
|
+
'vue/template-curly-spacing': 0,
|
|
109
|
+
},
|
|
110
|
+
}
|
package/cfg/eslint-rules.js
CHANGED
|
@@ -118,9 +118,7 @@ module.exports = {
|
|
|
118
118
|
},
|
|
119
119
|
],
|
|
120
120
|
'@typescript-eslint/no-array-constructor': 2,
|
|
121
|
-
'@typescript-eslint/no-empty-interface': 0, // too inconvenient
|
|
122
121
|
'@typescript-eslint/no-extra-non-null-assertion': 2,
|
|
123
|
-
'@typescript-eslint/no-extra-semi': 0, // prettier handles it
|
|
124
122
|
'@typescript-eslint/no-floating-promises': 2,
|
|
125
123
|
'@typescript-eslint/no-inferrable-types': [
|
|
126
124
|
2,
|
|
@@ -130,7 +128,6 @@ module.exports = {
|
|
|
130
128
|
],
|
|
131
129
|
'@typescript-eslint/no-misused-new': 2,
|
|
132
130
|
'@typescript-eslint/no-non-null-asserted-optional-chain': 2,
|
|
133
|
-
'@typescript-eslint/no-this-alias': 0, // buggy
|
|
134
131
|
'@typescript-eslint/no-unused-expressions': 2,
|
|
135
132
|
'@typescript-eslint/prefer-as-const': 2,
|
|
136
133
|
'@typescript-eslint/prefer-for-of': 2,
|
|
@@ -153,7 +150,6 @@ module.exports = {
|
|
|
153
150
|
},
|
|
154
151
|
],
|
|
155
152
|
'constructor-super': 2,
|
|
156
|
-
'eol-last': 2,
|
|
157
153
|
eqeqeq: [2, 'smart'],
|
|
158
154
|
'for-direction': 2,
|
|
159
155
|
'getter-return': 2,
|
|
@@ -191,7 +187,7 @@ module.exports = {
|
|
|
191
187
|
'jsdoc/check-alignment': 2,
|
|
192
188
|
// "jsdoc/check-indentation": "error",
|
|
193
189
|
// 'jsdoc/newline-after-description': 2,
|
|
194
|
-
'no-array-constructor':
|
|
190
|
+
'no-array-constructor': 0,
|
|
195
191
|
'no-async-promise-executor': 2,
|
|
196
192
|
'no-bitwise': 2,
|
|
197
193
|
'no-caller': 2,
|
|
@@ -211,12 +207,11 @@ module.exports = {
|
|
|
211
207
|
'no-duplicate-case': 2,
|
|
212
208
|
'no-empty': [2, { allowEmptyCatch: true }],
|
|
213
209
|
'no-empty-character-class': 2,
|
|
214
|
-
'no-empty-function':
|
|
210
|
+
'no-empty-function': 0,
|
|
215
211
|
'no-empty-pattern': 2,
|
|
216
212
|
'no-eval': 2,
|
|
217
213
|
'no-ex-assign': 2,
|
|
218
214
|
'no-extra-boolean-cast': 2,
|
|
219
|
-
'no-extra-semi': 'off',
|
|
220
215
|
'no-implicit-coercion': [
|
|
221
216
|
2,
|
|
222
217
|
{
|
|
@@ -232,7 +227,6 @@ module.exports = {
|
|
|
232
227
|
'no-invalid-this': 0, // too many false positives in valid classes
|
|
233
228
|
'no-irregular-whitespace': 2,
|
|
234
229
|
'no-misleading-character-class': 2,
|
|
235
|
-
'no-mixed-spaces-and-tabs': 2,
|
|
236
230
|
'no-new-symbol': 2,
|
|
237
231
|
'no-new-wrappers': 2,
|
|
238
232
|
'no-obj-calls': 2,
|
|
@@ -266,18 +260,17 @@ module.exports = {
|
|
|
266
260
|
'rxjs/observable/interval',
|
|
267
261
|
'rxjs/observable/forkJoin',
|
|
268
262
|
],
|
|
263
|
+
curly: [2, 'multi-line'], // this one is an exception that can conflict with prettier
|
|
269
264
|
'no-self-assign': 2,
|
|
270
265
|
'no-setter-return': 2,
|
|
271
266
|
'no-shadow': 0, // it is buggy with TypeScript enums
|
|
272
267
|
'no-shadow-restricted-names': 2,
|
|
273
268
|
'no-sparse-arrays': 2,
|
|
274
269
|
'no-this-before-super': 2,
|
|
275
|
-
'no-throw-literal': 0,
|
|
276
270
|
'@typescript-eslint/only-throw-error': 2,
|
|
277
271
|
'no-undef': 0, // covered by TS, conflicts with typescript-eslint
|
|
278
272
|
'no-undef-init': 2,
|
|
279
273
|
'no-underscore-dangle': 0,
|
|
280
|
-
'no-unexpected-multiline': 0, // prettier
|
|
281
274
|
'no-unreachable': 2,
|
|
282
275
|
'no-unsafe-finally': 2,
|
|
283
276
|
'no-unsafe-negation': 2,
|
|
@@ -348,8 +341,6 @@ module.exports = {
|
|
|
348
341
|
'@typescript-eslint/prefer-find': 2,
|
|
349
342
|
'prefer-promise-reject-errors': 0,
|
|
350
343
|
'@typescript-eslint/prefer-promise-reject-errors': 2,
|
|
351
|
-
'arrow-parens': [2, 'as-needed'],
|
|
352
|
-
'arrow-body-style': 0,
|
|
353
344
|
'unicorn/no-array-callback-reference': 0, // false positives
|
|
354
345
|
'unicorn/no-process-exit': 0,
|
|
355
346
|
'unicorn/no-array-push-push': 0,
|
package/cfg/eslint.config.js
CHANGED
|
@@ -83,10 +83,8 @@ function getConfig() {
|
|
|
83
83
|
...require('./eslint-rules').rules,
|
|
84
84
|
...require('./eslint-vue-rules').rules,
|
|
85
85
|
...(hasJest ? require('./eslint-jest-rules').rules : {}),
|
|
86
|
-
...require('eslint-
|
|
86
|
+
...require('./eslint-prettier-rules').rules, // disable eslint rules already covered by prettier
|
|
87
87
|
...require('./eslint-biome-rules').rules, // disable eslint rules already covered by biome
|
|
88
|
-
// Override prettier-config:
|
|
89
|
-
curly: [2, 'multi-line'],
|
|
90
88
|
},
|
|
91
89
|
}
|
|
92
90
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturalcycles/dev-lib",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.10.1",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"prepare": "husky",
|
|
6
6
|
"tsn-debug": "tsn testScript.ts",
|
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
"@types/node": "^22.0.0",
|
|
30
30
|
"@types/yargs": "^16.0.0",
|
|
31
31
|
"eslint": "^9.0.0",
|
|
32
|
-
"eslint-config-prettier": "^9.0.0",
|
|
33
32
|
"eslint-plugin-import-x": "^3.1.0",
|
|
34
33
|
"eslint-plugin-jest": "^28.0.0",
|
|
35
34
|
"eslint-plugin-jsdoc": "^50.0.0",
|