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