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