@eslint-react/eslint-plugin 1.16.1 → 1.16.2-beta.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/dist/index.d.mts +1385 -3114
- package/dist/index.d.ts +1385 -3114
- package/dist/index.js +366 -241
- package/dist/index.mjs +366 -241
- package/package.json +14 -14
package/dist/index.mjs
CHANGED
|
@@ -1,248 +1,374 @@
|
|
|
1
|
-
import { fromEntries, entries, typeOf } from '@eslint-react/tools';
|
|
2
1
|
import reactDebug from 'eslint-plugin-react-debug';
|
|
3
2
|
import reactDom from 'eslint-plugin-react-dom';
|
|
4
3
|
import reactHooksExtra from 'eslint-plugin-react-hooks-extra';
|
|
5
4
|
import reactNamingConvention from 'eslint-plugin-react-naming-convention';
|
|
6
5
|
import reactWebApi from 'eslint-plugin-react-web-api';
|
|
7
6
|
import react from 'eslint-plugin-react-x';
|
|
7
|
+
import { fromEntries, entries, typeOf } from '@eslint-react/tools';
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
var __defProp = Object.defineProperty;
|
|
10
|
+
var __export = (target, all) => {
|
|
11
|
+
for (var name14 in all)
|
|
12
|
+
__defProp(target, name14, { get: all[name14], enumerable: true });
|
|
13
|
+
};
|
|
10
14
|
|
|
11
15
|
// package.json
|
|
12
16
|
var name = "@eslint-react/eslint-plugin";
|
|
13
|
-
var version = "1.16.
|
|
14
|
-
function transformKeys(obj, transform) {
|
|
15
|
-
if (typeOf(obj) !== "object") return obj;
|
|
16
|
-
const res = {};
|
|
17
|
-
for (const key in obj) {
|
|
18
|
-
res[transform(key)] = obj[key];
|
|
19
|
-
}
|
|
20
|
-
return res;
|
|
21
|
-
}
|
|
17
|
+
var version = "1.16.2-beta.0";
|
|
22
18
|
|
|
23
|
-
// src/
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
// src/configs/all.ts
|
|
20
|
+
var all_exports = {};
|
|
21
|
+
__export(all_exports, {
|
|
22
|
+
name: () => name4,
|
|
23
|
+
plugins: () => plugins3,
|
|
24
|
+
rules: () => rules3,
|
|
25
|
+
settings: () => settings3
|
|
26
|
+
});
|
|
27
27
|
|
|
28
|
-
// src/
|
|
29
|
-
var
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
"no-
|
|
40
|
-
"
|
|
41
|
-
"no-
|
|
42
|
-
"no-
|
|
43
|
-
"no-children-
|
|
44
|
-
"no-
|
|
45
|
-
"no-
|
|
46
|
-
"no-
|
|
47
|
-
"no-
|
|
48
|
-
"no-
|
|
49
|
-
"no-
|
|
50
|
-
"no-component-will-
|
|
51
|
-
"no-
|
|
52
|
-
"no-
|
|
53
|
-
"no-
|
|
54
|
-
"no-
|
|
55
|
-
"no-
|
|
56
|
-
|
|
57
|
-
"no-missing-
|
|
58
|
-
"no-
|
|
59
|
-
"no-
|
|
60
|
-
"no-
|
|
61
|
-
"no-
|
|
62
|
-
"no-set-state-in-component-did-
|
|
63
|
-
"no-set-state-in-component-
|
|
64
|
-
"no-
|
|
65
|
-
"no-
|
|
66
|
-
"no-unsafe-component-will-
|
|
67
|
-
"no-unsafe-component-will-
|
|
68
|
-
"no-
|
|
69
|
-
"no-unstable-
|
|
70
|
-
"no-
|
|
71
|
-
"no-unused-
|
|
72
|
-
"no-unused-state": "warn",
|
|
73
|
-
"no-useless-fragment": "warn",
|
|
74
|
-
"prefer-destructuring-assignment": "warn",
|
|
75
|
-
// "prefer-read-only-props": "warn", // This rule requires type information
|
|
76
|
-
"prefer-shorthand-boolean": "warn",
|
|
77
|
-
"prefer-shorthand-fragment": "warn",
|
|
78
|
-
// Part: DOM
|
|
79
|
-
"dom/no-children-in-void-dom-elements": "warn",
|
|
80
|
-
"dom/no-dangerously-set-innerhtml": "warn",
|
|
81
|
-
"dom/no-dangerously-set-innerhtml-with-children": "error",
|
|
82
|
-
"dom/no-find-dom-node": "error",
|
|
83
|
-
"dom/no-missing-button-type": "warn",
|
|
84
|
-
"dom/no-missing-iframe-sandbox": "warn",
|
|
85
|
-
"dom/no-namespace": "error",
|
|
86
|
-
"dom/no-render-return-value": "error",
|
|
87
|
-
"dom/no-script-url": "warn",
|
|
88
|
-
"dom/no-unknown-property": "warn",
|
|
89
|
-
"dom/no-unsafe-iframe-sandbox": "warn",
|
|
90
|
-
"dom/no-unsafe-target-blank": "warn",
|
|
91
|
-
// Part: Web API
|
|
92
|
-
"web-api/no-leaked-event-listener": "warn",
|
|
93
|
-
"web-api/no-leaked-interval": "warn",
|
|
94
|
-
"web-api/no-leaked-resize-observer": "warn",
|
|
95
|
-
"web-api/no-leaked-timeout": "warn",
|
|
96
|
-
// Part: Hooks Extra
|
|
97
|
-
"hooks-extra/no-direct-set-state-in-use-effect": "warn",
|
|
98
|
-
"hooks-extra/no-direct-set-state-in-use-layout-effect": "warn",
|
|
99
|
-
"hooks-extra/no-redundant-custom-hook": "warn",
|
|
100
|
-
"hooks-extra/no-unnecessary-use-callback": "warn",
|
|
101
|
-
"hooks-extra/no-unnecessary-use-memo": "warn",
|
|
102
|
-
"hooks-extra/prefer-use-state-lazy-initialization": "warn",
|
|
103
|
-
"naming-convention/component-name": "warn",
|
|
104
|
-
"naming-convention/filename": "warn",
|
|
105
|
-
"naming-convention/filename-extension": "warn",
|
|
106
|
-
"naming-convention/use-state": "warn"
|
|
28
|
+
// src/configs/core.ts
|
|
29
|
+
var core_exports = {};
|
|
30
|
+
__export(core_exports, {
|
|
31
|
+
name: () => name2,
|
|
32
|
+
plugins: () => plugins,
|
|
33
|
+
rules: () => rules,
|
|
34
|
+
settings: () => settings
|
|
35
|
+
});
|
|
36
|
+
var name2 = "@eslint-react/core";
|
|
37
|
+
var rules = {
|
|
38
|
+
"@eslint-react/ensure-forward-ref-using-ref": "warn",
|
|
39
|
+
"@eslint-react/jsx-no-duplicate-props": "warn",
|
|
40
|
+
"@eslint-react/jsx-uses-vars": "warn",
|
|
41
|
+
"@eslint-react/no-access-state-in-setstate": "error",
|
|
42
|
+
"@eslint-react/no-array-index-key": "warn",
|
|
43
|
+
"@eslint-react/no-children-count": "warn",
|
|
44
|
+
"@eslint-react/no-children-for-each": "warn",
|
|
45
|
+
"@eslint-react/no-children-map": "warn",
|
|
46
|
+
"@eslint-react/no-children-only": "warn",
|
|
47
|
+
"@eslint-react/no-children-to-array": "warn",
|
|
48
|
+
"@eslint-react/no-clone-element": "warn",
|
|
49
|
+
"@eslint-react/no-comment-textnodes": "warn",
|
|
50
|
+
"@eslint-react/no-component-will-mount": "error",
|
|
51
|
+
"@eslint-react/no-component-will-receive-props": "error",
|
|
52
|
+
"@eslint-react/no-component-will-update": "error",
|
|
53
|
+
"@eslint-react/no-create-ref": "error",
|
|
54
|
+
"@eslint-react/no-default-props": "error",
|
|
55
|
+
"@eslint-react/no-direct-mutation-state": "error",
|
|
56
|
+
"@eslint-react/no-duplicate-key": "error",
|
|
57
|
+
"@eslint-react/no-missing-key": "error",
|
|
58
|
+
"@eslint-react/no-nested-components": "error",
|
|
59
|
+
"@eslint-react/no-prop-types": "error",
|
|
60
|
+
"@eslint-react/no-redundant-should-component-update": "error",
|
|
61
|
+
"@eslint-react/no-set-state-in-component-did-mount": "warn",
|
|
62
|
+
"@eslint-react/no-set-state-in-component-did-update": "warn",
|
|
63
|
+
"@eslint-react/no-set-state-in-component-will-update": "warn",
|
|
64
|
+
"@eslint-react/no-string-refs": "error",
|
|
65
|
+
"@eslint-react/no-unsafe-component-will-mount": "warn",
|
|
66
|
+
"@eslint-react/no-unsafe-component-will-receive-props": "warn",
|
|
67
|
+
"@eslint-react/no-unsafe-component-will-update": "warn",
|
|
68
|
+
"@eslint-react/no-unstable-context-value": "warn",
|
|
69
|
+
"@eslint-react/no-unstable-default-props": "warn",
|
|
70
|
+
"@eslint-react/no-unused-class-component-members": "warn",
|
|
71
|
+
"@eslint-react/no-unused-state": "warn"
|
|
107
72
|
};
|
|
108
|
-
var
|
|
109
|
-
"
|
|
110
|
-
// "avoid-shorthand-boolean": "warn",
|
|
111
|
-
// "avoid-shorthand-fragment": "warn",
|
|
112
|
-
"jsx-no-duplicate-props": "warn",
|
|
113
|
-
"jsx-uses-vars": "warn",
|
|
114
|
-
"no-access-state-in-setstate": "error",
|
|
115
|
-
"no-array-index-key": "warn",
|
|
116
|
-
"no-children-count": "warn",
|
|
117
|
-
"no-children-for-each": "warn",
|
|
118
|
-
"no-children-map": "warn",
|
|
119
|
-
"no-children-only": "warn",
|
|
120
|
-
// "no-children-prop": "warn",
|
|
121
|
-
"no-children-to-array": "warn",
|
|
122
|
-
// "no-class-component": "warn",
|
|
123
|
-
"no-clone-element": "warn",
|
|
124
|
-
"no-comment-textnodes": "warn",
|
|
125
|
-
// "no-complex-conditional-rendering": "warn",
|
|
126
|
-
"no-component-will-mount": "error",
|
|
127
|
-
"no-component-will-receive-props": "error",
|
|
128
|
-
"no-component-will-update": "error",
|
|
129
|
-
"no-create-ref": "error",
|
|
130
|
-
"no-default-props": "error",
|
|
131
|
-
"no-direct-mutation-state": "error",
|
|
132
|
-
"no-duplicate-key": "error",
|
|
133
|
-
// "no-implicit-key": "error",
|
|
134
|
-
// "no-leaked-conditional-rendering": "warn",
|
|
135
|
-
// "no-missing-component-display-name": "warn",
|
|
136
|
-
"no-missing-key": "error",
|
|
137
|
-
"no-nested-components": "error",
|
|
138
|
-
"no-prop-types": "error",
|
|
139
|
-
"no-redundant-should-component-update": "error",
|
|
140
|
-
"no-set-state-in-component-did-mount": "warn",
|
|
141
|
-
"no-set-state-in-component-did-update": "warn",
|
|
142
|
-
"no-set-state-in-component-will-update": "warn",
|
|
143
|
-
"no-string-refs": "error",
|
|
144
|
-
"no-unsafe-component-will-mount": "warn",
|
|
145
|
-
"no-unsafe-component-will-receive-props": "warn",
|
|
146
|
-
"no-unsafe-component-will-update": "warn",
|
|
147
|
-
"no-unstable-context-value": "warn",
|
|
148
|
-
"no-unstable-default-props": "warn",
|
|
149
|
-
"no-unused-class-component-members": "warn",
|
|
150
|
-
"no-unused-state": "warn"
|
|
151
|
-
// "no-useless-fragment": "warn",
|
|
152
|
-
// "prefer-read-only-props": "warn",
|
|
153
|
-
// "prefer-destructuring-assignment": "warn",
|
|
154
|
-
// "prefer-shorthand-boolean": "warn",
|
|
155
|
-
// "prefer-shorthand-fragment": "warn",
|
|
73
|
+
var plugins = {
|
|
74
|
+
"@eslint-react": react
|
|
156
75
|
};
|
|
157
|
-
var
|
|
158
|
-
"
|
|
159
|
-
"dom/no-dangerously-set-innerhtml": "warn",
|
|
160
|
-
"dom/no-dangerously-set-innerhtml-with-children": "error",
|
|
161
|
-
"dom/no-find-dom-node": "error",
|
|
162
|
-
"dom/no-missing-button-type": "warn",
|
|
163
|
-
"dom/no-missing-iframe-sandbox": "warn",
|
|
164
|
-
"dom/no-namespace": "error",
|
|
165
|
-
"dom/no-render-return-value": "error",
|
|
166
|
-
"dom/no-script-url": "warn",
|
|
167
|
-
"dom/no-unknown-property": "warn",
|
|
168
|
-
"dom/no-unsafe-iframe-sandbox": "warn",
|
|
169
|
-
"dom/no-unsafe-target-blank": "warn"
|
|
76
|
+
var settings = {
|
|
77
|
+
"react-x": react.DEFAULT_ESLINT_REACT_SETTINGS
|
|
170
78
|
};
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
79
|
+
|
|
80
|
+
// src/configs/dom.ts
|
|
81
|
+
var dom_exports = {};
|
|
82
|
+
__export(dom_exports, {
|
|
83
|
+
name: () => name3,
|
|
84
|
+
plugins: () => plugins2,
|
|
85
|
+
rules: () => rules2,
|
|
86
|
+
settings: () => settings2
|
|
87
|
+
});
|
|
88
|
+
var name3 = "@eslint-react/all";
|
|
89
|
+
var rules2 = {
|
|
90
|
+
"@eslint-react/dom/no-children-in-void-dom-elements": "warn",
|
|
91
|
+
"@eslint-react/dom/no-dangerously-set-innerhtml": "warn",
|
|
92
|
+
"@eslint-react/dom/no-dangerously-set-innerhtml-with-children": "error",
|
|
93
|
+
"@eslint-react/dom/no-find-dom-node": "error",
|
|
94
|
+
"@eslint-react/dom/no-missing-button-type": "warn",
|
|
95
|
+
"@eslint-react/dom/no-missing-iframe-sandbox": "warn",
|
|
96
|
+
"@eslint-react/dom/no-namespace": "error",
|
|
97
|
+
"@eslint-react/dom/no-render-return-value": "error",
|
|
98
|
+
"@eslint-react/dom/no-script-url": "warn",
|
|
99
|
+
"@eslint-react/dom/no-unknown-property": "warn",
|
|
100
|
+
"@eslint-react/dom/no-unsafe-iframe-sandbox": "warn",
|
|
101
|
+
"@eslint-react/dom/no-unsafe-target-blank": "warn"
|
|
176
102
|
};
|
|
177
|
-
var
|
|
178
|
-
"
|
|
179
|
-
"hooks-extra/no-redundant-custom-hook": "warn",
|
|
180
|
-
"hooks-extra/prefer-use-state-lazy-initialization": "warn"
|
|
103
|
+
var plugins2 = {
|
|
104
|
+
"@eslint-react/dom": reactDom
|
|
181
105
|
};
|
|
182
|
-
var
|
|
183
|
-
|
|
184
|
-
...domPreset,
|
|
185
|
-
...webApiPreset,
|
|
186
|
-
...hooksExtraPreset
|
|
106
|
+
var settings2 = {
|
|
107
|
+
"react-x": reactDom.DEFAULT_ESLINT_REACT_SETTINGS
|
|
187
108
|
};
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
"
|
|
109
|
+
|
|
110
|
+
// src/configs/all.ts
|
|
111
|
+
var name4 = "@eslint-react/all";
|
|
112
|
+
var rules3 = {
|
|
113
|
+
"@eslint-react/avoid-shorthand-boolean": "warn",
|
|
114
|
+
"@eslint-react/avoid-shorthand-fragment": "warn",
|
|
115
|
+
"@eslint-react/ensure-forward-ref-using-ref": "warn",
|
|
116
|
+
"@eslint-react/jsx-no-duplicate-props": "warn",
|
|
117
|
+
"@eslint-react/jsx-uses-vars": "warn",
|
|
118
|
+
"@eslint-react/no-access-state-in-setstate": "error",
|
|
119
|
+
"@eslint-react/no-array-index-key": "warn",
|
|
120
|
+
"@eslint-react/no-children-count": "warn",
|
|
121
|
+
"@eslint-react/no-children-for-each": "warn",
|
|
122
|
+
"@eslint-react/no-children-map": "warn",
|
|
123
|
+
"@eslint-react/no-children-only": "warn",
|
|
124
|
+
"@eslint-react/no-children-prop": "warn",
|
|
125
|
+
"@eslint-react/no-children-to-array": "warn",
|
|
126
|
+
"@eslint-react/no-class-component": "warn",
|
|
127
|
+
"@eslint-react/no-clone-element": "warn",
|
|
128
|
+
"@eslint-react/no-comment-textnodes": "warn",
|
|
129
|
+
"@eslint-react/no-complex-conditional-rendering": "warn",
|
|
130
|
+
"@eslint-react/no-component-will-mount": "error",
|
|
131
|
+
"@eslint-react/no-component-will-receive-props": "error",
|
|
132
|
+
"@eslint-react/no-component-will-update": "error",
|
|
133
|
+
"@eslint-react/no-create-ref": "error",
|
|
134
|
+
"@eslint-react/no-default-props": "error",
|
|
135
|
+
"@eslint-react/no-direct-mutation-state": "error",
|
|
136
|
+
"@eslint-react/no-duplicate-key": "error",
|
|
137
|
+
"@eslint-react/no-implicit-key": "warn",
|
|
138
|
+
"@eslint-react/no-missing-component-display-name": "warn",
|
|
139
|
+
"@eslint-react/no-missing-key": "error",
|
|
140
|
+
"@eslint-react/no-nested-components": "error",
|
|
141
|
+
"@eslint-react/no-prop-types": "error",
|
|
142
|
+
"@eslint-react/no-redundant-should-component-update": "error",
|
|
143
|
+
"@eslint-react/no-set-state-in-component-did-mount": "warn",
|
|
144
|
+
"@eslint-react/no-set-state-in-component-did-update": "warn",
|
|
145
|
+
"@eslint-react/no-set-state-in-component-will-update": "warn",
|
|
146
|
+
"@eslint-react/no-string-refs": "error",
|
|
147
|
+
"@eslint-react/no-unsafe-component-will-mount": "warn",
|
|
148
|
+
"@eslint-react/no-unsafe-component-will-receive-props": "warn",
|
|
149
|
+
"@eslint-react/no-unsafe-component-will-update": "warn",
|
|
150
|
+
"@eslint-react/no-unstable-context-value": "warn",
|
|
151
|
+
"@eslint-react/no-unstable-default-props": "warn",
|
|
152
|
+
"@eslint-react/no-unused-class-component-members": "warn",
|
|
153
|
+
"@eslint-react/no-unused-state": "warn",
|
|
154
|
+
"@eslint-react/no-useless-fragment": "warn",
|
|
155
|
+
"@eslint-react/prefer-destructuring-assignment": "warn",
|
|
156
|
+
"@eslint-react/prefer-shorthand-boolean": "warn",
|
|
157
|
+
"@eslint-react/prefer-shorthand-fragment": "warn",
|
|
158
|
+
// Part: DOM
|
|
159
|
+
"@eslint-react/dom/no-children-in-void-dom-elements": "warn",
|
|
160
|
+
"@eslint-react/dom/no-dangerously-set-innerhtml": "warn",
|
|
161
|
+
"@eslint-react/dom/no-dangerously-set-innerhtml-with-children": "error",
|
|
162
|
+
"@eslint-react/dom/no-find-dom-node": "error",
|
|
163
|
+
"@eslint-react/dom/no-missing-button-type": "warn",
|
|
164
|
+
"@eslint-react/dom/no-missing-iframe-sandbox": "warn",
|
|
165
|
+
"@eslint-react/dom/no-namespace": "error",
|
|
166
|
+
"@eslint-react/dom/no-render-return-value": "error",
|
|
167
|
+
"@eslint-react/dom/no-script-url": "warn",
|
|
168
|
+
"@eslint-react/dom/no-unknown-property": "warn",
|
|
169
|
+
"@eslint-react/dom/no-unsafe-iframe-sandbox": "warn",
|
|
170
|
+
"@eslint-react/dom/no-unsafe-target-blank": "warn",
|
|
171
|
+
// Part: Web API
|
|
172
|
+
"@eslint-react/web-api/no-leaked-event-listener": "warn",
|
|
173
|
+
"@eslint-react/web-api/no-leaked-interval": "warn",
|
|
174
|
+
"@eslint-react/web-api/no-leaked-resize-observer": "warn",
|
|
175
|
+
"@eslint-react/web-api/no-leaked-timeout": "warn",
|
|
176
|
+
// Part: Hooks Extra
|
|
177
|
+
"@eslint-react/hooks-extra/no-direct-set-state-in-use-effect": "warn",
|
|
178
|
+
"@eslint-react/hooks-extra/no-direct-set-state-in-use-layout-effect": "warn",
|
|
179
|
+
"@eslint-react/hooks-extra/no-redundant-custom-hook": "warn",
|
|
180
|
+
"@eslint-react/hooks-extra/no-unnecessary-use-callback": "warn",
|
|
181
|
+
"@eslint-react/hooks-extra/no-unnecessary-use-memo": "warn",
|
|
182
|
+
"@eslint-react/hooks-extra/prefer-use-state-lazy-initialization": "warn",
|
|
183
|
+
"@eslint-react/naming-convention/component-name": "warn",
|
|
184
|
+
"@eslint-react/naming-convention/filename": "warn",
|
|
185
|
+
"@eslint-react/naming-convention/filename-extension": "warn",
|
|
186
|
+
"@eslint-react/naming-convention/use-state": "warn"
|
|
193
187
|
};
|
|
194
|
-
var
|
|
195
|
-
...
|
|
196
|
-
|
|
188
|
+
var plugins3 = {
|
|
189
|
+
...plugins,
|
|
190
|
+
...plugins2,
|
|
191
|
+
"@eslint-react/debug": reactDebug,
|
|
192
|
+
"@eslint-react/hooks-extra": reactHooksExtra,
|
|
193
|
+
"@eslint-react/naming-convention": reactNamingConvention,
|
|
194
|
+
"@eslint-react/web-api": reactWebApi
|
|
197
195
|
};
|
|
198
|
-
var
|
|
199
|
-
|
|
200
|
-
"prefer-read-only-props": "off"
|
|
196
|
+
var settings3 = {
|
|
197
|
+
...settings2
|
|
201
198
|
};
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
199
|
+
|
|
200
|
+
// src/configs/debug.ts
|
|
201
|
+
var debug_exports = {};
|
|
202
|
+
__export(debug_exports, {
|
|
203
|
+
name: () => name5,
|
|
204
|
+
plugins: () => plugins4,
|
|
205
|
+
rules: () => rules4
|
|
206
|
+
});
|
|
207
|
+
var name5 = "@eslint-react/debug";
|
|
208
|
+
var rules4 = {
|
|
209
|
+
"@eslint-react/debug/no-unknown-attribute": "warn",
|
|
210
|
+
"@eslint-react/debug/no-unknown-event": "warn",
|
|
211
|
+
"@eslint-react/debug/no-unknown-property": "warn"
|
|
206
212
|
};
|
|
207
|
-
var
|
|
208
|
-
|
|
209
|
-
var allPresetEntries = entries(allPreset);
|
|
210
|
-
var offPreset = {
|
|
211
|
-
...fromEntries(allPresetEntries.map(([key]) => [key, "off"])),
|
|
212
|
-
...disableTypeCheckedPreset
|
|
213
|
+
var plugins4 = {
|
|
214
|
+
"@eslint-react/debug": reactDebug
|
|
213
215
|
};
|
|
214
|
-
|
|
215
|
-
|
|
216
|
+
|
|
217
|
+
// src/configs/disable-debug.ts
|
|
218
|
+
var disable_debug_exports = {};
|
|
219
|
+
__export(disable_debug_exports, {
|
|
220
|
+
name: () => name6,
|
|
221
|
+
rules: () => rules5
|
|
222
|
+
});
|
|
223
|
+
var name6 = "@eslint-react/disable-debug";
|
|
224
|
+
var rules5 = fromEntries(entries(rules4).map(([key]) => [key, "off"]));
|
|
225
|
+
|
|
226
|
+
// src/configs/disable-dom.ts
|
|
227
|
+
var disable_dom_exports = {};
|
|
228
|
+
__export(disable_dom_exports, {
|
|
229
|
+
name: () => name7,
|
|
230
|
+
rules: () => rules6
|
|
231
|
+
});
|
|
232
|
+
var name7 = "@eslint-react/disable-dom";
|
|
233
|
+
var rules6 = fromEntries(entries(rules2).map(([key]) => [key, "off"]));
|
|
234
|
+
|
|
235
|
+
// src/configs/disable-type-checked.ts
|
|
236
|
+
var disable_type_checked_exports = {};
|
|
237
|
+
__export(disable_type_checked_exports, {
|
|
238
|
+
name: () => name8,
|
|
239
|
+
rules: () => rules7
|
|
240
|
+
});
|
|
241
|
+
var name8 = "@eslint-react/disable-type-checked";
|
|
242
|
+
var rules7 = {
|
|
243
|
+
"@eslint-react/no-leaked-conditional-rendering": "off",
|
|
244
|
+
"@eslint-react/prefer-read-only-props": "off"
|
|
216
245
|
};
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
246
|
+
|
|
247
|
+
// src/configs/disable-web-api.ts
|
|
248
|
+
var disable_web_api_exports = {};
|
|
249
|
+
__export(disable_web_api_exports, {
|
|
250
|
+
name: () => name9,
|
|
251
|
+
rules: () => rules9
|
|
252
|
+
});
|
|
253
|
+
var rules8 = {
|
|
254
|
+
"@eslint-react/web-api/no-leaked-event-listener": "warn",
|
|
255
|
+
"@eslint-react/web-api/no-leaked-interval": "warn",
|
|
256
|
+
"@eslint-react/web-api/no-leaked-resize-observer": "warn",
|
|
257
|
+
"@eslint-react/web-api/no-leaked-timeout": "warn"
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
// src/configs/disable-web-api.ts
|
|
261
|
+
var name9 = "@eslint-react/disable-web-api";
|
|
262
|
+
var rules9 = fromEntries(entries(rules8).map(([key]) => [key, "off"]));
|
|
263
|
+
|
|
264
|
+
// src/configs/off.ts
|
|
265
|
+
var off_exports = {};
|
|
266
|
+
__export(off_exports, {
|
|
267
|
+
name: () => name10,
|
|
268
|
+
rules: () => rules10
|
|
269
|
+
});
|
|
270
|
+
var name10 = "@eslint-react/off";
|
|
271
|
+
var rules10 = {
|
|
272
|
+
...fromEntries(entries(rules3).map(([key]) => [key, "off"])),
|
|
273
|
+
...rules7
|
|
220
274
|
};
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
275
|
+
|
|
276
|
+
// src/configs/recommended.ts
|
|
277
|
+
var recommended_exports = {};
|
|
278
|
+
__export(recommended_exports, {
|
|
279
|
+
name: () => name11,
|
|
280
|
+
plugins: () => plugins5,
|
|
281
|
+
rules: () => rules11,
|
|
282
|
+
settings: () => settings5
|
|
283
|
+
});
|
|
284
|
+
var name11 = "@eslint-react/recommended";
|
|
285
|
+
var rules11 = {
|
|
286
|
+
...rules,
|
|
287
|
+
...rules2,
|
|
288
|
+
"@eslint-react/hooks-extra/no-direct-set-state-in-use-effect": "warn",
|
|
289
|
+
"@eslint-react/hooks-extra/no-redundant-custom-hook": "warn",
|
|
290
|
+
"@eslint-react/hooks-extra/prefer-use-state-lazy-initialization": "warn",
|
|
291
|
+
"@eslint-react/web-api/no-leaked-event-listener": "warn",
|
|
292
|
+
"@eslint-react/web-api/no-leaked-interval": "warn",
|
|
293
|
+
"@eslint-react/web-api/no-leaked-resize-observer": "warn",
|
|
294
|
+
"@eslint-react/web-api/no-leaked-timeout": "warn"
|
|
295
|
+
};
|
|
296
|
+
var plugins5 = {
|
|
297
|
+
...plugins,
|
|
298
|
+
...plugins2,
|
|
224
299
|
"@eslint-react/debug": reactDebug,
|
|
225
|
-
"@eslint-react/dom": reactDom,
|
|
226
300
|
"@eslint-react/hooks-extra": reactHooksExtra,
|
|
227
301
|
"@eslint-react/naming-convention": reactNamingConvention,
|
|
228
302
|
"@eslint-react/web-api": reactWebApi
|
|
229
303
|
};
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
304
|
+
var settings5 = {
|
|
305
|
+
...settings2
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
// src/configs/recommended-type-checked.ts
|
|
309
|
+
var recommended_type_checked_exports = {};
|
|
310
|
+
__export(recommended_type_checked_exports, {
|
|
311
|
+
name: () => name13,
|
|
312
|
+
plugins: () => plugins7,
|
|
313
|
+
rules: () => rules13,
|
|
314
|
+
settings: () => settings7
|
|
315
|
+
});
|
|
316
|
+
|
|
317
|
+
// src/configs/recommended-typescript.ts
|
|
318
|
+
var recommended_typescript_exports = {};
|
|
319
|
+
__export(recommended_typescript_exports, {
|
|
320
|
+
name: () => name12,
|
|
321
|
+
plugins: () => plugins6,
|
|
322
|
+
rules: () => rules12,
|
|
323
|
+
settings: () => settings6
|
|
324
|
+
});
|
|
325
|
+
var name12 = "@eslint-react/recommended-typescript";
|
|
326
|
+
var rules12 = {
|
|
327
|
+
...rules11,
|
|
328
|
+
"@eslint-react/dom/no-unknown-property": "off",
|
|
329
|
+
"@eslint-react/jsx-no-duplicate-props": "off",
|
|
330
|
+
"@eslint-react/jsx-uses-vars": "off"
|
|
331
|
+
};
|
|
332
|
+
var plugins6 = {
|
|
333
|
+
...plugins5
|
|
334
|
+
};
|
|
335
|
+
var settings6 = {
|
|
336
|
+
...settings5
|
|
337
|
+
};
|
|
338
|
+
|
|
339
|
+
// src/configs/recommended-type-checked.ts
|
|
340
|
+
var name13 = "@eslint-react/recommended-type-checked";
|
|
341
|
+
var rules13 = {
|
|
342
|
+
...rules12,
|
|
343
|
+
"@eslint-react/no-leaked-conditional-rendering": "warn",
|
|
344
|
+
"@eslint-react/prefer-read-only-props": "warn"
|
|
345
|
+
};
|
|
346
|
+
var plugins7 = {
|
|
347
|
+
...plugins6
|
|
348
|
+
};
|
|
349
|
+
var settings7 = {
|
|
350
|
+
...settings6
|
|
351
|
+
};
|
|
352
|
+
function transformKeys(obj, transform) {
|
|
353
|
+
if (typeOf(obj) !== "object") return obj;
|
|
354
|
+
const res = {};
|
|
355
|
+
for (const key in obj) {
|
|
356
|
+
res[transform(key)] = obj[key];
|
|
357
|
+
}
|
|
358
|
+
return res;
|
|
238
359
|
}
|
|
239
|
-
|
|
360
|
+
|
|
361
|
+
// src/utils/pad-keys-left.ts
|
|
362
|
+
function padKeysLeft(obj, left) {
|
|
363
|
+
return transformKeys(obj, (key) => `${left}${key}`);
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
// src/index.ts
|
|
367
|
+
function makeLegacyConfig(config) {
|
|
240
368
|
return {
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
"react-x": settings
|
|
245
|
-
}
|
|
369
|
+
...config,
|
|
370
|
+
name: `${config.name}-legacy`,
|
|
371
|
+
plugins: ["@eslint-react"]
|
|
246
372
|
};
|
|
247
373
|
}
|
|
248
374
|
var src_default = {
|
|
@@ -251,37 +377,36 @@ var src_default = {
|
|
|
251
377
|
version
|
|
252
378
|
},
|
|
253
379
|
configs: {
|
|
254
|
-
|
|
255
|
-
["core"]:
|
|
256
|
-
["
|
|
257
|
-
["debug"]:
|
|
258
|
-
["
|
|
259
|
-
["
|
|
260
|
-
["
|
|
261
|
-
["
|
|
262
|
-
["
|
|
263
|
-
["recommended
|
|
264
|
-
["recommended-
|
|
265
|
-
["recommended-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
["
|
|
269
|
-
["
|
|
270
|
-
["disable-
|
|
271
|
-
["disable-
|
|
272
|
-
["disable-type-checked"]:
|
|
273
|
-
["disable-
|
|
274
|
-
|
|
275
|
-
["
|
|
276
|
-
["
|
|
277
|
-
["
|
|
278
|
-
["
|
|
380
|
+
["all"]: all_exports,
|
|
381
|
+
["core"]: core_exports,
|
|
382
|
+
["debug"]: debug_exports,
|
|
383
|
+
["disable-debug"]: disable_debug_exports,
|
|
384
|
+
["disable-dom"]: disable_dom_exports,
|
|
385
|
+
["disable-type-checked"]: disable_type_checked_exports,
|
|
386
|
+
["disable-web-api"]: disable_web_api_exports,
|
|
387
|
+
["dom"]: dom_exports,
|
|
388
|
+
["off"]: off_exports,
|
|
389
|
+
["recommended"]: recommended_exports,
|
|
390
|
+
["recommended-type-checked"]: recommended_type_checked_exports,
|
|
391
|
+
["recommended-typescript"]: recommended_typescript_exports,
|
|
392
|
+
// Part: legacy presets
|
|
393
|
+
["all-legacy"]: makeLegacyConfig(all_exports),
|
|
394
|
+
["core-legacy"]: makeLegacyConfig(core_exports),
|
|
395
|
+
["debug-legacy"]: makeLegacyConfig(debug_exports),
|
|
396
|
+
["disable-debug-legacy"]: makeLegacyConfig(disable_debug_exports),
|
|
397
|
+
["disable-dom-legacy"]: makeLegacyConfig(disable_dom_exports),
|
|
398
|
+
["disable-type-checked-legacy"]: makeLegacyConfig(disable_type_checked_exports),
|
|
399
|
+
["disable-web-api-legacy"]: makeLegacyConfig(disable_web_api_exports),
|
|
400
|
+
["dom-legacy"]: makeLegacyConfig(dom_exports),
|
|
401
|
+
["off-legacy"]: makeLegacyConfig(off_exports),
|
|
402
|
+
["recommended-legacy"]: makeLegacyConfig(recommended_exports),
|
|
403
|
+
["recommended-type-checked-legacy"]: makeLegacyConfig(recommended_type_checked_exports),
|
|
404
|
+
["recommended-typescript-legacy"]: makeLegacyConfig(recommended_typescript_exports),
|
|
279
405
|
// Part: deprecated presets
|
|
280
406
|
/** @deprecated Use `disable-dom` instead */
|
|
281
|
-
["off-dom"]:
|
|
407
|
+
["off-dom"]: disable_dom_exports,
|
|
282
408
|
/** @deprecated Use `disable-dom-legacy` instead */
|
|
283
|
-
["off-dom-legacy"]:
|
|
284
|
-
/* eslint-enable perfectionist/sort-objects */
|
|
409
|
+
["off-dom-legacy"]: makeLegacyConfig(disable_dom_exports)
|
|
285
410
|
},
|
|
286
411
|
rules: {
|
|
287
412
|
...react.rules,
|