@eslint-react/eslint-plugin 1.52.10-beta.0 → 1.52.10-beta.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/dist/chunk-B9dir_RE.mjs +11 -0
- package/dist/index.d.mts +1134 -1159
- package/dist/index.d.ts +1133 -1159
- package/dist/index.js +410 -411
- package/dist/index.mjs +385 -403
- package/package.json +12 -12
package/dist/index.mjs
CHANGED
|
@@ -1,472 +1,454 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
1
|
+
import { __export } from "./chunk-B9dir_RE.mjs";
|
|
2
|
+
import reactDebug from "eslint-plugin-react-debug";
|
|
3
|
+
import reactDom from "eslint-plugin-react-dom";
|
|
4
|
+
import reactHooksExtra from "eslint-plugin-react-hooks-extra";
|
|
5
|
+
import reactNamingConvention from "eslint-plugin-react-naming-convention";
|
|
6
|
+
import reactWebApi from "eslint-plugin-react-web-api";
|
|
7
|
+
import react from "eslint-plugin-react-x";
|
|
8
|
+
import { DEFAULT_ESLINT_REACT_SETTINGS } from "@eslint-react/shared";
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
var __export = (target, all) => {
|
|
11
|
-
for (var name14 in all)
|
|
12
|
-
__defProp(target, name14, { get: all[name14], enumerable: true });
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
// package.json
|
|
10
|
+
//#region package.json
|
|
16
11
|
var name = "@eslint-react/eslint-plugin";
|
|
17
|
-
var version = "1.52.10-beta.
|
|
18
|
-
|
|
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
|
-
});
|
|
12
|
+
var version = "1.52.10-beta.1";
|
|
27
13
|
|
|
28
|
-
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/configs/dom.ts
|
|
29
16
|
var dom_exports = {};
|
|
30
17
|
__export(dom_exports, {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
18
|
+
name: () => name$12,
|
|
19
|
+
plugins: () => plugins$7,
|
|
20
|
+
rules: () => rules$8,
|
|
21
|
+
settings: () => settings$6
|
|
35
22
|
});
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
};
|
|
54
|
-
var plugins = {
|
|
55
|
-
"@eslint-react/dom": reactDom
|
|
56
|
-
};
|
|
57
|
-
var settings = {
|
|
58
|
-
"react-x": DEFAULT_ESLINT_REACT_SETTINGS
|
|
23
|
+
const name$12 = "@eslint-react/dom";
|
|
24
|
+
const rules$8 = {
|
|
25
|
+
"@eslint-react/dom/no-dangerously-set-innerhtml": "warn",
|
|
26
|
+
"@eslint-react/dom/no-dangerously-set-innerhtml-with-children": "error",
|
|
27
|
+
"@eslint-react/dom/no-find-dom-node": "error",
|
|
28
|
+
"@eslint-react/dom/no-flush-sync": "error",
|
|
29
|
+
"@eslint-react/dom/no-hydrate": "error",
|
|
30
|
+
"@eslint-react/dom/no-missing-button-type": "warn",
|
|
31
|
+
"@eslint-react/dom/no-missing-iframe-sandbox": "warn",
|
|
32
|
+
"@eslint-react/dom/no-namespace": "error",
|
|
33
|
+
"@eslint-react/dom/no-render": "error",
|
|
34
|
+
"@eslint-react/dom/no-render-return-value": "error",
|
|
35
|
+
"@eslint-react/dom/no-script-url": "warn",
|
|
36
|
+
"@eslint-react/dom/no-unsafe-iframe-sandbox": "warn",
|
|
37
|
+
"@eslint-react/dom/no-unsafe-target-blank": "warn",
|
|
38
|
+
"@eslint-react/dom/no-use-form-state": "error",
|
|
39
|
+
"@eslint-react/dom/no-void-elements-with-children": "error"
|
|
59
40
|
};
|
|
41
|
+
const plugins$7 = { "@eslint-react/dom": reactDom };
|
|
42
|
+
const settings$6 = { "react-x": DEFAULT_ESLINT_REACT_SETTINGS };
|
|
60
43
|
|
|
61
|
-
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region src/configs/x.ts
|
|
62
46
|
var x_exports = {};
|
|
63
47
|
__export(x_exports, {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
48
|
+
name: () => name$11,
|
|
49
|
+
plugins: () => plugins$6,
|
|
50
|
+
rules: () => rules$12,
|
|
51
|
+
settings: () => settings$5
|
|
68
52
|
});
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
};
|
|
114
|
-
var plugins2 = {
|
|
115
|
-
"@eslint-react": react
|
|
116
|
-
};
|
|
117
|
-
var settings2 = {
|
|
118
|
-
"react-x": DEFAULT_ESLINT_REACT_SETTINGS
|
|
53
|
+
const name$11 = "@eslint-react/x";
|
|
54
|
+
const rules$12 = {
|
|
55
|
+
"@eslint-react/jsx-key-before-spread": "warn",
|
|
56
|
+
"@eslint-react/jsx-no-duplicate-props": "warn",
|
|
57
|
+
"@eslint-react/jsx-uses-react": "warn",
|
|
58
|
+
"@eslint-react/jsx-uses-vars": "warn",
|
|
59
|
+
"@eslint-react/no-access-state-in-setstate": "error",
|
|
60
|
+
"@eslint-react/no-array-index-key": "warn",
|
|
61
|
+
"@eslint-react/no-children-count": "warn",
|
|
62
|
+
"@eslint-react/no-children-for-each": "warn",
|
|
63
|
+
"@eslint-react/no-children-map": "warn",
|
|
64
|
+
"@eslint-react/no-children-only": "warn",
|
|
65
|
+
"@eslint-react/no-children-to-array": "warn",
|
|
66
|
+
"@eslint-react/no-clone-element": "warn",
|
|
67
|
+
"@eslint-react/no-comment-textnodes": "warn",
|
|
68
|
+
"@eslint-react/no-component-will-mount": "error",
|
|
69
|
+
"@eslint-react/no-component-will-receive-props": "error",
|
|
70
|
+
"@eslint-react/no-component-will-update": "error",
|
|
71
|
+
"@eslint-react/no-context-provider": "warn",
|
|
72
|
+
"@eslint-react/no-create-ref": "error",
|
|
73
|
+
"@eslint-react/no-default-props": "error",
|
|
74
|
+
"@eslint-react/no-direct-mutation-state": "error",
|
|
75
|
+
"@eslint-react/no-duplicate-key": "warn",
|
|
76
|
+
"@eslint-react/no-forward-ref": "warn",
|
|
77
|
+
"@eslint-react/no-implicit-key": "warn",
|
|
78
|
+
"@eslint-react/no-missing-key": "error",
|
|
79
|
+
"@eslint-react/no-misused-capture-owner-stack": "error",
|
|
80
|
+
"@eslint-react/no-nested-component-definitions": "error",
|
|
81
|
+
"@eslint-react/no-nested-lazy-component-declarations": "warn",
|
|
82
|
+
"@eslint-react/no-prop-types": "error",
|
|
83
|
+
"@eslint-react/no-redundant-should-component-update": "error",
|
|
84
|
+
"@eslint-react/no-set-state-in-component-did-mount": "warn",
|
|
85
|
+
"@eslint-react/no-set-state-in-component-did-update": "warn",
|
|
86
|
+
"@eslint-react/no-set-state-in-component-will-update": "warn",
|
|
87
|
+
"@eslint-react/no-string-refs": "error",
|
|
88
|
+
"@eslint-react/no-unsafe-component-will-mount": "warn",
|
|
89
|
+
"@eslint-react/no-unsafe-component-will-receive-props": "warn",
|
|
90
|
+
"@eslint-react/no-unsafe-component-will-update": "warn",
|
|
91
|
+
"@eslint-react/no-unstable-context-value": "warn",
|
|
92
|
+
"@eslint-react/no-unstable-default-props": "warn",
|
|
93
|
+
"@eslint-react/no-unused-class-component-members": "warn",
|
|
94
|
+
"@eslint-react/no-unused-state": "warn",
|
|
95
|
+
"@eslint-react/no-use-context": "warn",
|
|
96
|
+
"@eslint-react/no-useless-forward-ref": "warn"
|
|
119
97
|
};
|
|
98
|
+
const plugins$6 = { "@eslint-react": react };
|
|
99
|
+
const settings$5 = { "react-x": DEFAULT_ESLINT_REACT_SETTINGS };
|
|
120
100
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
var
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
"@eslint-react/naming-convention": reactNamingConvention,
|
|
220
|
-
"@eslint-react/web-api": reactWebApi
|
|
101
|
+
//#endregion
|
|
102
|
+
//#region src/configs/all.ts
|
|
103
|
+
var all_exports = {};
|
|
104
|
+
__export(all_exports, {
|
|
105
|
+
name: () => name$10,
|
|
106
|
+
plugins: () => plugins$5,
|
|
107
|
+
rules: () => rules$3,
|
|
108
|
+
settings: () => settings$4
|
|
109
|
+
});
|
|
110
|
+
const name$10 = "@eslint-react/all";
|
|
111
|
+
const rules$3 = {
|
|
112
|
+
"@eslint-react/avoid-shorthand-boolean": "warn",
|
|
113
|
+
"@eslint-react/avoid-shorthand-fragment": "warn",
|
|
114
|
+
"@eslint-react/jsx-key-before-spread": "warn",
|
|
115
|
+
"@eslint-react/jsx-no-duplicate-props": "warn",
|
|
116
|
+
"@eslint-react/jsx-no-iife": "warn",
|
|
117
|
+
"@eslint-react/jsx-no-undef": "error",
|
|
118
|
+
"@eslint-react/jsx-uses-react": "warn",
|
|
119
|
+
"@eslint-react/jsx-uses-vars": "warn",
|
|
120
|
+
"@eslint-react/no-access-state-in-setstate": "error",
|
|
121
|
+
"@eslint-react/no-array-index-key": "warn",
|
|
122
|
+
"@eslint-react/no-children-count": "warn",
|
|
123
|
+
"@eslint-react/no-children-for-each": "warn",
|
|
124
|
+
"@eslint-react/no-children-map": "warn",
|
|
125
|
+
"@eslint-react/no-children-only": "warn",
|
|
126
|
+
"@eslint-react/no-children-prop": "warn",
|
|
127
|
+
"@eslint-react/no-children-to-array": "warn",
|
|
128
|
+
"@eslint-react/no-class-component": "warn",
|
|
129
|
+
"@eslint-react/no-clone-element": "warn",
|
|
130
|
+
"@eslint-react/no-comment-textnodes": "warn",
|
|
131
|
+
"@eslint-react/no-complex-conditional-rendering": "warn",
|
|
132
|
+
"@eslint-react/no-component-will-mount": "error",
|
|
133
|
+
"@eslint-react/no-component-will-receive-props": "error",
|
|
134
|
+
"@eslint-react/no-component-will-update": "error",
|
|
135
|
+
"@eslint-react/no-context-provider": "warn",
|
|
136
|
+
"@eslint-react/no-create-ref": "error",
|
|
137
|
+
"@eslint-react/no-default-props": "error",
|
|
138
|
+
"@eslint-react/no-direct-mutation-state": "error",
|
|
139
|
+
"@eslint-react/no-duplicate-key": "warn",
|
|
140
|
+
"@eslint-react/no-forward-ref": "warn",
|
|
141
|
+
"@eslint-react/no-implicit-key": "warn",
|
|
142
|
+
"@eslint-react/no-missing-component-display-name": "warn",
|
|
143
|
+
"@eslint-react/no-missing-context-display-name": "warn",
|
|
144
|
+
"@eslint-react/no-missing-key": "error",
|
|
145
|
+
"@eslint-react/no-misused-capture-owner-stack": "error",
|
|
146
|
+
"@eslint-react/no-nested-component-definitions": "error",
|
|
147
|
+
"@eslint-react/no-nested-lazy-component-declarations": "warn",
|
|
148
|
+
"@eslint-react/no-prop-types": "error",
|
|
149
|
+
"@eslint-react/no-redundant-should-component-update": "error",
|
|
150
|
+
"@eslint-react/no-set-state-in-component-did-mount": "warn",
|
|
151
|
+
"@eslint-react/no-set-state-in-component-did-update": "warn",
|
|
152
|
+
"@eslint-react/no-set-state-in-component-will-update": "warn",
|
|
153
|
+
"@eslint-react/no-string-refs": "error",
|
|
154
|
+
"@eslint-react/no-unsafe-component-will-mount": "warn",
|
|
155
|
+
"@eslint-react/no-unsafe-component-will-receive-props": "warn",
|
|
156
|
+
"@eslint-react/no-unsafe-component-will-update": "warn",
|
|
157
|
+
"@eslint-react/no-unstable-context-value": "warn",
|
|
158
|
+
"@eslint-react/no-unstable-default-props": "warn",
|
|
159
|
+
"@eslint-react/no-unused-class-component-members": "warn",
|
|
160
|
+
"@eslint-react/no-unused-state": "warn",
|
|
161
|
+
"@eslint-react/no-use-context": "warn",
|
|
162
|
+
"@eslint-react/no-useless-forward-ref": "warn",
|
|
163
|
+
"@eslint-react/no-useless-fragment": "warn",
|
|
164
|
+
"@eslint-react/prefer-destructuring-assignment": "warn",
|
|
165
|
+
"@eslint-react/prefer-react-namespace-import": "warn",
|
|
166
|
+
"@eslint-react/prefer-shorthand-boolean": "off",
|
|
167
|
+
"@eslint-react/prefer-shorthand-fragment": "off",
|
|
168
|
+
"@eslint-react/dom/no-dangerously-set-innerhtml": "warn",
|
|
169
|
+
"@eslint-react/dom/no-dangerously-set-innerhtml-with-children": "error",
|
|
170
|
+
"@eslint-react/dom/no-find-dom-node": "error",
|
|
171
|
+
"@eslint-react/dom/no-flush-sync": "error",
|
|
172
|
+
"@eslint-react/dom/no-hydrate": "error",
|
|
173
|
+
"@eslint-react/dom/no-missing-button-type": "warn",
|
|
174
|
+
"@eslint-react/dom/no-missing-iframe-sandbox": "warn",
|
|
175
|
+
"@eslint-react/dom/no-namespace": "error",
|
|
176
|
+
"@eslint-react/dom/no-render": "error",
|
|
177
|
+
"@eslint-react/dom/no-render-return-value": "error",
|
|
178
|
+
"@eslint-react/dom/no-script-url": "warn",
|
|
179
|
+
"@eslint-react/dom/no-unknown-property": "warn",
|
|
180
|
+
"@eslint-react/dom/no-unsafe-iframe-sandbox": "warn",
|
|
181
|
+
"@eslint-react/dom/no-unsafe-target-blank": "warn",
|
|
182
|
+
"@eslint-react/dom/no-use-form-state": "error",
|
|
183
|
+
"@eslint-react/dom/no-void-elements-with-children": "error",
|
|
184
|
+
"@eslint-react/web-api/no-leaked-event-listener": "warn",
|
|
185
|
+
"@eslint-react/web-api/no-leaked-interval": "warn",
|
|
186
|
+
"@eslint-react/web-api/no-leaked-resize-observer": "warn",
|
|
187
|
+
"@eslint-react/web-api/no-leaked-timeout": "warn",
|
|
188
|
+
"@eslint-react/hooks-extra/no-direct-set-state-in-use-effect": "warn",
|
|
189
|
+
"@eslint-react/hooks-extra/no-direct-set-state-in-use-layout-effect": "warn",
|
|
190
|
+
"@eslint-react/hooks-extra/no-unnecessary-use-callback": "warn",
|
|
191
|
+
"@eslint-react/hooks-extra/no-unnecessary-use-memo": "warn",
|
|
192
|
+
"@eslint-react/hooks-extra/no-unnecessary-use-prefix": "warn",
|
|
193
|
+
"@eslint-react/hooks-extra/prefer-use-state-lazy-initialization": "warn",
|
|
194
|
+
"@eslint-react/naming-convention/component-name": "warn",
|
|
195
|
+
"@eslint-react/naming-convention/context-name": "warn",
|
|
196
|
+
"@eslint-react/naming-convention/filename": "warn",
|
|
197
|
+
"@eslint-react/naming-convention/filename-extension": "warn",
|
|
198
|
+
"@eslint-react/naming-convention/use-state": "warn"
|
|
221
199
|
};
|
|
222
|
-
|
|
223
|
-
|
|
200
|
+
const plugins$5 = {
|
|
201
|
+
...plugins$6,
|
|
202
|
+
...plugins$7,
|
|
203
|
+
"@eslint-react/debug": reactDebug,
|
|
204
|
+
"@eslint-react/hooks-extra": reactHooksExtra,
|
|
205
|
+
"@eslint-react/naming-convention": reactNamingConvention,
|
|
206
|
+
"@eslint-react/web-api": reactWebApi
|
|
224
207
|
};
|
|
208
|
+
const settings$4 = { ...settings$6 };
|
|
225
209
|
|
|
226
|
-
|
|
210
|
+
//#endregion
|
|
211
|
+
//#region src/configs/debug.ts
|
|
227
212
|
var debug_exports = {};
|
|
228
213
|
__export(debug_exports, {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
214
|
+
name: () => name$9,
|
|
215
|
+
plugins: () => plugins$4,
|
|
216
|
+
rules: () => rules$10
|
|
232
217
|
});
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
};
|
|
241
|
-
var plugins4 = {
|
|
242
|
-
"@eslint-react/debug": reactDebug
|
|
218
|
+
const name$9 = "@eslint-react/debug";
|
|
219
|
+
const rules$10 = {
|
|
220
|
+
"@eslint-react/debug/class-component": "warn",
|
|
221
|
+
"@eslint-react/debug/function-component": "warn",
|
|
222
|
+
"@eslint-react/debug/hook": "warn",
|
|
223
|
+
"@eslint-react/debug/is-from-react": "warn",
|
|
224
|
+
"@eslint-react/debug/jsx": "warn"
|
|
243
225
|
};
|
|
226
|
+
const plugins$4 = { "@eslint-react/debug": reactDebug };
|
|
244
227
|
|
|
245
|
-
|
|
228
|
+
//#endregion
|
|
229
|
+
//#region src/configs/disable-debug.ts
|
|
246
230
|
var disable_debug_exports = {};
|
|
247
231
|
__export(disable_debug_exports, {
|
|
248
|
-
|
|
249
|
-
|
|
232
|
+
name: () => name$8,
|
|
233
|
+
rules: () => rules$11
|
|
250
234
|
});
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
Object.entries(rules4).map(([rule]) => [rule, "off"])
|
|
254
|
-
);
|
|
235
|
+
const name$8 = "@eslint-react/disable-debug";
|
|
236
|
+
const rules$11 = Object.fromEntries(Object.entries(rules$10).map(([rule]) => [rule, "off"]));
|
|
255
237
|
|
|
256
|
-
|
|
238
|
+
//#endregion
|
|
239
|
+
//#region src/configs/disable-dom.ts
|
|
257
240
|
var disable_dom_exports = {};
|
|
258
241
|
__export(disable_dom_exports, {
|
|
259
|
-
|
|
260
|
-
|
|
242
|
+
name: () => name$7,
|
|
243
|
+
rules: () => rules$9
|
|
261
244
|
});
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
Object.entries(rules).map(([key]) => [key, "off"])
|
|
265
|
-
);
|
|
245
|
+
const name$7 = "@eslint-react/disable-dom";
|
|
246
|
+
const rules$9 = Object.fromEntries(Object.entries(rules$8).map(([key]) => [key, "off"]));
|
|
266
247
|
|
|
267
|
-
|
|
248
|
+
//#endregion
|
|
249
|
+
//#region src/configs/disable-type-checked.ts
|
|
268
250
|
var disable_type_checked_exports = {};
|
|
269
251
|
__export(disable_type_checked_exports, {
|
|
270
|
-
|
|
271
|
-
|
|
252
|
+
name: () => name$6,
|
|
253
|
+
rules: () => rules$4
|
|
272
254
|
});
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
255
|
+
const name$6 = "@eslint-react/disable-type-checked";
|
|
256
|
+
const rules$4 = {
|
|
257
|
+
"@eslint-react/no-leaked-conditional-rendering": "off",
|
|
258
|
+
"@eslint-react/prefer-read-only-props": "off"
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
//#endregion
|
|
262
|
+
//#region src/configs/web-api.ts
|
|
263
|
+
const rules$6 = {
|
|
264
|
+
"@eslint-react/web-api/no-leaked-event-listener": "warn",
|
|
265
|
+
"@eslint-react/web-api/no-leaked-interval": "warn",
|
|
266
|
+
"@eslint-react/web-api/no-leaked-resize-observer": "warn",
|
|
267
|
+
"@eslint-react/web-api/no-leaked-timeout": "warn"
|
|
277
268
|
};
|
|
269
|
+
const plugins$3 = { "@eslint-react/web-api": reactWebApi };
|
|
270
|
+
const settings$3 = { ...settings$6 };
|
|
278
271
|
|
|
279
|
-
|
|
272
|
+
//#endregion
|
|
273
|
+
//#region src/configs/disable-web-api.ts
|
|
280
274
|
var disable_web_api_exports = {};
|
|
281
275
|
__export(disable_web_api_exports, {
|
|
282
|
-
|
|
283
|
-
|
|
276
|
+
name: () => name$5,
|
|
277
|
+
rules: () => rules$7
|
|
284
278
|
});
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
"@eslint-react/web-api/no-leaked-interval": "warn",
|
|
288
|
-
"@eslint-react/web-api/no-leaked-resize-observer": "warn",
|
|
289
|
-
"@eslint-react/web-api/no-leaked-timeout": "warn"
|
|
290
|
-
};
|
|
291
|
-
var plugins5 = {
|
|
292
|
-
"@eslint-react/web-api": reactWebApi
|
|
293
|
-
};
|
|
294
|
-
|
|
295
|
-
// src/configs/disable-web-api.ts
|
|
296
|
-
var name9 = "@eslint-react/disable-web-api";
|
|
297
|
-
var rules9 = Object.fromEntries(
|
|
298
|
-
Object.entries(rules8).map(([key]) => [key, "off"])
|
|
299
|
-
);
|
|
279
|
+
const name$5 = "@eslint-react/disable-web-api";
|
|
280
|
+
const rules$7 = Object.fromEntries(Object.entries(rules$6).map(([key]) => [key, "off"]));
|
|
300
281
|
|
|
301
|
-
|
|
282
|
+
//#endregion
|
|
283
|
+
//#region src/configs/off.ts
|
|
302
284
|
var off_exports = {};
|
|
303
285
|
__export(off_exports, {
|
|
304
|
-
|
|
305
|
-
|
|
286
|
+
name: () => name$4,
|
|
287
|
+
rules: () => rules$5
|
|
306
288
|
});
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
289
|
+
const name$4 = "@eslint-react/off";
|
|
290
|
+
const rules$5 = {
|
|
291
|
+
...Object.fromEntries(Object.entries(rules$3).map(([key]) => [key, "off"])),
|
|
292
|
+
...rules$4
|
|
311
293
|
};
|
|
312
294
|
|
|
313
|
-
|
|
295
|
+
//#endregion
|
|
296
|
+
//#region src/configs/recommended.ts
|
|
314
297
|
var recommended_exports = {};
|
|
315
298
|
__export(recommended_exports, {
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
299
|
+
name: () => name$3,
|
|
300
|
+
plugins: () => plugins$2,
|
|
301
|
+
rules: () => rules$2,
|
|
302
|
+
settings: () => settings$2
|
|
320
303
|
});
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
// "@eslint-react/naming-convention/use-state": "warn",
|
|
304
|
+
const name$3 = "@eslint-react/recommended";
|
|
305
|
+
const rules$2 = {
|
|
306
|
+
...rules$12,
|
|
307
|
+
...rules$8,
|
|
308
|
+
...rules$6,
|
|
309
|
+
"@eslint-react/hooks-extra/no-direct-set-state-in-use-effect": "warn",
|
|
310
|
+
"@eslint-react/hooks-extra/no-unnecessary-use-prefix": "warn",
|
|
311
|
+
"@eslint-react/hooks-extra/prefer-use-state-lazy-initialization": "warn",
|
|
312
|
+
"@eslint-react/naming-convention/context-name": "warn"
|
|
331
313
|
};
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
314
|
+
const plugins$2 = {
|
|
315
|
+
...plugins$6,
|
|
316
|
+
...plugins$7,
|
|
317
|
+
...plugins$3,
|
|
318
|
+
"@eslint-react/debug": reactDebug,
|
|
319
|
+
"@eslint-react/hooks-extra": reactHooksExtra,
|
|
320
|
+
"@eslint-react/naming-convention": reactNamingConvention
|
|
339
321
|
};
|
|
340
|
-
|
|
341
|
-
...settings
|
|
342
|
-
};
|
|
343
|
-
|
|
344
|
-
// src/configs/recommended-type-checked.ts
|
|
345
|
-
var recommended_type_checked_exports = {};
|
|
346
|
-
__export(recommended_type_checked_exports, {
|
|
347
|
-
name: () => name13,
|
|
348
|
-
plugins: () => plugins8,
|
|
349
|
-
rules: () => rules13,
|
|
350
|
-
settings: () => settings7
|
|
351
|
-
});
|
|
322
|
+
const settings$2 = { ...settings$6 };
|
|
352
323
|
|
|
353
|
-
|
|
324
|
+
//#endregion
|
|
325
|
+
//#region src/configs/recommended-typescript.ts
|
|
354
326
|
var recommended_typescript_exports = {};
|
|
355
327
|
__export(recommended_typescript_exports, {
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
328
|
+
name: () => name$2,
|
|
329
|
+
plugins: () => plugins$1,
|
|
330
|
+
rules: () => rules$1,
|
|
331
|
+
settings: () => settings$1
|
|
360
332
|
});
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
};
|
|
369
|
-
var plugins7 = {
|
|
370
|
-
...plugins6
|
|
371
|
-
};
|
|
372
|
-
var settings6 = {
|
|
373
|
-
...settings5
|
|
333
|
+
const name$2 = "@eslint-react/recommended-typescript";
|
|
334
|
+
const rules$1 = {
|
|
335
|
+
...rules$2,
|
|
336
|
+
"@eslint-react/dom/no-unknown-property": "off",
|
|
337
|
+
"@eslint-react/jsx-no-duplicate-props": "off",
|
|
338
|
+
"@eslint-react/jsx-uses-react": "off",
|
|
339
|
+
"@eslint-react/jsx-uses-vars": "off"
|
|
374
340
|
};
|
|
341
|
+
const plugins$1 = { ...plugins$2 };
|
|
342
|
+
const settings$1 = { ...settings$2 };
|
|
375
343
|
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
var
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
344
|
+
//#endregion
|
|
345
|
+
//#region src/configs/recommended-type-checked.ts
|
|
346
|
+
var recommended_type_checked_exports = {};
|
|
347
|
+
__export(recommended_type_checked_exports, {
|
|
348
|
+
name: () => name$1,
|
|
349
|
+
plugins: () => plugins,
|
|
350
|
+
rules: () => rules,
|
|
351
|
+
settings: () => settings
|
|
352
|
+
});
|
|
353
|
+
const name$1 = "@eslint-react/recommended-type-checked";
|
|
354
|
+
const rules = {
|
|
355
|
+
...rules$1,
|
|
356
|
+
"@eslint-react/no-leaked-conditional-rendering": "warn"
|
|
388
357
|
};
|
|
358
|
+
const plugins = { ...plugins$1 };
|
|
359
|
+
const settings = { ...settings$1 };
|
|
389
360
|
|
|
390
|
-
|
|
361
|
+
//#endregion
|
|
362
|
+
//#region src/utils/type-of.ts
|
|
363
|
+
/**
|
|
364
|
+
* This is an enhanced version of the typeof operator to check the type of more complex values.
|
|
365
|
+
* In this case we just mind about arrays and objects. We can add more on demand.
|
|
366
|
+
* @param t the value to be checked
|
|
367
|
+
* @returns the type of the value
|
|
368
|
+
*/
|
|
391
369
|
function typeOf(t) {
|
|
392
|
-
|
|
370
|
+
return Object.prototype.toString.call(t).replace(/^\[object (.+)\]$/, "$1").toLowerCase();
|
|
393
371
|
}
|
|
394
372
|
|
|
395
|
-
|
|
373
|
+
//#endregion
|
|
374
|
+
//#region src/utils/transform-keys.ts
|
|
375
|
+
/**
|
|
376
|
+
* This function is used to shallowly transform the keys of an object.
|
|
377
|
+
* It will only be transformed at runtime, so it's not type safe.
|
|
378
|
+
* @param obj the object to transform.
|
|
379
|
+
* @param transform the function to transform the keys from string to string.
|
|
380
|
+
* @returns the transformed object.
|
|
381
|
+
* @example transformKeys({ 'foo-bar': { 'fizz-buzz': true } }, camelCase)
|
|
382
|
+
* // { fooBar: { 'fizz-buzz': true } }
|
|
383
|
+
*/
|
|
396
384
|
function transformKeys(obj, transform) {
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
for (const key in obj) {
|
|
402
|
-
res[transform(key)] = obj[key];
|
|
403
|
-
}
|
|
404
|
-
return res;
|
|
385
|
+
if (typeOf(obj) !== "object") return obj;
|
|
386
|
+
const res = {};
|
|
387
|
+
for (const key in obj) res[transform(key)] = obj[key];
|
|
388
|
+
return res;
|
|
405
389
|
}
|
|
406
390
|
|
|
407
|
-
|
|
391
|
+
//#endregion
|
|
392
|
+
//#region src/utils/pad-keys-left.ts
|
|
408
393
|
function padKeysLeft(obj, left) {
|
|
409
|
-
|
|
394
|
+
return transformKeys(obj, (key) => `${left}${key}`);
|
|
410
395
|
}
|
|
411
396
|
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
397
|
+
//#endregion
|
|
398
|
+
//#region src/index.ts
|
|
399
|
+
function toLegacyConfig({ rules: rules$13 }) {
|
|
400
|
+
return {
|
|
401
|
+
plugins: ["@eslint-react"],
|
|
402
|
+
rules: rules$13
|
|
403
|
+
};
|
|
418
404
|
}
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
405
|
+
const plugin = {
|
|
406
|
+
meta: {
|
|
407
|
+
name,
|
|
408
|
+
version
|
|
409
|
+
},
|
|
410
|
+
rules: {
|
|
411
|
+
...react.rules,
|
|
412
|
+
...padKeysLeft(reactDom.rules, "dom/"),
|
|
413
|
+
...padKeysLeft(reactWebApi.rules, "web-api/"),
|
|
414
|
+
...padKeysLeft(reactHooksExtra.rules, "hooks-extra/"),
|
|
415
|
+
...padKeysLeft(reactNamingConvention.rules, "naming-convention/"),
|
|
416
|
+
...padKeysLeft(reactDebug.rules, "debug/")
|
|
417
|
+
}
|
|
432
418
|
};
|
|
433
|
-
var
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
/** @deprecated Use `disable-dom` instead */
|
|
466
|
-
["off-dom"]: disable_dom_exports,
|
|
467
|
-
/** @deprecated Use `disable-dom-legacy` instead */
|
|
468
|
-
["off-dom-legacy"]: toLegacyConfig(disable_dom_exports)
|
|
469
|
-
}
|
|
419
|
+
var src_default = {
|
|
420
|
+
...plugin,
|
|
421
|
+
configs: {
|
|
422
|
+
["all"]: all_exports,
|
|
423
|
+
["all-legacy"]: toLegacyConfig(all_exports),
|
|
424
|
+
["debug"]: debug_exports,
|
|
425
|
+
["debug-legacy"]: toLegacyConfig(debug_exports),
|
|
426
|
+
["disable-debug"]: disable_debug_exports,
|
|
427
|
+
["disable-debug-legacy"]: toLegacyConfig(disable_debug_exports),
|
|
428
|
+
["disable-dom"]: disable_dom_exports,
|
|
429
|
+
["disable-dom-legacy"]: toLegacyConfig(disable_dom_exports),
|
|
430
|
+
["disable-type-checked"]: disable_type_checked_exports,
|
|
431
|
+
["disable-type-checked-legacy"]: toLegacyConfig(disable_type_checked_exports),
|
|
432
|
+
["disable-web-api"]: disable_web_api_exports,
|
|
433
|
+
["disable-web-api-legacy"]: toLegacyConfig(disable_web_api_exports),
|
|
434
|
+
["dom"]: dom_exports,
|
|
435
|
+
["dom-legacy"]: toLegacyConfig(dom_exports),
|
|
436
|
+
["off"]: off_exports,
|
|
437
|
+
["off-legacy"]: toLegacyConfig(off_exports),
|
|
438
|
+
["recommended"]: recommended_exports,
|
|
439
|
+
["recommended-legacy"]: toLegacyConfig(recommended_exports),
|
|
440
|
+
["recommended-type-checked"]: recommended_type_checked_exports,
|
|
441
|
+
["recommended-type-checked-legacy"]: toLegacyConfig(recommended_type_checked_exports),
|
|
442
|
+
["recommended-typescript"]: recommended_typescript_exports,
|
|
443
|
+
["recommended-typescript-legacy"]: toLegacyConfig(recommended_typescript_exports),
|
|
444
|
+
["x"]: x_exports,
|
|
445
|
+
["x-legacy"]: toLegacyConfig(x_exports),
|
|
446
|
+
["core"]: x_exports,
|
|
447
|
+
["core-legacy"]: toLegacyConfig(x_exports),
|
|
448
|
+
["off-dom"]: disable_dom_exports,
|
|
449
|
+
["off-dom-legacy"]: toLegacyConfig(disable_dom_exports)
|
|
450
|
+
}
|
|
470
451
|
};
|
|
471
452
|
|
|
472
|
-
|
|
453
|
+
//#endregion
|
|
454
|
+
export { src_default as default };
|