@fullstacksjs/eslint-config 11.1.23 → 11.3.0
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.
|
@@ -22,17 +22,26 @@ function perfectionist() {
|
|
|
22
22
|
'perfectionist/sort-exports': 'warn',
|
|
23
23
|
'perfectionist/sort-imports': ['warn', {}],
|
|
24
24
|
'perfectionist/sort-interfaces': 'off',
|
|
25
|
-
'perfectionist/sort-intersection-types': 'warn',
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
'perfectionist/sort-intersection-types': ['warn', {
|
|
26
|
+
groups: ['conditional', 'function', 'import', 'intersection', 'keyword', 'literal', 'named', 'object', 'operator', 'tuple', 'union', 'nullish']
|
|
27
|
+
}],
|
|
28
|
+
'perfectionist/sort-jsx-props': ['warn', {
|
|
29
|
+
groups: ['shorthand', 'unknown', 'callback', 'multiline'],
|
|
30
|
+
customGroups: {
|
|
31
|
+
callback: 'on*'
|
|
32
|
+
}
|
|
33
|
+
}],
|
|
34
|
+
'perfectionist/sort-maps': 'off',
|
|
28
35
|
'perfectionist/sort-named-exports': 'warn',
|
|
29
36
|
'perfectionist/sort-named-imports': 'warn',
|
|
30
37
|
'perfectionist/sort-object-types': 'off',
|
|
31
38
|
'perfectionist/sort-objects': 'off',
|
|
32
39
|
'perfectionist/sort-sets': 'warn',
|
|
33
40
|
'perfectionist/sort-svelte-attributes': 'warn',
|
|
34
|
-
'perfectionist/sort-switch-case': '
|
|
35
|
-
'perfectionist/sort-union-types': 'warn',
|
|
41
|
+
'perfectionist/sort-switch-case': 'off',
|
|
42
|
+
'perfectionist/sort-union-types': ['warn', {
|
|
43
|
+
groups: ['conditional', 'function', 'import', 'intersection', 'keyword', 'literal', 'named', 'object', 'operator', 'tuple', 'union', 'nullish']
|
|
44
|
+
}],
|
|
36
45
|
'perfectionist/sort-variable-declarations': 'warn',
|
|
37
46
|
'perfectionist/sort-vue-attributes': 'warn'
|
|
38
47
|
}
|
package/cjs/modules/react.js
CHANGED
|
@@ -24,7 +24,7 @@ function react() {
|
|
|
24
24
|
},
|
|
25
25
|
rules: {
|
|
26
26
|
'@eslint-react/dom/no-children-in-void-dom-elements': 'warn',
|
|
27
|
-
'@eslint-react/dom/no-dangerously-set-innerhtml': '
|
|
27
|
+
'@eslint-react/dom/no-dangerously-set-innerhtml': 'off',
|
|
28
28
|
'@eslint-react/dom/no-dangerously-set-innerhtml-with-children': 'error',
|
|
29
29
|
'@eslint-react/dom/no-find-dom-node': 'error',
|
|
30
30
|
'@eslint-react/dom/no-missing-button-type': 'warn',
|
|
@@ -121,7 +121,10 @@ function typescript(options = {}) {
|
|
|
121
121
|
'@typescript-eslint/no-unused-vars': ['warn', {
|
|
122
122
|
argsIgnorePattern: '^_',
|
|
123
123
|
varsIgnorePattern: '^([iI]gnore(d)?)|(_+)',
|
|
124
|
+
caughtErrorsIgnorePattern: '^_',
|
|
125
|
+
destructuredArrayIgnorePattern: '^_',
|
|
124
126
|
args: 'after-used',
|
|
127
|
+
caughtErrors: 'all',
|
|
125
128
|
ignoreRestSiblings: true
|
|
126
129
|
}],
|
|
127
130
|
'@typescript-eslint/no-use-before-define': ['error', {
|
|
@@ -247,6 +250,7 @@ function typescript(options = {}) {
|
|
|
247
250
|
// Need useless-fragment for JSX return type
|
|
248
251
|
|
|
249
252
|
// Conflicts with @typescript-eslint
|
|
253
|
+
'default-case': 'off',
|
|
250
254
|
'import/named': 'off',
|
|
251
255
|
'import/namespace': 'off',
|
|
252
256
|
'import/default': 'off',
|
package/package.json
CHANGED
|
@@ -14,17 +14,59 @@ function perfectionist() {
|
|
|
14
14
|
'perfectionist/sort-exports': 'warn',
|
|
15
15
|
'perfectionist/sort-imports': ['warn', {}],
|
|
16
16
|
'perfectionist/sort-interfaces': 'off',
|
|
17
|
-
'perfectionist/sort-intersection-types':
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
'perfectionist/sort-intersection-types': [
|
|
18
|
+
'warn',
|
|
19
|
+
{
|
|
20
|
+
groups: [
|
|
21
|
+
'conditional',
|
|
22
|
+
'function',
|
|
23
|
+
'import',
|
|
24
|
+
'intersection',
|
|
25
|
+
'keyword',
|
|
26
|
+
'literal',
|
|
27
|
+
'named',
|
|
28
|
+
'object',
|
|
29
|
+
'operator',
|
|
30
|
+
'tuple',
|
|
31
|
+
'union',
|
|
32
|
+
'nullish',
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
'perfectionist/sort-jsx-props': [
|
|
37
|
+
'warn',
|
|
38
|
+
{
|
|
39
|
+
groups: ['shorthand', 'unknown', 'callback', 'multiline'],
|
|
40
|
+
customGroups: { callback: 'on*' },
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
'perfectionist/sort-maps': 'off',
|
|
20
44
|
'perfectionist/sort-named-exports': 'warn',
|
|
21
45
|
'perfectionist/sort-named-imports': 'warn',
|
|
22
46
|
'perfectionist/sort-object-types': 'off',
|
|
23
47
|
'perfectionist/sort-objects': 'off',
|
|
24
48
|
'perfectionist/sort-sets': 'warn',
|
|
25
49
|
'perfectionist/sort-svelte-attributes': 'warn',
|
|
26
|
-
'perfectionist/sort-switch-case': '
|
|
27
|
-
'perfectionist/sort-union-types':
|
|
50
|
+
'perfectionist/sort-switch-case': 'off',
|
|
51
|
+
'perfectionist/sort-union-types': [
|
|
52
|
+
'warn',
|
|
53
|
+
{
|
|
54
|
+
groups: [
|
|
55
|
+
'conditional',
|
|
56
|
+
'function',
|
|
57
|
+
'import',
|
|
58
|
+
'intersection',
|
|
59
|
+
'keyword',
|
|
60
|
+
'literal',
|
|
61
|
+
'named',
|
|
62
|
+
'object',
|
|
63
|
+
'operator',
|
|
64
|
+
'tuple',
|
|
65
|
+
'union',
|
|
66
|
+
'nullish',
|
|
67
|
+
],
|
|
68
|
+
},
|
|
69
|
+
],
|
|
28
70
|
'perfectionist/sort-variable-declarations': 'warn',
|
|
29
71
|
'perfectionist/sort-vue-attributes': 'warn',
|
|
30
72
|
},
|
package/src/modules/react.mjs
CHANGED
|
@@ -18,7 +18,7 @@ function react() {
|
|
|
18
18
|
},
|
|
19
19
|
rules: {
|
|
20
20
|
'@eslint-react/dom/no-children-in-void-dom-elements': 'warn',
|
|
21
|
-
'@eslint-react/dom/no-dangerously-set-innerhtml': '
|
|
21
|
+
'@eslint-react/dom/no-dangerously-set-innerhtml': 'off',
|
|
22
22
|
'@eslint-react/dom/no-dangerously-set-innerhtml-with-children': 'error',
|
|
23
23
|
'@eslint-react/dom/no-find-dom-node': 'error',
|
|
24
24
|
'@eslint-react/dom/no-missing-button-type': 'warn',
|
|
@@ -110,7 +110,15 @@ function typescript(options = {}) {
|
|
|
110
110
|
'@typescript-eslint/no-unused-expressions': 'error',
|
|
111
111
|
'@typescript-eslint/no-unused-vars': [
|
|
112
112
|
'warn',
|
|
113
|
-
{
|
|
113
|
+
{
|
|
114
|
+
argsIgnorePattern: '^_',
|
|
115
|
+
varsIgnorePattern: '^([iI]gnore(d)?)|(_+)',
|
|
116
|
+
caughtErrorsIgnorePattern: '^_',
|
|
117
|
+
destructuredArrayIgnorePattern: '^_',
|
|
118
|
+
args: 'after-used',
|
|
119
|
+
caughtErrors: 'all',
|
|
120
|
+
ignoreRestSiblings: true,
|
|
121
|
+
},
|
|
114
122
|
],
|
|
115
123
|
'@typescript-eslint/no-use-before-define': ['error', { functions: false, classes: true }],
|
|
116
124
|
'@typescript-eslint/no-useless-constructor': 'error',
|
|
@@ -214,6 +222,7 @@ function typescript(options = {}) {
|
|
|
214
222
|
'react/jsx-no-useless-fragment': 'off', // Need useless-fragment for JSX return type
|
|
215
223
|
|
|
216
224
|
// Conflicts with @typescript-eslint
|
|
225
|
+
'default-case': 'off',
|
|
217
226
|
'import/named': 'off',
|
|
218
227
|
'import/namespace': 'off',
|
|
219
228
|
'import/default': 'off',
|