@fullstacksjs/eslint-config 14.2.0 → 14.4.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.
- package/cjs/modules/perfectionist.js +6 -2
- package/cjs/modules/playwright.js +38 -9
- package/cjs/modules/react.js +34 -51
- package/cjs/modules/regex.js +19 -0
- package/cjs/modules/storybook.js +1 -0
- package/cjs/modules/tailwind.js +11 -5
- package/cjs/modules/vitest.js +2 -2
- package/package.json +30 -29
- package/src/modules/perfectionist.mjs +6 -2
- package/src/modules/playwright.mjs +38 -9
- package/src/modules/react.mjs +36 -52
- package/src/modules/regex.mjs +19 -0
- package/src/modules/storybook.mjs +1 -0
- package/src/modules/tailwind.mjs +12 -5
- package/src/modules/vitest.mjs +2 -2
|
@@ -16,13 +16,17 @@ function perfectionist() {
|
|
|
16
16
|
},
|
|
17
17
|
rules: {
|
|
18
18
|
'perfectionist/sort-array-includes': 'warn',
|
|
19
|
+
'perfectionist/sort-arrays': 'off',
|
|
19
20
|
'perfectionist/sort-classes': 'off',
|
|
21
|
+
'perfectionist/sort-decorators': 'off',
|
|
20
22
|
'perfectionist/sort-enums': 'off',
|
|
21
|
-
'perfectionist/sort-exports': 'warn',
|
|
22
23
|
'perfectionist/sort-export-attributes': 'warn',
|
|
23
|
-
'perfectionist/sort-
|
|
24
|
+
'perfectionist/sort-exports': 'warn',
|
|
25
|
+
'perfectionist/sort-heritage-clauses': 'warn',
|
|
24
26
|
'perfectionist/sort-import-attributes': 'warn',
|
|
27
|
+
'perfectionist/sort-imports': 'warn',
|
|
25
28
|
'perfectionist/sort-interfaces': 'off',
|
|
29
|
+
'perfectionist/sort-modules': 'off',
|
|
26
30
|
'perfectionist/sort-intersection-types': ['warn', {
|
|
27
31
|
groups: ['conditional', 'function', 'import', 'intersection', 'keyword', 'literal', 'named', 'object', 'operator', 'tuple', 'union', 'nullish']
|
|
28
32
|
}],
|
|
@@ -17,34 +17,63 @@ function playwright() {
|
|
|
17
17
|
rules: {
|
|
18
18
|
'playwright/consistent-spacing-between-blocks': 'warn',
|
|
19
19
|
'playwright/expect-expect': 'error',
|
|
20
|
-
'playwright/
|
|
20
|
+
'playwright/max-expects': 'off',
|
|
21
21
|
'playwright/max-nested-describe': ['warn', {
|
|
22
22
|
max: 5
|
|
23
23
|
}],
|
|
24
|
+
'playwright/missing-playwright-await': 'error',
|
|
25
|
+
'playwright/no-commented-out-tests': 'warn',
|
|
26
|
+
'playwright/no-conditional-expect': 'warn',
|
|
27
|
+
'playwright/no-conditional-in-test': 'warn',
|
|
24
28
|
'playwright/no-duplicate-hooks': 'error',
|
|
29
|
+
'playwright/no-duplicate-slow': 'off',
|
|
25
30
|
'playwright/no-element-handle': 'warn',
|
|
26
31
|
'playwright/no-eval': 'warn',
|
|
27
|
-
'playwright/no-page-pause': 'warn',
|
|
28
|
-
'playwright/no-slowed-test': 'warn',
|
|
29
|
-
'playwright/no-skipped-test': 'warn',
|
|
30
|
-
'playwright/no-standalone-expect': 'warn',
|
|
31
32
|
'playwright/no-focused-test': 'warn',
|
|
32
33
|
'playwright/no-force-option': 'warn',
|
|
33
|
-
'playwright/no-
|
|
34
|
-
'playwright/no-
|
|
34
|
+
'playwright/no-get-by-title': 'off',
|
|
35
|
+
'playwright/no-hooks': 'off',
|
|
35
36
|
'playwright/no-nested-step': 'warn',
|
|
36
37
|
'playwright/no-networkidle': 'warn',
|
|
37
|
-
'playwright/no-
|
|
38
|
+
'playwright/no-nth-methods': 'off',
|
|
39
|
+
'playwright/no-page-pause': 'warn',
|
|
40
|
+
'playwright/no-raw-locators': 'off',
|
|
41
|
+
'playwright/no-restricted-locators': 'off',
|
|
42
|
+
'playwright/no-restricted-matchers': 'off',
|
|
43
|
+
'playwright/no-restricted-roles': 'off',
|
|
44
|
+
'playwright/no-skipped-test': 'warn',
|
|
45
|
+
'playwright/no-slowed-test': 'warn',
|
|
46
|
+
'playwright/no-standalone-expect': 'warn',
|
|
38
47
|
'playwright/no-unsafe-references': 'warn',
|
|
39
|
-
'playwright/no-useless-not': 'warn',
|
|
40
48
|
'playwright/no-unused-locators': 'warn',
|
|
49
|
+
'playwright/no-useless-await': 'error',
|
|
50
|
+
'playwright/no-useless-not': 'warn',
|
|
41
51
|
'playwright/no-wait-for-navigation': 'warn',
|
|
42
52
|
'playwright/no-wait-for-selector': 'warn',
|
|
43
53
|
'playwright/no-wait-for-timeout': 'warn',
|
|
54
|
+
'playwright/prefer-comparison-matcher': 'off',
|
|
55
|
+
'playwright/prefer-equality-matcher': 'off',
|
|
56
|
+
'playwright/prefer-hooks-in-order': 'off',
|
|
57
|
+
'playwright/prefer-hooks-on-top': 'off',
|
|
58
|
+
'playwright/prefer-locator': 'off',
|
|
59
|
+
'playwright/prefer-lowercase-title': 'off',
|
|
60
|
+
'playwright/prefer-native-locators': 'off',
|
|
61
|
+
'playwright/prefer-strict-equal': 'off',
|
|
62
|
+
'playwright/prefer-to-be': 'off',
|
|
63
|
+
'playwright/prefer-to-contain': 'off',
|
|
64
|
+
'playwright/prefer-to-have-count': 'off',
|
|
65
|
+
'playwright/prefer-to-have-length': 'off',
|
|
44
66
|
'playwright/prefer-web-first-assertions': 'warn',
|
|
67
|
+
'playwright/require-hook': 'off',
|
|
68
|
+
'playwright/require-soft-assertions': 'off',
|
|
69
|
+
'playwright/require-tags': 'off',
|
|
70
|
+
'playwright/require-to-pass-timeout': 'off',
|
|
71
|
+
'playwright/require-to-throw-message': 'off',
|
|
72
|
+
'playwright/require-top-level-describe': 'off',
|
|
45
73
|
'playwright/valid-describe-callback': 'warn',
|
|
46
74
|
'playwright/valid-expect-in-promise': 'warn',
|
|
47
75
|
'playwright/valid-expect': 'warn',
|
|
76
|
+
'playwright/valid-test-tags': 'off',
|
|
48
77
|
'playwright/valid-title': 'warn'
|
|
49
78
|
}
|
|
50
79
|
};
|
package/cjs/modules/react.js
CHANGED
|
@@ -39,37 +39,33 @@ function react(options = {}) {
|
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
rules: {
|
|
42
|
-
'@eslint-react/dom
|
|
43
|
-
'@eslint-react/dom
|
|
44
|
-
'@eslint-react/dom
|
|
45
|
-
'@eslint-react/dom
|
|
46
|
-
'@eslint-react/dom
|
|
47
|
-
'@eslint-react/dom
|
|
48
|
-
'@eslint-react/dom
|
|
49
|
-
'@eslint-react/dom
|
|
50
|
-
'@eslint-react/dom
|
|
51
|
-
'@eslint-react/dom
|
|
52
|
-
'@eslint-react/dom
|
|
53
|
-
'@eslint-react/dom
|
|
54
|
-
'@eslint-react/dom
|
|
55
|
-
'@eslint-react/dom
|
|
56
|
-
'@eslint-react/dom
|
|
57
|
-
'@eslint-react/jsx-dollar': 'warn',
|
|
58
|
-
'@eslint-react/jsx-key-before-spread': 'error',
|
|
59
|
-
'@eslint-react/jsx-no-undef': 'off',
|
|
60
|
-
'@eslint-react/jsx-no-iife': 'warn',
|
|
61
|
-
'@eslint-react/jsx-no-duplicate-props': 'error',
|
|
42
|
+
'@eslint-react/dom-no-void-elements-with-children': 'warn',
|
|
43
|
+
'@eslint-react/dom-no-dangerously-set-innerhtml-with-children': 'error',
|
|
44
|
+
'@eslint-react/dom-no-dangerously-set-innerhtml': 'off',
|
|
45
|
+
'@eslint-react/dom-no-find-dom-node': 'error',
|
|
46
|
+
'@eslint-react/dom-no-flush-sync': 'off',
|
|
47
|
+
'@eslint-react/dom-no-use-form-state': 'warn',
|
|
48
|
+
'@eslint-react/dom-no-hydrate': 'warn',
|
|
49
|
+
'@eslint-react/dom-no-missing-button-type': 'warn',
|
|
50
|
+
'@eslint-react/dom-no-missing-iframe-sandbox': 'warn',
|
|
51
|
+
'@eslint-react/dom-no-render-return-value': 'error',
|
|
52
|
+
'@eslint-react/dom-no-render': 'warn',
|
|
53
|
+
'@eslint-react/dom-no-script-url': 'warn',
|
|
54
|
+
'@eslint-react/dom-no-string-style-prop': 'error',
|
|
55
|
+
'@eslint-react/dom-no-unsafe-iframe-sandbox': 'warn',
|
|
56
|
+
'@eslint-react/dom-no-unsafe-target-blank': 'warn',
|
|
62
57
|
'@eslint-react/jsx-no-comment-textnodes': 'warn',
|
|
63
|
-
'@eslint-react/jsx-
|
|
64
|
-
'@eslint-react/jsx-
|
|
65
|
-
'@eslint-react/jsx-
|
|
58
|
+
'@eslint-react/jsx-no-children-prop': 'warn',
|
|
59
|
+
'@eslint-react/jsx-no-children-prop-with-children': 'warn',
|
|
60
|
+
'@eslint-react/jsx-no-key-after-spread': 'error',
|
|
61
|
+
'@eslint-react/jsx-no-useless-fragment': 'warn',
|
|
62
|
+
'@eslint-react/jsx-no-namespace': 'error',
|
|
66
63
|
'@eslint-react/no-access-state-in-setstate': 'error',
|
|
67
64
|
'@eslint-react/no-array-index-key': 'warn',
|
|
68
65
|
'@eslint-react/no-children-count': 'warn',
|
|
69
66
|
'@eslint-react/no-children-for-each': 'warn',
|
|
70
67
|
'@eslint-react/no-children-map': 'warn',
|
|
71
68
|
'@eslint-react/no-children-only': 'warn',
|
|
72
|
-
'@eslint-react/no-children-prop': 'warn',
|
|
73
69
|
'@eslint-react/no-children-to-array': 'warn',
|
|
74
70
|
'@eslint-react/no-clone-element': 'warn',
|
|
75
71
|
'@eslint-react/no-component-will-mount': 'error',
|
|
@@ -85,11 +81,9 @@ function react(options = {}) {
|
|
|
85
81
|
'@eslint-react/no-misused-capture-owner-stack': 'error',
|
|
86
82
|
'@eslint-react/no-nested-component-definitions': 'warn',
|
|
87
83
|
'@eslint-react/no-nested-lazy-component-declarations': 'error',
|
|
88
|
-
'@eslint-react/no-redundant-should-component-update': 'error',
|
|
89
84
|
'@eslint-react/no-set-state-in-component-did-mount': 'warn',
|
|
90
85
|
'@eslint-react/no-set-state-in-component-did-update': 'warn',
|
|
91
86
|
'@eslint-react/no-set-state-in-component-will-update': 'warn',
|
|
92
|
-
'@eslint-react/dom/no-string-style-prop': 'error',
|
|
93
87
|
'@eslint-react/no-unsafe-component-will-mount': 'warn',
|
|
94
88
|
'@eslint-react/no-unsafe-component-will-receive-props': 'warn',
|
|
95
89
|
'@eslint-react/no-unsafe-component-will-update': 'warn',
|
|
@@ -97,33 +91,22 @@ function react(options = {}) {
|
|
|
97
91
|
'@eslint-react/no-unstable-default-props': 'error',
|
|
98
92
|
'@eslint-react/no-unused-class-component-members': 'warn',
|
|
99
93
|
'@eslint-react/no-unused-state': 'warn',
|
|
100
|
-
...(0, _conditions.predicate)(projectService, {
|
|
101
|
-
'@eslint-react/no-implicit-key': 'error',
|
|
102
|
-
'@eslint-react/no-unused-props': 'warn'
|
|
103
|
-
}),
|
|
104
|
-
'@eslint-react/no-useless-forward-ref': 'off',
|
|
105
|
-
'@eslint-react/no-useless-fragment': 'warn',
|
|
106
94
|
'@eslint-react/no-use-context': 'warn',
|
|
107
|
-
'@eslint-react/no-unnecessary-use-callback': 'warn',
|
|
108
|
-
'@eslint-react/no-unnecessary-use-memo': 'warn',
|
|
109
95
|
'@eslint-react/no-unnecessary-use-prefix': 'warn',
|
|
110
|
-
'@eslint-react/
|
|
111
|
-
'@eslint-react/
|
|
112
|
-
'@eslint-react/
|
|
113
|
-
'@eslint-react/
|
|
114
|
-
'@eslint-react/naming-convention/component-name': 'warn',
|
|
115
|
-
'@eslint-react/naming-convention/context-name': 'warn',
|
|
116
|
-
'@eslint-react/naming-convention/id-name': 'warn',
|
|
117
|
-
'@eslint-react/naming-convention/ref-name': 'warn',
|
|
118
|
-
'@eslint-react/naming-convention/use-state': ['warn', {
|
|
96
|
+
'@eslint-react/naming-convention-context-name': 'warn',
|
|
97
|
+
'@eslint-react/naming-convention-id-name': 'warn',
|
|
98
|
+
'@eslint-react/naming-convention-ref-name': 'warn',
|
|
99
|
+
'@eslint-react/use-state': ['warn', {
|
|
119
100
|
enforceAssignment: true,
|
|
120
|
-
enforceSetterName: false
|
|
101
|
+
enforceSetterName: false,
|
|
102
|
+
enforceLazyInitialization: true
|
|
121
103
|
}],
|
|
122
|
-
'@eslint-react/web-api
|
|
123
|
-
'@eslint-react/web-api
|
|
124
|
-
'@eslint-react/web-api
|
|
125
|
-
'@eslint-react/web-api
|
|
126
|
-
'@eslint-react/
|
|
104
|
+
'@eslint-react/web-api-no-leaked-timeout': 'error',
|
|
105
|
+
'@eslint-react/web-api-no-leaked-event-listener': 'error',
|
|
106
|
+
'@eslint-react/web-api-no-leaked-interval': 'error',
|
|
107
|
+
'@eslint-react/web-api-no-leaked-resize-observer': 'error',
|
|
108
|
+
'@eslint-react/web-api-no-leaked-fetch': 'error',
|
|
109
|
+
'@eslint-react/rsc-function-definition': 'error',
|
|
127
110
|
'react-hooks/rules-of-hooks': 'error',
|
|
128
111
|
'react-hooks/exhaustive-deps': 'warn',
|
|
129
112
|
'react-hooks/config': 'error',
|
|
@@ -135,9 +118,9 @@ function react(options = {}) {
|
|
|
135
118
|
'react-hooks/preserve-manual-memoization': 'error',
|
|
136
119
|
'react-hooks/purity': 'error',
|
|
137
120
|
'react-hooks/refs': 'error',
|
|
138
|
-
'react-hooks/set-state-in-effect': 'error',
|
|
121
|
+
'react-hooks/set-state-in-effect': (0, _conditions.strict)('error'),
|
|
139
122
|
'react-hooks/set-state-in-render': 'error',
|
|
140
|
-
'react-hooks/static-components': 'error',
|
|
123
|
+
'react-hooks/static-components': (0, _conditions.strict)('error'),
|
|
141
124
|
'react-hooks/unsupported-syntax': 'warn',
|
|
142
125
|
'react-hooks/use-memo': 'error',
|
|
143
126
|
'react-hooks/incompatible-library': 'warn',
|
package/cjs/modules/regex.js
CHANGED
|
@@ -24,10 +24,13 @@ function regex(options = {}) {
|
|
|
24
24
|
rules: {
|
|
25
25
|
'regexp/confusing-quantifier': 'warn',
|
|
26
26
|
'regexp/control-character-escape': 'error',
|
|
27
|
+
'regexp/grapheme-string-literal': 'off',
|
|
28
|
+
'regexp/hexadecimal-escape': 'warn',
|
|
27
29
|
'regexp/letter-case': 'warn',
|
|
28
30
|
'regexp/match-any': 'error',
|
|
29
31
|
'regexp/negation': 'error',
|
|
30
32
|
'regexp/no-contradiction-with-assertion': 'error',
|
|
33
|
+
'regexp/no-control-character': 'off',
|
|
31
34
|
'regexp/no-dupe-characters-character-class': 'error',
|
|
32
35
|
'regexp/no-dupe-disjunctions': 'error',
|
|
33
36
|
'regexp/no-empty-alternative': 'warn',
|
|
@@ -47,9 +50,12 @@ function regex(options = {}) {
|
|
|
47
50
|
'regexp/no-missing-g-flag': 'error',
|
|
48
51
|
'regexp/no-non-standard-flag': 'error',
|
|
49
52
|
'regexp/no-obscure-range': 'error',
|
|
53
|
+
'regexp/no-octal': 'off',
|
|
50
54
|
'regexp/no-optional-assertion': 'error',
|
|
51
55
|
'regexp/no-potentially-useless-backreference': 'warn',
|
|
56
|
+
'regexp/no-standalone-backslash': 'warn',
|
|
52
57
|
'regexp/no-super-linear-backtracking': 'error',
|
|
58
|
+
'regexp/no-super-linear-move': 'off',
|
|
53
59
|
'regexp/no-trivially-nested-assertion': 'error',
|
|
54
60
|
'regexp/no-trivially-nested-quantifier': 'error',
|
|
55
61
|
'regexp/no-unused-capturing-group': 'error',
|
|
@@ -71,19 +77,32 @@ function regex(options = {}) {
|
|
|
71
77
|
'regexp/optimal-quantifier-concatenation': 'error',
|
|
72
78
|
'regexp/prefer-character-class': 'error',
|
|
73
79
|
'regexp/prefer-d': 'error',
|
|
80
|
+
'regexp/prefer-escape-replacement-dollar-char': 'warn',
|
|
81
|
+
'regexp/prefer-lookaround': 'off',
|
|
82
|
+
'regexp/prefer-named-backreference': 'warn',
|
|
83
|
+
'regexp/prefer-named-capture-group': 'off',
|
|
84
|
+
'regexp/prefer-named-replacement': 'off',
|
|
74
85
|
'regexp/prefer-plus-quantifier': 'error',
|
|
75
86
|
'regexp/prefer-predefined-assertion': 'error',
|
|
87
|
+
'regexp/prefer-quantifier': 'off',
|
|
76
88
|
'regexp/prefer-question-quantifier': 'error',
|
|
77
89
|
'regexp/prefer-range': 'error',
|
|
90
|
+
'regexp/prefer-regexp-exec': 'warn',
|
|
91
|
+
'regexp/prefer-regexp-test': 'warn',
|
|
92
|
+
'regexp/prefer-result-array-groups': 'warn',
|
|
78
93
|
'regexp/prefer-set-operation': 'error',
|
|
79
94
|
'regexp/prefer-star-quantifier': 'error',
|
|
80
95
|
'regexp/prefer-unicode-codepoint-escapes': 'error',
|
|
81
96
|
'regexp/prefer-w': 'error',
|
|
97
|
+
'regexp/require-unicode-regexp': 'off',
|
|
98
|
+
'regexp/require-unicode-sets-regexp': 'off',
|
|
82
99
|
'regexp/simplify-set-operations': 'error',
|
|
83
100
|
'regexp/sort-alternatives': 'warn',
|
|
84
101
|
'regexp/sort-character-class-elements': 'warn',
|
|
85
102
|
'regexp/sort-flags': 'warn',
|
|
86
103
|
'regexp/strict': 'error',
|
|
104
|
+
'regexp/unicode-escape': 'warn',
|
|
105
|
+
'regexp/unicode-property': 'warn',
|
|
87
106
|
'regexp/use-ignore-case': 'error',
|
|
88
107
|
'no-invalid-regexp': 'off',
|
|
89
108
|
'no-useless-backreference': 'off',
|
package/cjs/modules/storybook.js
CHANGED
|
@@ -21,6 +21,7 @@ function storybook() {
|
|
|
21
21
|
'storybook/hierarchy-separator': 'warn',
|
|
22
22
|
'storybook/meta-satisfies-type': 'warn',
|
|
23
23
|
'storybook/no-redundant-story-name': 'warn',
|
|
24
|
+
'storybook/no-renderer-packages': 'warn',
|
|
24
25
|
'storybook/no-uninstalled-addons': 'error',
|
|
25
26
|
'storybook/prefer-pascal-case': 'warn',
|
|
26
27
|
'storybook/story-exports': 'error',
|
package/cjs/modules/tailwind.js
CHANGED
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
|
|
7
|
+
var _conditions = require("../utils/conditions.js");
|
|
7
8
|
/**
|
|
8
9
|
* @param { import('../index.js').Options } options
|
|
9
10
|
* @return { Promise<import('eslint').Linter.Config> }
|
|
@@ -24,15 +25,20 @@ async function tailwind(options = {}) {
|
|
|
24
25
|
}
|
|
25
26
|
},
|
|
26
27
|
rules: {
|
|
27
|
-
'better-tailwindcss/no-duplicate-classes': 'error',
|
|
28
|
-
'better-tailwindcss/no-deprecated-classes': 'warn',
|
|
29
|
-
'better-tailwindcss/no-conflicting-classes': 'error',
|
|
30
|
-
'better-tailwindcss/no-unnecessary-whitespace': 'warn',
|
|
31
28
|
'better-tailwindcss/enforce-canonical-classes': 'warn',
|
|
32
29
|
'better-tailwindcss/enforce-consistent-class-order': 'warn',
|
|
30
|
+
'better-tailwindcss/enforce-consistent-important-position': 'warn',
|
|
31
|
+
'better-tailwindcss/enforce-consistent-line-wrapping': 'off',
|
|
33
32
|
'better-tailwindcss/enforce-consistent-variable-syntax': 'error',
|
|
33
|
+
'better-tailwindcss/enforce-consistent-variant-order': 'warn',
|
|
34
|
+
'better-tailwindcss/enforce-logical-properties': (0, _conditions.strict)('warn'),
|
|
34
35
|
'better-tailwindcss/enforce-shorthand-classes': 'warn',
|
|
35
|
-
'better-tailwindcss/
|
|
36
|
+
'better-tailwindcss/no-conflicting-classes': 'error',
|
|
37
|
+
'better-tailwindcss/no-deprecated-classes': 'warn',
|
|
38
|
+
'better-tailwindcss/no-duplicate-classes': 'error',
|
|
39
|
+
'better-tailwindcss/no-restricted-classes': 'warn',
|
|
40
|
+
'better-tailwindcss/no-unknown-classes': (0, _conditions.strict)('warn'),
|
|
41
|
+
'better-tailwindcss/no-unnecessary-whitespace': 'warn'
|
|
36
42
|
}
|
|
37
43
|
};
|
|
38
44
|
}
|
package/cjs/modules/vitest.js
CHANGED
|
@@ -78,7 +78,7 @@ function vitest() {
|
|
|
78
78
|
'vitest/prefer-hooks-in-order': 'warn',
|
|
79
79
|
'vitest/prefer-hooks-on-top': 'warn',
|
|
80
80
|
'vitest/prefer-importing-vitest-globals': 'off',
|
|
81
|
-
'vitest/prefer-lowercase-title': '
|
|
81
|
+
'vitest/prefer-lowercase-title': 'off',
|
|
82
82
|
'vitest/prefer-mock-promise-shorthand': 'warn',
|
|
83
83
|
'vitest/prefer-mock-return-shorthand': 'warn',
|
|
84
84
|
'vitest/prefer-snapshot-hint': 'warn',
|
|
@@ -93,7 +93,7 @@ function vitest() {
|
|
|
93
93
|
'vitest/prefer-to-have-length': 'warn',
|
|
94
94
|
'vitest/prefer-todo': 'warn',
|
|
95
95
|
'vitest/prefer-vi-mocked': 'warn',
|
|
96
|
-
'vitest/require-hook': '
|
|
96
|
+
'vitest/require-hook': 'off',
|
|
97
97
|
'vitest/require-local-test-context-for-concurrent-snapshots': 'warn',
|
|
98
98
|
'vitest/require-mock-type-parameters': 'off',
|
|
99
99
|
'vitest/require-to-throw-message': 'warn',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fullstacksjs/eslint-config",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.4.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "fullstacks <fullstacksjs@gmail.com>",
|
|
6
6
|
"description": "fullstacks eslint config",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"src",
|
|
17
17
|
"cjs"
|
|
18
18
|
],
|
|
19
|
-
"packageManager": "npm@11.
|
|
19
|
+
"packageManager": "npm@11.13.0",
|
|
20
20
|
"scripts": {
|
|
21
21
|
"lint": "eslint .",
|
|
22
22
|
"spell": "cspell ./* --no-progress",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"postbuild": "./postbuild",
|
|
26
26
|
"prepublishOnly": "pinst --disable",
|
|
27
27
|
"postpublish": "pinst --enable",
|
|
28
|
+
"check:rules": "node scripts/check-missing-rules.mjs",
|
|
28
29
|
"pre-commit": "npm run test && lint-staged && npm run spell"
|
|
29
30
|
},
|
|
30
31
|
"main": "./cjs/index.js",
|
|
@@ -37,46 +38,46 @@
|
|
|
37
38
|
}
|
|
38
39
|
},
|
|
39
40
|
"dependencies": {
|
|
40
|
-
"@eslint-react/eslint-plugin": "
|
|
41
|
-
"@eslint/compat": "2.0
|
|
42
|
-
"@next/eslint-plugin-next": "16.2.
|
|
43
|
-
"@stylistic/eslint-plugin": "5.
|
|
44
|
-
"@vitest/eslint-plugin": "1.6.
|
|
41
|
+
"@eslint-react/eslint-plugin": "5.8.3",
|
|
42
|
+
"@eslint/compat": "2.1.0",
|
|
43
|
+
"@next/eslint-plugin-next": "16.2.6",
|
|
44
|
+
"@stylistic/eslint-plugin": "5.10.0",
|
|
45
|
+
"@vitest/eslint-plugin": "1.6.17",
|
|
45
46
|
"deepmerge": "4.3.1",
|
|
46
|
-
"eslint-plugin-better-tailwindcss": "4.
|
|
47
|
-
"eslint-plugin-cypress": "
|
|
47
|
+
"eslint-plugin-better-tailwindcss": "4.5.0",
|
|
48
|
+
"eslint-plugin-cypress": "6.4.1",
|
|
48
49
|
"eslint-plugin-import-x": "4.16.2",
|
|
49
|
-
"eslint-plugin-jest": "29.15.
|
|
50
|
+
"eslint-plugin-jest": "29.15.2",
|
|
50
51
|
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
51
|
-
"eslint-plugin-n": "
|
|
52
|
-
"eslint-plugin-perfectionist": "5.
|
|
53
|
-
"eslint-plugin-playwright": "2.
|
|
52
|
+
"eslint-plugin-n": "18.0.1",
|
|
53
|
+
"eslint-plugin-perfectionist": "5.9.0",
|
|
54
|
+
"eslint-plugin-playwright": "2.10.4",
|
|
54
55
|
"eslint-plugin-prettier": "5.5.5",
|
|
55
|
-
"eslint-plugin-promise": "7.
|
|
56
|
-
"eslint-plugin-react-hooks": "7.
|
|
57
|
-
"eslint-plugin-regexp": "3.
|
|
58
|
-
"eslint-plugin-storybook": "10.
|
|
59
|
-
"globals": "17.
|
|
60
|
-
"local-pkg": "1.1
|
|
61
|
-
"typescript-eslint": "8.
|
|
56
|
+
"eslint-plugin-promise": "7.3.0",
|
|
57
|
+
"eslint-plugin-react-hooks": "7.1.1",
|
|
58
|
+
"eslint-plugin-regexp": "3.1.0",
|
|
59
|
+
"eslint-plugin-storybook": "10.4.0",
|
|
60
|
+
"globals": "17.6.0",
|
|
61
|
+
"local-pkg": "1.2.1",
|
|
62
|
+
"typescript-eslint": "8.59.4"
|
|
62
63
|
},
|
|
63
64
|
"devDependencies": {
|
|
64
65
|
"@eslint/eslintrc": "3.3.5",
|
|
65
|
-
"@eslint/js": "
|
|
66
|
-
"@semantic-release/github": "12.0.
|
|
66
|
+
"@eslint/js": "10.0.1",
|
|
67
|
+
"@semantic-release/github": "12.0.8",
|
|
67
68
|
"@semantic-release/npm": "13.1.5",
|
|
68
|
-
"@semantic-release/release-notes-generator": "14.1.
|
|
69
|
+
"@semantic-release/release-notes-generator": "14.1.1",
|
|
69
70
|
"@types/eslint": "9.6.1",
|
|
70
71
|
"cspell": "10.0.0",
|
|
71
|
-
"eslint": "10.
|
|
72
|
+
"eslint": "10.4.0",
|
|
72
73
|
"husky": "9.1.7",
|
|
73
|
-
"jest": "30.
|
|
74
|
-
"lint-staged": "
|
|
74
|
+
"jest": "30.4.2",
|
|
75
|
+
"lint-staged": "17.0.5",
|
|
75
76
|
"pinst": "3.0.0",
|
|
76
|
-
"prettier": "3.8.
|
|
77
|
+
"prettier": "3.8.3",
|
|
77
78
|
"semantic-release": "25.0.3",
|
|
78
|
-
"storybook": "10.
|
|
79
|
-
"typescript": "6.0.
|
|
79
|
+
"storybook": "10.4.0",
|
|
80
|
+
"typescript": "6.0.3",
|
|
80
81
|
"unbuild": "3.6.1"
|
|
81
82
|
},
|
|
82
83
|
"peerDependencies": {
|
|
@@ -8,13 +8,17 @@ function perfectionist() {
|
|
|
8
8
|
plugins: { perfectionist: plugin },
|
|
9
9
|
rules: {
|
|
10
10
|
'perfectionist/sort-array-includes': 'warn',
|
|
11
|
+
'perfectionist/sort-arrays': 'off',
|
|
11
12
|
'perfectionist/sort-classes': 'off',
|
|
13
|
+
'perfectionist/sort-decorators': 'off',
|
|
12
14
|
'perfectionist/sort-enums': 'off',
|
|
13
|
-
'perfectionist/sort-exports': 'warn',
|
|
14
15
|
'perfectionist/sort-export-attributes': 'warn',
|
|
15
|
-
'perfectionist/sort-
|
|
16
|
+
'perfectionist/sort-exports': 'warn',
|
|
17
|
+
'perfectionist/sort-heritage-clauses': 'warn',
|
|
16
18
|
'perfectionist/sort-import-attributes': 'warn',
|
|
19
|
+
'perfectionist/sort-imports': 'warn',
|
|
17
20
|
'perfectionist/sort-interfaces': 'off',
|
|
21
|
+
'perfectionist/sort-modules': 'off',
|
|
18
22
|
'perfectionist/sort-intersection-types': [
|
|
19
23
|
'warn',
|
|
20
24
|
{
|
|
@@ -10,32 +10,61 @@ function playwright() {
|
|
|
10
10
|
rules: {
|
|
11
11
|
'playwright/consistent-spacing-between-blocks': 'warn',
|
|
12
12
|
'playwright/expect-expect': 'error',
|
|
13
|
-
'playwright/
|
|
13
|
+
'playwright/max-expects': 'off',
|
|
14
14
|
'playwright/max-nested-describe': ['warn', { max: 5 }],
|
|
15
|
+
'playwright/missing-playwright-await': 'error',
|
|
16
|
+
'playwright/no-commented-out-tests': 'warn',
|
|
17
|
+
'playwright/no-conditional-expect': 'warn',
|
|
18
|
+
'playwright/no-conditional-in-test': 'warn',
|
|
15
19
|
'playwright/no-duplicate-hooks': 'error',
|
|
20
|
+
'playwright/no-duplicate-slow': 'off',
|
|
16
21
|
'playwright/no-element-handle': 'warn',
|
|
17
22
|
'playwright/no-eval': 'warn',
|
|
18
|
-
'playwright/no-page-pause': 'warn',
|
|
19
|
-
'playwright/no-slowed-test': 'warn',
|
|
20
|
-
'playwright/no-skipped-test': 'warn',
|
|
21
|
-
'playwright/no-standalone-expect': 'warn',
|
|
22
23
|
'playwright/no-focused-test': 'warn',
|
|
23
24
|
'playwright/no-force-option': 'warn',
|
|
24
|
-
'playwright/no-
|
|
25
|
-
'playwright/no-
|
|
25
|
+
'playwright/no-get-by-title': 'off',
|
|
26
|
+
'playwright/no-hooks': 'off',
|
|
26
27
|
'playwright/no-nested-step': 'warn',
|
|
27
28
|
'playwright/no-networkidle': 'warn',
|
|
28
|
-
'playwright/no-
|
|
29
|
+
'playwright/no-nth-methods': 'off',
|
|
30
|
+
'playwright/no-page-pause': 'warn',
|
|
31
|
+
'playwright/no-raw-locators': 'off',
|
|
32
|
+
'playwright/no-restricted-locators': 'off',
|
|
33
|
+
'playwright/no-restricted-matchers': 'off',
|
|
34
|
+
'playwright/no-restricted-roles': 'off',
|
|
35
|
+
'playwright/no-skipped-test': 'warn',
|
|
36
|
+
'playwright/no-slowed-test': 'warn',
|
|
37
|
+
'playwright/no-standalone-expect': 'warn',
|
|
29
38
|
'playwright/no-unsafe-references': 'warn',
|
|
30
|
-
'playwright/no-useless-not': 'warn',
|
|
31
39
|
'playwright/no-unused-locators': 'warn',
|
|
40
|
+
'playwright/no-useless-await': 'error',
|
|
41
|
+
'playwright/no-useless-not': 'warn',
|
|
32
42
|
'playwright/no-wait-for-navigation': 'warn',
|
|
33
43
|
'playwright/no-wait-for-selector': 'warn',
|
|
34
44
|
'playwright/no-wait-for-timeout': 'warn',
|
|
45
|
+
'playwright/prefer-comparison-matcher': 'off',
|
|
46
|
+
'playwright/prefer-equality-matcher': 'off',
|
|
47
|
+
'playwright/prefer-hooks-in-order': 'off',
|
|
48
|
+
'playwright/prefer-hooks-on-top': 'off',
|
|
49
|
+
'playwright/prefer-locator': 'off',
|
|
50
|
+
'playwright/prefer-lowercase-title': 'off',
|
|
51
|
+
'playwright/prefer-native-locators': 'off',
|
|
52
|
+
'playwright/prefer-strict-equal': 'off',
|
|
53
|
+
'playwright/prefer-to-be': 'off',
|
|
54
|
+
'playwright/prefer-to-contain': 'off',
|
|
55
|
+
'playwright/prefer-to-have-count': 'off',
|
|
56
|
+
'playwright/prefer-to-have-length': 'off',
|
|
35
57
|
'playwright/prefer-web-first-assertions': 'warn',
|
|
58
|
+
'playwright/require-hook': 'off',
|
|
59
|
+
'playwright/require-soft-assertions': 'off',
|
|
60
|
+
'playwright/require-tags': 'off',
|
|
61
|
+
'playwright/require-to-pass-timeout': 'off',
|
|
62
|
+
'playwright/require-to-throw-message': 'off',
|
|
63
|
+
'playwright/require-top-level-describe': 'off',
|
|
36
64
|
'playwright/valid-describe-callback': 'warn',
|
|
37
65
|
'playwright/valid-expect-in-promise': 'warn',
|
|
38
66
|
'playwright/valid-expect': 'warn',
|
|
67
|
+
'playwright/valid-test-tags': 'off',
|
|
39
68
|
'playwright/valid-title': 'warn',
|
|
40
69
|
},
|
|
41
70
|
};
|
package/src/modules/react.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import a11yPlugin from 'eslint-plugin-jsx-a11y';
|
|
|
3
3
|
import hooksPlugin from 'eslint-plugin-react-hooks';
|
|
4
4
|
import { parser } from 'typescript-eslint';
|
|
5
5
|
|
|
6
|
-
import { predicate } from '../utils/conditions.mjs';
|
|
6
|
+
import { predicate, strict } from '../utils/conditions.mjs';
|
|
7
7
|
import { globs } from '../utils/globs.mjs';
|
|
8
8
|
|
|
9
9
|
/** @return { import('eslint').Linter.Config } */
|
|
@@ -33,31 +33,28 @@ function react(options = {}) {
|
|
|
33
33
|
},
|
|
34
34
|
},
|
|
35
35
|
rules: {
|
|
36
|
-
'@eslint-react/dom
|
|
37
|
-
'@eslint-react/dom
|
|
38
|
-
'@eslint-react/dom
|
|
39
|
-
'@eslint-react/dom
|
|
40
|
-
'@eslint-react/dom
|
|
41
|
-
'@eslint-react/dom
|
|
42
|
-
'@eslint-react/dom
|
|
43
|
-
'@eslint-react/dom
|
|
44
|
-
'@eslint-react/dom
|
|
45
|
-
'@eslint-react/dom
|
|
46
|
-
'@eslint-react/dom
|
|
47
|
-
'@eslint-react/dom
|
|
48
|
-
'@eslint-react/dom
|
|
49
|
-
'@eslint-react/dom
|
|
50
|
-
'@eslint-react/dom
|
|
36
|
+
'@eslint-react/dom-no-void-elements-with-children': 'warn',
|
|
37
|
+
'@eslint-react/dom-no-dangerously-set-innerhtml-with-children': 'error',
|
|
38
|
+
'@eslint-react/dom-no-dangerously-set-innerhtml': 'off',
|
|
39
|
+
'@eslint-react/dom-no-find-dom-node': 'error',
|
|
40
|
+
'@eslint-react/dom-no-flush-sync': 'off',
|
|
41
|
+
'@eslint-react/dom-no-use-form-state': 'warn',
|
|
42
|
+
'@eslint-react/dom-no-hydrate': 'warn',
|
|
43
|
+
'@eslint-react/dom-no-missing-button-type': 'warn',
|
|
44
|
+
'@eslint-react/dom-no-missing-iframe-sandbox': 'warn',
|
|
45
|
+
'@eslint-react/dom-no-render-return-value': 'error',
|
|
46
|
+
'@eslint-react/dom-no-render': 'warn',
|
|
47
|
+
'@eslint-react/dom-no-script-url': 'warn',
|
|
48
|
+
'@eslint-react/dom-no-string-style-prop': 'error',
|
|
49
|
+
'@eslint-react/dom-no-unsafe-iframe-sandbox': 'warn',
|
|
50
|
+
'@eslint-react/dom-no-unsafe-target-blank': 'warn',
|
|
51
51
|
|
|
52
|
-
'@eslint-react/jsx-dollar': 'warn',
|
|
53
|
-
'@eslint-react/jsx-key-before-spread': 'error',
|
|
54
|
-
'@eslint-react/jsx-no-undef': 'off',
|
|
55
|
-
'@eslint-react/jsx-no-iife': 'warn',
|
|
56
|
-
'@eslint-react/jsx-no-duplicate-props': 'error',
|
|
57
52
|
'@eslint-react/jsx-no-comment-textnodes': 'warn',
|
|
58
|
-
'@eslint-react/jsx-
|
|
59
|
-
'@eslint-react/jsx-
|
|
60
|
-
'@eslint-react/jsx-
|
|
53
|
+
'@eslint-react/jsx-no-children-prop': 'warn',
|
|
54
|
+
'@eslint-react/jsx-no-children-prop-with-children': 'warn',
|
|
55
|
+
'@eslint-react/jsx-no-key-after-spread': 'error',
|
|
56
|
+
'@eslint-react/jsx-no-useless-fragment': 'warn',
|
|
57
|
+
'@eslint-react/jsx-no-namespace': 'error',
|
|
61
58
|
|
|
62
59
|
'@eslint-react/no-access-state-in-setstate': 'error',
|
|
63
60
|
'@eslint-react/no-array-index-key': 'warn',
|
|
@@ -65,13 +62,13 @@ function react(options = {}) {
|
|
|
65
62
|
'@eslint-react/no-children-for-each': 'warn',
|
|
66
63
|
'@eslint-react/no-children-map': 'warn',
|
|
67
64
|
'@eslint-react/no-children-only': 'warn',
|
|
68
|
-
'@eslint-react/no-children-prop': 'warn',
|
|
69
65
|
'@eslint-react/no-children-to-array': 'warn',
|
|
70
66
|
'@eslint-react/no-clone-element': 'warn',
|
|
71
67
|
'@eslint-react/no-component-will-mount': 'error',
|
|
72
68
|
'@eslint-react/no-component-will-receive-props': 'error',
|
|
73
69
|
'@eslint-react/no-component-will-update': 'error',
|
|
74
70
|
'@eslint-react/no-context-provider': 'warn',
|
|
71
|
+
|
|
75
72
|
'@eslint-react/no-create-ref': 'error',
|
|
76
73
|
'@eslint-react/no-direct-mutation-state': 'error',
|
|
77
74
|
'@eslint-react/no-duplicate-key': 'error',
|
|
@@ -81,11 +78,9 @@ function react(options = {}) {
|
|
|
81
78
|
'@eslint-react/no-misused-capture-owner-stack': 'error',
|
|
82
79
|
'@eslint-react/no-nested-component-definitions': 'warn',
|
|
83
80
|
'@eslint-react/no-nested-lazy-component-declarations': 'error',
|
|
84
|
-
'@eslint-react/no-redundant-should-component-update': 'error',
|
|
85
81
|
'@eslint-react/no-set-state-in-component-did-mount': 'warn',
|
|
86
82
|
'@eslint-react/no-set-state-in-component-did-update': 'warn',
|
|
87
83
|
'@eslint-react/no-set-state-in-component-will-update': 'warn',
|
|
88
|
-
'@eslint-react/dom/no-string-style-prop': 'error',
|
|
89
84
|
'@eslint-react/no-unsafe-component-will-mount': 'warn',
|
|
90
85
|
'@eslint-react/no-unsafe-component-will-receive-props': 'warn',
|
|
91
86
|
'@eslint-react/no-unsafe-component-will-update': 'warn',
|
|
@@ -93,41 +88,30 @@ function react(options = {}) {
|
|
|
93
88
|
'@eslint-react/no-unstable-default-props': 'error',
|
|
94
89
|
'@eslint-react/no-unused-class-component-members': 'warn',
|
|
95
90
|
'@eslint-react/no-unused-state': 'warn',
|
|
96
|
-
|
|
97
|
-
'@eslint-react/no-implicit-key': 'error',
|
|
98
|
-
'@eslint-react/no-unused-props': 'warn',
|
|
99
|
-
}),
|
|
100
|
-
'@eslint-react/no-useless-forward-ref': 'off',
|
|
101
|
-
'@eslint-react/no-useless-fragment': 'warn',
|
|
91
|
+
|
|
102
92
|
'@eslint-react/no-use-context': 'warn',
|
|
103
|
-
'@eslint-react/no-unnecessary-use-callback': 'warn',
|
|
104
|
-
'@eslint-react/no-unnecessary-use-memo': 'warn',
|
|
105
93
|
'@eslint-react/no-unnecessary-use-prefix': 'warn',
|
|
106
|
-
'@eslint-react/no-unnecessary-key': 'warn',
|
|
107
|
-
|
|
108
|
-
'@eslint-react/prefer-use-state-lazy-initialization': 'warn',
|
|
109
|
-
'@eslint-react/prefer-destructuring-assignment': 'warn',
|
|
110
94
|
|
|
111
|
-
'@eslint-react/
|
|
95
|
+
'@eslint-react/naming-convention-context-name': 'warn',
|
|
96
|
+
'@eslint-react/naming-convention-id-name': 'warn',
|
|
97
|
+
'@eslint-react/naming-convention-ref-name': 'warn',
|
|
112
98
|
|
|
113
|
-
'@eslint-react/
|
|
114
|
-
'@eslint-react/naming-convention/context-name': 'warn',
|
|
115
|
-
'@eslint-react/naming-convention/id-name': 'warn',
|
|
116
|
-
'@eslint-react/naming-convention/ref-name': 'warn',
|
|
117
|
-
'@eslint-react/naming-convention/use-state': [
|
|
99
|
+
'@eslint-react/use-state': [
|
|
118
100
|
'warn',
|
|
119
101
|
{
|
|
120
102
|
enforceAssignment: true,
|
|
121
103
|
enforceSetterName: false,
|
|
104
|
+
enforceLazyInitialization: true,
|
|
122
105
|
},
|
|
123
106
|
],
|
|
124
107
|
|
|
125
|
-
'@eslint-react/web-api
|
|
126
|
-
'@eslint-react/web-api
|
|
127
|
-
'@eslint-react/web-api
|
|
128
|
-
'@eslint-react/web-api
|
|
108
|
+
'@eslint-react/web-api-no-leaked-timeout': 'error',
|
|
109
|
+
'@eslint-react/web-api-no-leaked-event-listener': 'error',
|
|
110
|
+
'@eslint-react/web-api-no-leaked-interval': 'error',
|
|
111
|
+
'@eslint-react/web-api-no-leaked-resize-observer': 'error',
|
|
112
|
+
'@eslint-react/web-api-no-leaked-fetch': 'error',
|
|
129
113
|
|
|
130
|
-
'@eslint-react/rsc
|
|
114
|
+
'@eslint-react/rsc-function-definition': 'error',
|
|
131
115
|
|
|
132
116
|
'react-hooks/rules-of-hooks': 'error',
|
|
133
117
|
'react-hooks/exhaustive-deps': 'warn',
|
|
@@ -141,9 +125,9 @@ function react(options = {}) {
|
|
|
141
125
|
'react-hooks/preserve-manual-memoization': 'error',
|
|
142
126
|
'react-hooks/purity': 'error',
|
|
143
127
|
'react-hooks/refs': 'error',
|
|
144
|
-
'react-hooks/set-state-in-effect': 'error',
|
|
128
|
+
'react-hooks/set-state-in-effect': strict('error'),
|
|
145
129
|
'react-hooks/set-state-in-render': 'error',
|
|
146
|
-
'react-hooks/static-components': 'error',
|
|
130
|
+
'react-hooks/static-components': strict('error'),
|
|
147
131
|
'react-hooks/unsupported-syntax': 'warn',
|
|
148
132
|
'react-hooks/use-memo': 'error',
|
|
149
133
|
'react-hooks/incompatible-library': 'warn',
|
package/src/modules/regex.mjs
CHANGED
|
@@ -15,10 +15,13 @@ function regex(options = {}) {
|
|
|
15
15
|
rules: {
|
|
16
16
|
'regexp/confusing-quantifier': 'warn',
|
|
17
17
|
'regexp/control-character-escape': 'error',
|
|
18
|
+
'regexp/grapheme-string-literal': 'off',
|
|
19
|
+
'regexp/hexadecimal-escape': 'warn',
|
|
18
20
|
'regexp/letter-case': 'warn',
|
|
19
21
|
'regexp/match-any': 'error',
|
|
20
22
|
'regexp/negation': 'error',
|
|
21
23
|
'regexp/no-contradiction-with-assertion': 'error',
|
|
24
|
+
'regexp/no-control-character': 'off',
|
|
22
25
|
'regexp/no-dupe-characters-character-class': 'error',
|
|
23
26
|
'regexp/no-dupe-disjunctions': 'error',
|
|
24
27
|
'regexp/no-empty-alternative': 'warn',
|
|
@@ -38,9 +41,12 @@ function regex(options = {}) {
|
|
|
38
41
|
'regexp/no-missing-g-flag': 'error',
|
|
39
42
|
'regexp/no-non-standard-flag': 'error',
|
|
40
43
|
'regexp/no-obscure-range': 'error',
|
|
44
|
+
'regexp/no-octal': 'off',
|
|
41
45
|
'regexp/no-optional-assertion': 'error',
|
|
42
46
|
'regexp/no-potentially-useless-backreference': 'warn',
|
|
47
|
+
'regexp/no-standalone-backslash': 'warn',
|
|
43
48
|
'regexp/no-super-linear-backtracking': 'error',
|
|
49
|
+
'regexp/no-super-linear-move': 'off',
|
|
44
50
|
'regexp/no-trivially-nested-assertion': 'error',
|
|
45
51
|
'regexp/no-trivially-nested-quantifier': 'error',
|
|
46
52
|
'regexp/no-unused-capturing-group': 'error',
|
|
@@ -62,19 +68,32 @@ function regex(options = {}) {
|
|
|
62
68
|
'regexp/optimal-quantifier-concatenation': 'error',
|
|
63
69
|
'regexp/prefer-character-class': 'error',
|
|
64
70
|
'regexp/prefer-d': 'error',
|
|
71
|
+
'regexp/prefer-escape-replacement-dollar-char': 'warn',
|
|
72
|
+
'regexp/prefer-lookaround': 'off',
|
|
73
|
+
'regexp/prefer-named-backreference': 'warn',
|
|
74
|
+
'regexp/prefer-named-capture-group': 'off',
|
|
75
|
+
'regexp/prefer-named-replacement': 'off',
|
|
65
76
|
'regexp/prefer-plus-quantifier': 'error',
|
|
66
77
|
'regexp/prefer-predefined-assertion': 'error',
|
|
78
|
+
'regexp/prefer-quantifier': 'off',
|
|
67
79
|
'regexp/prefer-question-quantifier': 'error',
|
|
68
80
|
'regexp/prefer-range': 'error',
|
|
81
|
+
'regexp/prefer-regexp-exec': 'warn',
|
|
82
|
+
'regexp/prefer-regexp-test': 'warn',
|
|
83
|
+
'regexp/prefer-result-array-groups': 'warn',
|
|
69
84
|
'regexp/prefer-set-operation': 'error',
|
|
70
85
|
'regexp/prefer-star-quantifier': 'error',
|
|
71
86
|
'regexp/prefer-unicode-codepoint-escapes': 'error',
|
|
72
87
|
'regexp/prefer-w': 'error',
|
|
88
|
+
'regexp/require-unicode-regexp': 'off',
|
|
89
|
+
'regexp/require-unicode-sets-regexp': 'off',
|
|
73
90
|
'regexp/simplify-set-operations': 'error',
|
|
74
91
|
'regexp/sort-alternatives': 'warn',
|
|
75
92
|
'regexp/sort-character-class-elements': 'warn',
|
|
76
93
|
'regexp/sort-flags': 'warn',
|
|
77
94
|
'regexp/strict': 'error',
|
|
95
|
+
'regexp/unicode-escape': 'warn',
|
|
96
|
+
'regexp/unicode-property': 'warn',
|
|
78
97
|
'regexp/use-ignore-case': 'error',
|
|
79
98
|
|
|
80
99
|
'no-invalid-regexp': 'off',
|
|
@@ -14,6 +14,7 @@ function storybook() {
|
|
|
14
14
|
'storybook/hierarchy-separator': 'warn',
|
|
15
15
|
'storybook/meta-satisfies-type': 'warn',
|
|
16
16
|
'storybook/no-redundant-story-name': 'warn',
|
|
17
|
+
'storybook/no-renderer-packages': 'warn',
|
|
17
18
|
'storybook/no-uninstalled-addons': 'error',
|
|
18
19
|
'storybook/prefer-pascal-case': 'warn',
|
|
19
20
|
'storybook/story-exports': 'error',
|
package/src/modules/tailwind.mjs
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { strict } from '../utils/conditions.mjs';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* @param { import('..').Options } options
|
|
3
5
|
* @return { Promise<import('eslint').Linter.Config> }
|
|
@@ -16,15 +18,20 @@ async function tailwind(options = {}) {
|
|
|
16
18
|
},
|
|
17
19
|
},
|
|
18
20
|
rules: {
|
|
19
|
-
'better-tailwindcss/no-duplicate-classes': 'error',
|
|
20
|
-
'better-tailwindcss/no-deprecated-classes': 'warn',
|
|
21
|
-
'better-tailwindcss/no-conflicting-classes': 'error',
|
|
22
|
-
'better-tailwindcss/no-unnecessary-whitespace': 'warn',
|
|
23
21
|
'better-tailwindcss/enforce-canonical-classes': 'warn',
|
|
24
22
|
'better-tailwindcss/enforce-consistent-class-order': 'warn',
|
|
23
|
+
'better-tailwindcss/enforce-consistent-important-position': 'warn',
|
|
24
|
+
'better-tailwindcss/enforce-consistent-line-wrapping': 'off',
|
|
25
25
|
'better-tailwindcss/enforce-consistent-variable-syntax': 'error',
|
|
26
|
+
'better-tailwindcss/enforce-consistent-variant-order': 'warn',
|
|
27
|
+
'better-tailwindcss/enforce-logical-properties': strict('warn'),
|
|
26
28
|
'better-tailwindcss/enforce-shorthand-classes': 'warn',
|
|
27
|
-
'better-tailwindcss/
|
|
29
|
+
'better-tailwindcss/no-conflicting-classes': 'error',
|
|
30
|
+
'better-tailwindcss/no-deprecated-classes': 'warn',
|
|
31
|
+
'better-tailwindcss/no-duplicate-classes': 'error',
|
|
32
|
+
'better-tailwindcss/no-restricted-classes': 'warn',
|
|
33
|
+
'better-tailwindcss/no-unknown-classes': strict('warn'),
|
|
34
|
+
'better-tailwindcss/no-unnecessary-whitespace': 'warn',
|
|
28
35
|
},
|
|
29
36
|
};
|
|
30
37
|
}
|
package/src/modules/vitest.mjs
CHANGED
|
@@ -72,7 +72,7 @@ function vitest() {
|
|
|
72
72
|
'vitest/prefer-hooks-in-order': 'warn',
|
|
73
73
|
'vitest/prefer-hooks-on-top': 'warn',
|
|
74
74
|
'vitest/prefer-importing-vitest-globals': 'off',
|
|
75
|
-
'vitest/prefer-lowercase-title': '
|
|
75
|
+
'vitest/prefer-lowercase-title': 'off',
|
|
76
76
|
'vitest/prefer-mock-promise-shorthand': 'warn',
|
|
77
77
|
'vitest/prefer-mock-return-shorthand': 'warn',
|
|
78
78
|
'vitest/prefer-snapshot-hint': 'warn',
|
|
@@ -87,7 +87,7 @@ function vitest() {
|
|
|
87
87
|
'vitest/prefer-to-have-length': 'warn',
|
|
88
88
|
'vitest/prefer-todo': 'warn',
|
|
89
89
|
'vitest/prefer-vi-mocked': 'warn',
|
|
90
|
-
'vitest/require-hook': '
|
|
90
|
+
'vitest/require-hook': 'off',
|
|
91
91
|
'vitest/require-local-test-context-for-concurrent-snapshots': 'warn',
|
|
92
92
|
'vitest/require-mock-type-parameters': 'off',
|
|
93
93
|
'vitest/require-to-throw-message': 'warn',
|