eslint-plugin-react-dom 3.0.0-beta.6 → 3.0.0-beta.60
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.ts +5 -22
- package/dist/index.js +166 -167
- package/package.json +9 -8
package/dist/index.d.ts
CHANGED
|
@@ -1,26 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ESLint, Linter } from "eslint";
|
|
2
2
|
|
|
3
3
|
//#region src/index.d.ts
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
plugins: {};
|
|
8
|
-
name?: string;
|
|
9
|
-
rules?: Record<string, _eslint_react_shared0.RuleConfig>;
|
|
10
|
-
settings?: _eslint_react_shared0.SettingsConfig;
|
|
11
|
-
};
|
|
12
|
-
strict: {
|
|
13
|
-
plugins: {};
|
|
14
|
-
name?: string;
|
|
15
|
-
rules?: Record<string, _eslint_react_shared0.RuleConfig>;
|
|
16
|
-
settings?: _eslint_react_shared0.SettingsConfig;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
meta: {
|
|
20
|
-
name: string;
|
|
21
|
-
version: string;
|
|
22
|
-
};
|
|
23
|
-
rules: Record<string, _eslint_react_shared0.CompatibleRule>;
|
|
4
|
+
type ConfigName = "recommended" | "strict";
|
|
5
|
+
declare const finalPlugin: ESLint.Plugin & {
|
|
6
|
+
configs: Record<ConfigName, Linter.Config>;
|
|
24
7
|
};
|
|
25
8
|
//#endregion
|
|
26
|
-
export {
|
|
9
|
+
export { finalPlugin as default };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DEFAULT_ESLINT_REACT_SETTINGS, RE_JAVASCRIPT_PROTOCOL, WEBSITE_URL,
|
|
1
|
+
import { DEFAULT_ESLINT_REACT_SETTINGS, RE_JAVASCRIPT_PROTOCOL, WEBSITE_URL, defineRuleListener, getSettingsFromContext } from "@eslint-react/shared";
|
|
2
2
|
import * as core from "@eslint-react/core";
|
|
3
3
|
import { ESLintUtils } from "@typescript-eslint/utils";
|
|
4
4
|
import { AST_NODE_TYPES } from "@typescript-eslint/types";
|
|
@@ -23,7 +23,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
23
23
|
//#endregion
|
|
24
24
|
//#region package.json
|
|
25
25
|
var name$2 = "eslint-plugin-react-dom";
|
|
26
|
-
var version = "3.0.0-beta.
|
|
26
|
+
var version = "3.0.0-beta.60";
|
|
27
27
|
|
|
28
28
|
//#endregion
|
|
29
29
|
//#region src/utils/create-jsx-element-resolver.ts
|
|
@@ -67,72 +67,72 @@ function getDocsUrl(ruleName) {
|
|
|
67
67
|
const createRule = ESLintUtils.RuleCreator(getDocsUrl);
|
|
68
68
|
|
|
69
69
|
//#endregion
|
|
70
|
-
//#region src/rules/no-dangerously-set-innerhtml.ts
|
|
71
|
-
const RULE_NAME$17 = "no-dangerously-set-innerhtml";
|
|
72
|
-
|
|
73
|
-
var no_dangerously_set_innerhtml_default = createRule({
|
|
70
|
+
//#region src/rules/no-dangerously-set-innerhtml-with-children/no-dangerously-set-innerhtml-with-children.ts
|
|
71
|
+
const RULE_NAME$17 = "no-dangerously-set-innerhtml-with-children";
|
|
72
|
+
var no_dangerously_set_innerhtml_with_children_default = createRule({
|
|
74
73
|
meta: {
|
|
75
74
|
type: "problem",
|
|
76
|
-
docs: { description: "Disallows DOM elements from using 'dangerouslySetInnerHTML'." },
|
|
77
|
-
messages: { default: "
|
|
75
|
+
docs: { description: "Disallows DOM elements from using 'dangerouslySetInnerHTML' and 'children' at the same time." },
|
|
76
|
+
messages: { default: "A DOM component cannot use both children and 'dangerouslySetInnerHTML'." },
|
|
78
77
|
schema: []
|
|
79
78
|
},
|
|
80
79
|
name: RULE_NAME$17,
|
|
81
80
|
create: create$17,
|
|
82
81
|
defaultOptions: []
|
|
83
82
|
});
|
|
83
|
+
const DSIH$1 = "dangerouslySetInnerHTML";
|
|
84
|
+
/**
|
|
85
|
+
* Check if a JSX child node is considered significant (i.e., not just whitespace for formatting)
|
|
86
|
+
* @param node The JSX child node to check
|
|
87
|
+
* @returns `true` if the node is significant, `false` otherwise
|
|
88
|
+
*/
|
|
89
|
+
function isSignificantChildren(node) {
|
|
90
|
+
if (!core.isJsxText(node)) return true;
|
|
91
|
+
return !(node.raw.trim() === "" && node.raw.includes("\n"));
|
|
92
|
+
}
|
|
84
93
|
function create$17(context) {
|
|
85
94
|
if (!context.sourceCode.text.includes(DSIH$1)) return {};
|
|
86
|
-
return { JSXElement(node) {
|
|
87
|
-
const
|
|
88
|
-
if (
|
|
95
|
+
return defineRuleListener({ JSXElement(node) {
|
|
96
|
+
const findJsxAttribute = core.getJsxAttribute(context, node);
|
|
97
|
+
if (findJsxAttribute(DSIH$1) == null) return;
|
|
98
|
+
const childrenPropOrNode = findJsxAttribute("children") ?? node.children.find(isSignificantChildren);
|
|
99
|
+
if (childrenPropOrNode == null) return;
|
|
89
100
|
context.report({
|
|
90
101
|
messageId: "default",
|
|
91
|
-
node:
|
|
102
|
+
node: childrenPropOrNode
|
|
92
103
|
});
|
|
93
|
-
} };
|
|
104
|
+
} });
|
|
94
105
|
}
|
|
95
106
|
|
|
96
107
|
//#endregion
|
|
97
|
-
//#region src/rules/no-dangerously-set-innerhtml-
|
|
98
|
-
const RULE_NAME$16 = "no-dangerously-set-innerhtml
|
|
99
|
-
|
|
108
|
+
//#region src/rules/no-dangerously-set-innerhtml/no-dangerously-set-innerhtml.ts
|
|
109
|
+
const RULE_NAME$16 = "no-dangerously-set-innerhtml";
|
|
110
|
+
const DSIH = "dangerouslySetInnerHTML";
|
|
111
|
+
var no_dangerously_set_innerhtml_default = createRule({
|
|
100
112
|
meta: {
|
|
101
113
|
type: "problem",
|
|
102
|
-
docs: { description: "Disallows DOM elements from using 'dangerouslySetInnerHTML'
|
|
103
|
-
messages: { default: "
|
|
114
|
+
docs: { description: "Disallows DOM elements from using 'dangerouslySetInnerHTML'." },
|
|
115
|
+
messages: { default: "Using 'dangerouslySetInnerHTML' may have security implications." },
|
|
104
116
|
schema: []
|
|
105
117
|
},
|
|
106
118
|
name: RULE_NAME$16,
|
|
107
119
|
create: create$16,
|
|
108
120
|
defaultOptions: []
|
|
109
121
|
});
|
|
110
|
-
const DSIH = "dangerouslySetInnerHTML";
|
|
111
|
-
/**
|
|
112
|
-
* Check if a JSX child node is considered significant (i.e., not just whitespace for formatting)
|
|
113
|
-
* @param node The JSX child node to check
|
|
114
|
-
* @returns `true` if the node is significant, `false` otherwise
|
|
115
|
-
*/
|
|
116
|
-
function isSignificantChildren(node) {
|
|
117
|
-
if (!core.isJsxText(node)) return true;
|
|
118
|
-
return !(node.raw.trim() === "" && node.raw.includes("\n"));
|
|
119
|
-
}
|
|
120
122
|
function create$16(context) {
|
|
121
123
|
if (!context.sourceCode.text.includes(DSIH)) return {};
|
|
122
|
-
return { JSXElement(node) {
|
|
123
|
-
const
|
|
124
|
-
if (
|
|
125
|
-
const childrenPropOrNode = findJsxAttribute("children") ?? node.children.find(isSignificantChildren);
|
|
126
|
-
if (childrenPropOrNode == null) return;
|
|
124
|
+
return defineRuleListener({ JSXElement(node) {
|
|
125
|
+
const dsihProp = core.getJsxAttribute(context, node)(DSIH);
|
|
126
|
+
if (dsihProp == null) return;
|
|
127
127
|
context.report({
|
|
128
128
|
messageId: "default",
|
|
129
|
-
node:
|
|
129
|
+
node: dsihProp
|
|
130
130
|
});
|
|
131
|
-
} };
|
|
131
|
+
} });
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
//#endregion
|
|
135
|
-
//#region src/rules/no-find-dom-node.ts
|
|
135
|
+
//#region src/rules/no-find-dom-node/no-find-dom-node.ts
|
|
136
136
|
const RULE_NAME$15 = "no-find-dom-node";
|
|
137
137
|
var no_find_dom_node_default = createRule({
|
|
138
138
|
meta: {
|
|
@@ -148,7 +148,7 @@ var no_find_dom_node_default = createRule({
|
|
|
148
148
|
const findDOMNode = "findDOMNode";
|
|
149
149
|
function create$15(context) {
|
|
150
150
|
if (!context.sourceCode.text.includes(findDOMNode)) return {};
|
|
151
|
-
return { CallExpression(node) {
|
|
151
|
+
return defineRuleListener({ CallExpression(node) {
|
|
152
152
|
const { callee } = node;
|
|
153
153
|
switch (callee.type) {
|
|
154
154
|
case AST_NODE_TYPES.Identifier:
|
|
@@ -164,11 +164,11 @@ function create$15(context) {
|
|
|
164
164
|
});
|
|
165
165
|
return;
|
|
166
166
|
}
|
|
167
|
-
} };
|
|
167
|
+
} });
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
//#endregion
|
|
171
|
-
//#region src/rules/no-flush-sync.ts
|
|
171
|
+
//#region src/rules/no-flush-sync/no-flush-sync.ts
|
|
172
172
|
const RULE_NAME$14 = "no-flush-sync";
|
|
173
173
|
var no_flush_sync_default = createRule({
|
|
174
174
|
meta: {
|
|
@@ -184,7 +184,7 @@ var no_flush_sync_default = createRule({
|
|
|
184
184
|
const flushSync = "flushSync";
|
|
185
185
|
function create$14(context) {
|
|
186
186
|
if (!context.sourceCode.text.includes(flushSync)) return {};
|
|
187
|
-
return { CallExpression(node) {
|
|
187
|
+
return defineRuleListener({ CallExpression(node) {
|
|
188
188
|
const { callee } = node;
|
|
189
189
|
switch (callee.type) {
|
|
190
190
|
case AST_NODE_TYPES.Identifier:
|
|
@@ -200,11 +200,11 @@ function create$14(context) {
|
|
|
200
200
|
});
|
|
201
201
|
return;
|
|
202
202
|
}
|
|
203
|
-
} };
|
|
203
|
+
} });
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
//#endregion
|
|
207
|
-
//#region src/rules/no-hydrate.ts
|
|
207
|
+
//#region src/rules/no-hydrate/no-hydrate.ts
|
|
208
208
|
const RULE_NAME$13 = "no-hydrate";
|
|
209
209
|
var no_hydrate_default = createRule({
|
|
210
210
|
meta: {
|
|
@@ -224,21 +224,21 @@ function create$13(context) {
|
|
|
224
224
|
if (compare(getSettingsFromContext(context).version, "18.0.0", "<")) return {};
|
|
225
225
|
const reactDomNames = /* @__PURE__ */ new Set();
|
|
226
226
|
const hydrateNames = /* @__PURE__ */ new Set();
|
|
227
|
-
return {
|
|
227
|
+
return defineRuleListener({
|
|
228
228
|
CallExpression(node) {
|
|
229
229
|
switch (true) {
|
|
230
230
|
case node.callee.type === AST_NODE_TYPES.Identifier && hydrateNames.has(node.callee.name):
|
|
231
231
|
context.report({
|
|
232
|
+
fix: getFix$2(context, node),
|
|
232
233
|
messageId: "default",
|
|
233
|
-
node
|
|
234
|
-
fix: getFix$2(context, node)
|
|
234
|
+
node
|
|
235
235
|
});
|
|
236
236
|
return;
|
|
237
237
|
case node.callee.type === AST_NODE_TYPES.MemberExpression && node.callee.object.type === AST_NODE_TYPES.Identifier && node.callee.property.type === AST_NODE_TYPES.Identifier && node.callee.property.name === hydrate && reactDomNames.has(node.callee.object.name):
|
|
238
238
|
context.report({
|
|
239
|
+
fix: getFix$2(context, node),
|
|
239
240
|
messageId: "default",
|
|
240
|
-
node
|
|
241
|
-
fix: getFix$2(context, node)
|
|
241
|
+
node
|
|
242
242
|
});
|
|
243
243
|
return;
|
|
244
244
|
}
|
|
@@ -257,7 +257,7 @@ function create$13(context) {
|
|
|
257
257
|
continue;
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
|
-
};
|
|
260
|
+
});
|
|
261
261
|
}
|
|
262
262
|
function getFix$2(context, node) {
|
|
263
263
|
const getText = (n) => context.sourceCode.getText(n);
|
|
@@ -269,7 +269,7 @@ function getFix$2(context, node) {
|
|
|
269
269
|
}
|
|
270
270
|
|
|
271
271
|
//#endregion
|
|
272
|
-
//#region src/rules/no-missing-button-type.ts
|
|
272
|
+
//#region src/rules/no-missing-button-type/no-missing-button-type.ts
|
|
273
273
|
const RULE_NAME$12 = "no-missing-button-type";
|
|
274
274
|
const BUTTON_TYPES = [
|
|
275
275
|
"button",
|
|
@@ -293,23 +293,23 @@ var no_missing_button_type_default = createRule({
|
|
|
293
293
|
});
|
|
294
294
|
function create$12(context) {
|
|
295
295
|
const resolver = createJsxElementResolver(context);
|
|
296
|
-
return { JSXElement(node) {
|
|
296
|
+
return defineRuleListener({ JSXElement(node) {
|
|
297
297
|
if (resolver.resolve(node).domElementType !== "button") return;
|
|
298
298
|
if (core.getJsxAttribute(context, node)("type") != null) return;
|
|
299
299
|
context.report({
|
|
300
300
|
messageId: "missingTypeAttribute",
|
|
301
301
|
node: node.openingElement,
|
|
302
302
|
suggest: BUTTON_TYPES.map((type) => ({
|
|
303
|
-
messageId: "addTypeAttribute",
|
|
304
303
|
data: { type },
|
|
305
|
-
fix: (fixer) => fixer.insertTextAfter(node.openingElement.name, ` type="${type}"`)
|
|
304
|
+
fix: (fixer) => fixer.insertTextAfter(node.openingElement.name, ` type="${type}"`),
|
|
305
|
+
messageId: "addTypeAttribute"
|
|
306
306
|
}))
|
|
307
307
|
});
|
|
308
|
-
} };
|
|
308
|
+
} });
|
|
309
309
|
}
|
|
310
310
|
|
|
311
311
|
//#endregion
|
|
312
|
-
//#region src/rules/no-missing-iframe-sandbox.ts
|
|
312
|
+
//#region src/rules/no-missing-iframe-sandbox/no-missing-iframe-sandbox.ts
|
|
313
313
|
const RULE_NAME$11 = "no-missing-iframe-sandbox";
|
|
314
314
|
var no_missing_iframe_sandbox_default = createRule({
|
|
315
315
|
meta: {
|
|
@@ -329,7 +329,7 @@ var no_missing_iframe_sandbox_default = createRule({
|
|
|
329
329
|
});
|
|
330
330
|
function create$11(context) {
|
|
331
331
|
const resolver = createJsxElementResolver(context);
|
|
332
|
-
return { JSXElement(node) {
|
|
332
|
+
return defineRuleListener({ JSXElement(node) {
|
|
333
333
|
const { domElementType } = resolver.resolve(node);
|
|
334
334
|
if (domElementType !== "iframe") return;
|
|
335
335
|
const sandboxProp = core.getJsxAttribute(context, node)("sandbox");
|
|
@@ -338,11 +338,11 @@ function create$11(context) {
|
|
|
338
338
|
messageId: "missingSandboxAttribute",
|
|
339
339
|
node: node.openingElement,
|
|
340
340
|
suggest: [{
|
|
341
|
-
messageId: "addSandboxAttribute",
|
|
342
341
|
data: { value: "" },
|
|
343
342
|
fix(fixer) {
|
|
344
343
|
return fixer.insertTextAfter(node.openingElement.name, ` sandbox=""`);
|
|
345
|
-
}
|
|
344
|
+
},
|
|
345
|
+
messageId: "addSandboxAttribute"
|
|
346
346
|
}]
|
|
347
347
|
});
|
|
348
348
|
return;
|
|
@@ -353,19 +353,19 @@ function create$11(context) {
|
|
|
353
353
|
messageId: "missingSandboxAttribute",
|
|
354
354
|
node: sandboxValue.node ?? sandboxProp,
|
|
355
355
|
suggest: [{
|
|
356
|
-
messageId: "addSandboxAttribute",
|
|
357
356
|
data: { value: "" },
|
|
358
357
|
fix(fixer) {
|
|
359
358
|
if (sandboxValue.kind.startsWith("spread")) return null;
|
|
360
359
|
return fixer.replaceText(sandboxProp, `sandbox=""`);
|
|
361
|
-
}
|
|
360
|
+
},
|
|
361
|
+
messageId: "addSandboxAttribute"
|
|
362
362
|
}]
|
|
363
363
|
});
|
|
364
|
-
} };
|
|
364
|
+
} });
|
|
365
365
|
}
|
|
366
366
|
|
|
367
367
|
//#endregion
|
|
368
|
-
//#region src/rules/no-namespace.ts
|
|
368
|
+
//#region src/rules/no-namespace/no-namespace.ts
|
|
369
369
|
const RULE_NAME$10 = "no-namespace";
|
|
370
370
|
var no_namespace_default = createRule({
|
|
371
371
|
meta: {
|
|
@@ -379,26 +379,32 @@ var no_namespace_default = createRule({
|
|
|
379
379
|
defaultOptions: []
|
|
380
380
|
});
|
|
381
381
|
function create$10(context) {
|
|
382
|
-
return { JSXElement(node) {
|
|
382
|
+
return defineRuleListener({ JSXElement(node) {
|
|
383
383
|
const name = core.getJsxElementType(context, node);
|
|
384
384
|
if (typeof name !== "string" || !name.includes(":")) return;
|
|
385
385
|
context.report({
|
|
386
|
+
data: { name },
|
|
386
387
|
messageId: "default",
|
|
387
|
-
node: node.openingElement.name
|
|
388
|
-
data: { name }
|
|
388
|
+
node: node.openingElement.name
|
|
389
389
|
});
|
|
390
|
-
} };
|
|
390
|
+
} });
|
|
391
391
|
}
|
|
392
392
|
|
|
393
393
|
//#endregion
|
|
394
|
-
//#region src/rules/no-render.ts
|
|
395
|
-
const RULE_NAME$9 = "no-render";
|
|
396
|
-
|
|
394
|
+
//#region src/rules/no-render-return-value/no-render-return-value.ts
|
|
395
|
+
const RULE_NAME$9 = "no-render-return-value";
|
|
396
|
+
const banParentTypes = [
|
|
397
|
+
AST_NODE_TYPES.VariableDeclarator,
|
|
398
|
+
AST_NODE_TYPES.Property,
|
|
399
|
+
AST_NODE_TYPES.ReturnStatement,
|
|
400
|
+
AST_NODE_TYPES.ArrowFunctionExpression,
|
|
401
|
+
AST_NODE_TYPES.AssignmentExpression
|
|
402
|
+
];
|
|
403
|
+
var no_render_return_value_default = createRule({
|
|
397
404
|
meta: {
|
|
398
405
|
type: "problem",
|
|
399
|
-
docs: { description: "
|
|
400
|
-
|
|
401
|
-
messages: { default: "[Deprecated] Use 'createRoot(node).render()' instead." },
|
|
406
|
+
docs: { description: "Disallows the return value of 'ReactDOM.render'." },
|
|
407
|
+
messages: { default: "Do not depend on the return value from 'ReactDOM.render'." },
|
|
402
408
|
schema: []
|
|
403
409
|
},
|
|
404
410
|
name: RULE_NAME$9,
|
|
@@ -406,25 +412,21 @@ var no_render_default = createRule({
|
|
|
406
412
|
defaultOptions: []
|
|
407
413
|
});
|
|
408
414
|
function create$9(context) {
|
|
409
|
-
if (!context.sourceCode.text.includes("render")) return {};
|
|
410
|
-
if (compare(getSettingsFromContext(context).version, "18.0.0", "<")) return {};
|
|
411
415
|
const reactDomNames = new Set(["ReactDOM", "ReactDOM"]);
|
|
412
416
|
const renderNames = /* @__PURE__ */ new Set();
|
|
413
|
-
return {
|
|
417
|
+
return defineRuleListener({
|
|
414
418
|
CallExpression(node) {
|
|
415
419
|
switch (true) {
|
|
416
|
-
case node.callee.type === AST_NODE_TYPES.Identifier && renderNames.has(node.callee.name):
|
|
420
|
+
case node.callee.type === AST_NODE_TYPES.Identifier && renderNames.has(node.callee.name) && banParentTypes.includes(node.parent.type):
|
|
417
421
|
context.report({
|
|
418
422
|
messageId: "default",
|
|
419
|
-
node
|
|
420
|
-
fix: getFix$1(context, node)
|
|
423
|
+
node
|
|
421
424
|
});
|
|
422
425
|
return;
|
|
423
|
-
case node.callee.type === AST_NODE_TYPES.MemberExpression && node.callee.object.type === AST_NODE_TYPES.Identifier && node.callee.property.type === AST_NODE_TYPES.Identifier && node.callee.property.name === "render" && reactDomNames.has(node.callee.object.name):
|
|
426
|
+
case node.callee.type === AST_NODE_TYPES.MemberExpression && node.callee.object.type === AST_NODE_TYPES.Identifier && node.callee.property.type === AST_NODE_TYPES.Identifier && node.callee.property.name === "render" && reactDomNames.has(node.callee.object.name) && banParentTypes.includes(node.parent.type):
|
|
424
427
|
context.report({
|
|
425
428
|
messageId: "default",
|
|
426
|
-
node
|
|
427
|
-
fix: getFix$1(context, node)
|
|
429
|
+
node
|
|
428
430
|
});
|
|
429
431
|
return;
|
|
430
432
|
}
|
|
@@ -443,38 +445,18 @@ function create$9(context) {
|
|
|
443
445
|
continue;
|
|
444
446
|
}
|
|
445
447
|
}
|
|
446
|
-
};
|
|
447
|
-
}
|
|
448
|
-
/**
|
|
449
|
-
* Provides a fixer function to replace `render(app, container)` with `createRoot(container).render(app)`
|
|
450
|
-
* @param context The rule context
|
|
451
|
-
* @param node The `CallExpression` node to fix
|
|
452
|
-
* @returns A fixer function or null if the fix cannot be applied
|
|
453
|
-
*/
|
|
454
|
-
function getFix$1(context, node) {
|
|
455
|
-
const getText = (n) => context.sourceCode.getText(n);
|
|
456
|
-
return (fixer) => {
|
|
457
|
-
const [arg0, arg1] = node.arguments;
|
|
458
|
-
if (arg0 == null || arg1 == null) return null;
|
|
459
|
-
return [fixer.insertTextBefore(context.sourceCode.ast, "import { createRoot } from \"react-dom/client\";\n"), fixer.replaceText(node, `createRoot(${getText(arg1)}).render(${getText(arg0)})`)];
|
|
460
|
-
};
|
|
448
|
+
});
|
|
461
449
|
}
|
|
462
450
|
|
|
463
451
|
//#endregion
|
|
464
|
-
//#region src/rules/no-render-
|
|
465
|
-
const RULE_NAME$8 = "no-render
|
|
466
|
-
|
|
467
|
-
AST_NODE_TYPES.VariableDeclarator,
|
|
468
|
-
AST_NODE_TYPES.Property,
|
|
469
|
-
AST_NODE_TYPES.ReturnStatement,
|
|
470
|
-
AST_NODE_TYPES.ArrowFunctionExpression,
|
|
471
|
-
AST_NODE_TYPES.AssignmentExpression
|
|
472
|
-
];
|
|
473
|
-
var no_render_return_value_default = createRule({
|
|
452
|
+
//#region src/rules/no-render/no-render.ts
|
|
453
|
+
const RULE_NAME$8 = "no-render";
|
|
454
|
+
var no_render_default = createRule({
|
|
474
455
|
meta: {
|
|
475
456
|
type: "problem",
|
|
476
|
-
docs: { description: "
|
|
477
|
-
|
|
457
|
+
docs: { description: "Replaces usage of 'ReactDOM.render()' with 'createRoot(node).render()'." },
|
|
458
|
+
fixable: "code",
|
|
459
|
+
messages: { default: "[Deprecated] Use 'createRoot(node).render()' instead." },
|
|
478
460
|
schema: []
|
|
479
461
|
},
|
|
480
462
|
name: RULE_NAME$8,
|
|
@@ -482,19 +464,23 @@ var no_render_return_value_default = createRule({
|
|
|
482
464
|
defaultOptions: []
|
|
483
465
|
});
|
|
484
466
|
function create$8(context) {
|
|
467
|
+
if (!context.sourceCode.text.includes("render")) return {};
|
|
468
|
+
if (compare(getSettingsFromContext(context).version, "18.0.0", "<")) return {};
|
|
485
469
|
const reactDomNames = new Set(["ReactDOM", "ReactDOM"]);
|
|
486
470
|
const renderNames = /* @__PURE__ */ new Set();
|
|
487
|
-
return {
|
|
471
|
+
return defineRuleListener({
|
|
488
472
|
CallExpression(node) {
|
|
489
473
|
switch (true) {
|
|
490
|
-
case node.callee.type === AST_NODE_TYPES.Identifier && renderNames.has(node.callee.name)
|
|
474
|
+
case node.callee.type === AST_NODE_TYPES.Identifier && renderNames.has(node.callee.name):
|
|
491
475
|
context.report({
|
|
476
|
+
fix: getFix$1(context, node),
|
|
492
477
|
messageId: "default",
|
|
493
478
|
node
|
|
494
479
|
});
|
|
495
480
|
return;
|
|
496
|
-
case node.callee.type === AST_NODE_TYPES.MemberExpression && node.callee.object.type === AST_NODE_TYPES.Identifier && node.callee.property.type === AST_NODE_TYPES.Identifier && node.callee.property.name === "render" && reactDomNames.has(node.callee.object.name)
|
|
481
|
+
case node.callee.type === AST_NODE_TYPES.MemberExpression && node.callee.object.type === AST_NODE_TYPES.Identifier && node.callee.property.type === AST_NODE_TYPES.Identifier && node.callee.property.name === "render" && reactDomNames.has(node.callee.object.name):
|
|
497
482
|
context.report({
|
|
483
|
+
fix: getFix$1(context, node),
|
|
498
484
|
messageId: "default",
|
|
499
485
|
node
|
|
500
486
|
});
|
|
@@ -515,11 +501,25 @@ function create$8(context) {
|
|
|
515
501
|
continue;
|
|
516
502
|
}
|
|
517
503
|
}
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* Provides a fixer function to replace `render(app, container)` with `createRoot(container).render(app)`
|
|
508
|
+
* @param context The rule context
|
|
509
|
+
* @param node The `CallExpression` node to fix
|
|
510
|
+
* @returns A fixer function or null if the fix cannot be applied
|
|
511
|
+
*/
|
|
512
|
+
function getFix$1(context, node) {
|
|
513
|
+
const getText = (n) => context.sourceCode.getText(n);
|
|
514
|
+
return (fixer) => {
|
|
515
|
+
const [arg0, arg1] = node.arguments;
|
|
516
|
+
if (arg0 == null || arg1 == null) return null;
|
|
517
|
+
return [fixer.insertTextBefore(context.sourceCode.ast, "import { createRoot } from \"react-dom/client\";\n"), fixer.replaceText(node, `createRoot(${getText(arg1)}).render(${getText(arg0)})`)];
|
|
518
518
|
};
|
|
519
519
|
}
|
|
520
520
|
|
|
521
521
|
//#endregion
|
|
522
|
-
//#region src/rules/no-script-url.ts
|
|
522
|
+
//#region src/rules/no-script-url/no-script-url.ts
|
|
523
523
|
const RULE_NAME$7 = "no-script-url";
|
|
524
524
|
var no_script_url_default = createRule({
|
|
525
525
|
meta: {
|
|
@@ -533,18 +533,18 @@ var no_script_url_default = createRule({
|
|
|
533
533
|
defaultOptions: []
|
|
534
534
|
});
|
|
535
535
|
function create$7(context) {
|
|
536
|
-
return { JSXAttribute(node) {
|
|
536
|
+
return defineRuleListener({ JSXAttribute(node) {
|
|
537
537
|
if (node.name.type !== AST_NODE_TYPES.JSXIdentifier || node.value == null) return;
|
|
538
538
|
const value = core.resolveJsxAttributeValue(context, node).toStatic();
|
|
539
539
|
if (typeof value === "string" && RE_JAVASCRIPT_PROTOCOL.test(value)) context.report({
|
|
540
540
|
messageId: "default",
|
|
541
541
|
node: node.value
|
|
542
542
|
});
|
|
543
|
-
} };
|
|
543
|
+
} });
|
|
544
544
|
}
|
|
545
545
|
|
|
546
546
|
//#endregion
|
|
547
|
-
//#region src/rules/no-string-style-prop.ts
|
|
547
|
+
//#region src/rules/no-string-style-prop/no-string-style-prop.ts
|
|
548
548
|
const RULE_NAME$6 = "no-string-style-prop";
|
|
549
549
|
var no_string_style_prop_default = createRule({
|
|
550
550
|
meta: {
|
|
@@ -558,7 +558,7 @@ var no_string_style_prop_default = createRule({
|
|
|
558
558
|
defaultOptions: []
|
|
559
559
|
});
|
|
560
560
|
function create$6(context) {
|
|
561
|
-
return { JSXElement(node) {
|
|
561
|
+
return defineRuleListener({ JSXElement(node) {
|
|
562
562
|
if (!core.isJsxHostElement(context, node)) return;
|
|
563
563
|
const styleProp = core.getJsxAttribute(context, node)("style");
|
|
564
564
|
if (styleProp == null) return;
|
|
@@ -567,11 +567,11 @@ function create$6(context) {
|
|
|
567
567
|
messageId: "default",
|
|
568
568
|
node: styleValue.node ?? styleProp
|
|
569
569
|
});
|
|
570
|
-
} };
|
|
570
|
+
} });
|
|
571
571
|
}
|
|
572
572
|
|
|
573
573
|
//#endregion
|
|
574
|
-
//#region src/rules/no-unknown-property.ts
|
|
574
|
+
//#region src/rules/no-unknown-property/no-unknown-property.ts
|
|
575
575
|
const RULE_NAME$5 = "no-unknown-property";
|
|
576
576
|
const DEFAULTS = {
|
|
577
577
|
ignore: [],
|
|
@@ -679,7 +679,6 @@ const SVGDOM_ATTRIBUTE_NAMES = {
|
|
|
679
679
|
* Map of attributes that are only valid on specific HTML tags
|
|
680
680
|
*/
|
|
681
681
|
const ATTRIBUTE_TAGS_MAP = {
|
|
682
|
-
as: ["link"],
|
|
683
682
|
abbr: ["th", "td"],
|
|
684
683
|
align: [
|
|
685
684
|
"applet",
|
|
@@ -698,6 +697,7 @@ const ATTRIBUTE_TAGS_MAP = {
|
|
|
698
697
|
"tr"
|
|
699
698
|
],
|
|
700
699
|
allowFullScreen: ["iframe", "video"],
|
|
700
|
+
as: ["link"],
|
|
701
701
|
autoPictureInPicture: ["video"],
|
|
702
702
|
charset: ["meta"],
|
|
703
703
|
checked: ["input"],
|
|
@@ -1646,20 +1646,20 @@ function create$5(context) {
|
|
|
1646
1646
|
function getRequireDataLowercase() {
|
|
1647
1647
|
return context.options[0]?.requireDataLowercase ?? DEFAULTS.requireDataLowercase;
|
|
1648
1648
|
}
|
|
1649
|
-
return { JSXAttribute(node) {
|
|
1649
|
+
return defineRuleListener({ JSXAttribute(node) {
|
|
1650
1650
|
const ignoreNames = getIgnoreConfig();
|
|
1651
1651
|
const actualName = getText(context, node.name);
|
|
1652
|
-
if (ignoreNames.
|
|
1652
|
+
if (ignoreNames.includes(actualName)) return;
|
|
1653
1653
|
const name = normalizeAttributeCase(actualName);
|
|
1654
1654
|
if (tagNameHasDot(node)) return;
|
|
1655
1655
|
if (isValidDataAttribute(name)) {
|
|
1656
1656
|
if (getRequireDataLowercase() && hasUpperCaseCharacter(name)) context.report({
|
|
1657
|
-
messageId: "dataLowercaseRequired",
|
|
1658
|
-
node,
|
|
1659
1657
|
data: {
|
|
1660
1658
|
name: actualName,
|
|
1661
1659
|
lowerCaseName: actualName.toLowerCase()
|
|
1662
|
-
}
|
|
1660
|
+
},
|
|
1661
|
+
messageId: "dataLowercaseRequired",
|
|
1662
|
+
node
|
|
1663
1663
|
});
|
|
1664
1664
|
return;
|
|
1665
1665
|
}
|
|
@@ -1669,14 +1669,14 @@ function create$5(context) {
|
|
|
1669
1669
|
if (!isValidHTMLTagInJSX(node)) return;
|
|
1670
1670
|
const allowedTags = has(ATTRIBUTE_TAGS_MAP, name) ? ATTRIBUTE_TAGS_MAP[name] : null;
|
|
1671
1671
|
if (tagName != null && allowedTags != null) {
|
|
1672
|
-
if (allowedTags.
|
|
1673
|
-
messageId: "invalidPropOnTag",
|
|
1674
|
-
node,
|
|
1672
|
+
if (!allowedTags.includes(tagName)) context.report({
|
|
1675
1673
|
data: {
|
|
1676
1674
|
name: actualName,
|
|
1677
1675
|
allowedTags: allowedTags.join(", "),
|
|
1678
1676
|
tagName
|
|
1679
|
-
}
|
|
1677
|
+
},
|
|
1678
|
+
messageId: "invalidPropOnTag",
|
|
1679
|
+
node
|
|
1680
1680
|
});
|
|
1681
1681
|
return;
|
|
1682
1682
|
}
|
|
@@ -1685,28 +1685,28 @@ function create$5(context) {
|
|
|
1685
1685
|
if (standardName != null && standardName === name) return;
|
|
1686
1686
|
if (hasStandardNameButIsNotUsed) {
|
|
1687
1687
|
context.report({
|
|
1688
|
-
messageId: "unknownPropWithStandardName",
|
|
1689
|
-
node,
|
|
1690
1688
|
data: {
|
|
1691
1689
|
name: actualName,
|
|
1692
1690
|
standardName
|
|
1693
1691
|
},
|
|
1694
1692
|
fix(fixer) {
|
|
1695
1693
|
return fixer.replaceText(node.name, standardName);
|
|
1696
|
-
}
|
|
1694
|
+
},
|
|
1695
|
+
messageId: "unknownPropWithStandardName",
|
|
1696
|
+
node
|
|
1697
1697
|
});
|
|
1698
1698
|
return;
|
|
1699
1699
|
}
|
|
1700
1700
|
context.report({
|
|
1701
|
+
data: { name: actualName },
|
|
1701
1702
|
messageId: "unknownProp",
|
|
1702
|
-
node
|
|
1703
|
-
data: { name: actualName }
|
|
1703
|
+
node
|
|
1704
1704
|
});
|
|
1705
|
-
} };
|
|
1705
|
+
} });
|
|
1706
1706
|
}
|
|
1707
1707
|
|
|
1708
1708
|
//#endregion
|
|
1709
|
-
//#region src/rules/no-unsafe-iframe-sandbox.ts
|
|
1709
|
+
//#region src/rules/no-unsafe-iframe-sandbox/no-unsafe-iframe-sandbox.ts
|
|
1710
1710
|
const RULE_NAME$4 = "no-unsafe-iframe-sandbox";
|
|
1711
1711
|
const UNSAFE_SANDBOX_VALUES = ["allow-scripts", "allow-same-origin"];
|
|
1712
1712
|
/**
|
|
@@ -1733,7 +1733,7 @@ var no_unsafe_iframe_sandbox_default = createRule({
|
|
|
1733
1733
|
});
|
|
1734
1734
|
function create$4(context) {
|
|
1735
1735
|
const resolver = createJsxElementResolver(context);
|
|
1736
|
-
return { JSXElement(node) {
|
|
1736
|
+
return defineRuleListener({ JSXElement(node) {
|
|
1737
1737
|
if (resolver.resolve(node).domElementType !== "iframe") return;
|
|
1738
1738
|
const sandboxProp = core.getJsxAttribute(context, node)("sandbox");
|
|
1739
1739
|
if (sandboxProp == null) return;
|
|
@@ -1742,11 +1742,11 @@ function create$4(context) {
|
|
|
1742
1742
|
messageId: "default",
|
|
1743
1743
|
node: sandboxValue.node ?? sandboxProp
|
|
1744
1744
|
});
|
|
1745
|
-
} };
|
|
1745
|
+
} });
|
|
1746
1746
|
}
|
|
1747
1747
|
|
|
1748
1748
|
//#endregion
|
|
1749
|
-
//#region src/rules/no-unsafe-target-blank.ts
|
|
1749
|
+
//#region src/rules/no-unsafe-target-blank/no-unsafe-target-blank.ts
|
|
1750
1750
|
const RULE_NAME$3 = "no-unsafe-target-blank";
|
|
1751
1751
|
/**
|
|
1752
1752
|
* Check if a value appears to be an external link.
|
|
@@ -1786,7 +1786,7 @@ var no_unsafe_target_blank_default = createRule({
|
|
|
1786
1786
|
});
|
|
1787
1787
|
function create$3(context) {
|
|
1788
1788
|
const resolver = createJsxElementResolver(context);
|
|
1789
|
-
return { JSXElement(node) {
|
|
1789
|
+
return defineRuleListener({ JSXElement(node) {
|
|
1790
1790
|
const { domElementType } = resolver.resolve(node);
|
|
1791
1791
|
if (domElementType !== "a") return;
|
|
1792
1792
|
const findAttribute = core.getJsxAttribute(context, node);
|
|
@@ -1802,10 +1802,10 @@ function create$3(context) {
|
|
|
1802
1802
|
messageId: "default",
|
|
1803
1803
|
node: node.openingElement,
|
|
1804
1804
|
suggest: [{
|
|
1805
|
-
messageId: "addRelNoreferrerNoopener",
|
|
1806
1805
|
fix(fixer) {
|
|
1807
1806
|
return fixer.insertTextAfter(node.openingElement.name, ` rel="noreferrer noopener"`);
|
|
1808
|
-
}
|
|
1807
|
+
},
|
|
1808
|
+
messageId: "addRelNoreferrerNoopener"
|
|
1809
1809
|
}]
|
|
1810
1810
|
});
|
|
1811
1811
|
return;
|
|
@@ -1815,17 +1815,17 @@ function create$3(context) {
|
|
|
1815
1815
|
messageId: "default",
|
|
1816
1816
|
node: relProp,
|
|
1817
1817
|
suggest: [{
|
|
1818
|
-
messageId: "addRelNoreferrerNoopener",
|
|
1819
1818
|
fix(fixer) {
|
|
1820
1819
|
return fixer.replaceText(relProp, `rel="noreferrer noopener"`);
|
|
1821
|
-
}
|
|
1820
|
+
},
|
|
1821
|
+
messageId: "addRelNoreferrerNoopener"
|
|
1822
1822
|
}]
|
|
1823
1823
|
});
|
|
1824
|
-
} };
|
|
1824
|
+
} });
|
|
1825
1825
|
}
|
|
1826
1826
|
|
|
1827
1827
|
//#endregion
|
|
1828
|
-
//#region src/rules/no-use-form-state.ts
|
|
1828
|
+
//#region src/rules/no-use-form-state/no-use-form-state.ts
|
|
1829
1829
|
const RULE_NAME$2 = "no-use-form-state";
|
|
1830
1830
|
var no_use_form_state_default = createRule({
|
|
1831
1831
|
meta: {
|
|
@@ -1844,21 +1844,21 @@ function create$2(context) {
|
|
|
1844
1844
|
if (compare(getSettingsFromContext(context).version, "19.0.0", "<")) return {};
|
|
1845
1845
|
const reactDomNames = /* @__PURE__ */ new Set();
|
|
1846
1846
|
const useFormStateNames = /* @__PURE__ */ new Set();
|
|
1847
|
-
return {
|
|
1847
|
+
return defineRuleListener({
|
|
1848
1848
|
CallExpression(node) {
|
|
1849
1849
|
switch (true) {
|
|
1850
1850
|
case node.callee.type === AST_NODE_TYPES.Identifier && useFormStateNames.has(node.callee.name):
|
|
1851
1851
|
context.report({
|
|
1852
|
+
fix: getFix(context, node),
|
|
1852
1853
|
messageId: "default",
|
|
1853
|
-
node
|
|
1854
|
-
fix: getFix(context, node)
|
|
1854
|
+
node
|
|
1855
1855
|
});
|
|
1856
1856
|
return;
|
|
1857
1857
|
case node.callee.type === AST_NODE_TYPES.MemberExpression && node.callee.object.type === AST_NODE_TYPES.Identifier && node.callee.property.type === AST_NODE_TYPES.Identifier && node.callee.property.name === "useFormState" && reactDomNames.has(node.callee.object.name):
|
|
1858
1858
|
context.report({
|
|
1859
|
+
fix: getFix(context, node),
|
|
1859
1860
|
messageId: "default",
|
|
1860
|
-
node
|
|
1861
|
-
fix: getFix(context, node)
|
|
1861
|
+
node
|
|
1862
1862
|
});
|
|
1863
1863
|
return;
|
|
1864
1864
|
}
|
|
@@ -1877,7 +1877,7 @@ function create$2(context) {
|
|
|
1877
1877
|
continue;
|
|
1878
1878
|
}
|
|
1879
1879
|
}
|
|
1880
|
-
};
|
|
1880
|
+
});
|
|
1881
1881
|
}
|
|
1882
1882
|
function getFix(context, node) {
|
|
1883
1883
|
const { importSource } = getSettingsFromContext(context);
|
|
@@ -1887,7 +1887,7 @@ function getFix(context, node) {
|
|
|
1887
1887
|
}
|
|
1888
1888
|
|
|
1889
1889
|
//#endregion
|
|
1890
|
-
//#region src/rules/no-void-elements-with-children.ts
|
|
1890
|
+
//#region src/rules/no-void-elements-with-children/no-void-elements-with-children.ts
|
|
1891
1891
|
const RULE_NAME$1 = "no-void-elements-with-children";
|
|
1892
1892
|
const voidElements = new Set([
|
|
1893
1893
|
"area",
|
|
@@ -1920,26 +1920,26 @@ var no_void_elements_with_children_default = createRule({
|
|
|
1920
1920
|
});
|
|
1921
1921
|
function create$1(context) {
|
|
1922
1922
|
const resolver = createJsxElementResolver(context);
|
|
1923
|
-
return { JSXElement(node) {
|
|
1923
|
+
return defineRuleListener({ JSXElement(node) {
|
|
1924
1924
|
const { domElementType } = resolver.resolve(node);
|
|
1925
1925
|
if (!voidElements.has(domElementType)) return;
|
|
1926
1926
|
const findJsxAttribute = core.getJsxAttribute(context, node);
|
|
1927
1927
|
const hasChildrenProp = findJsxAttribute("children") != null;
|
|
1928
1928
|
const hasDangerouslySetInnerHTML = findJsxAttribute("dangerouslySetInnerHTML") != null;
|
|
1929
1929
|
if (node.children.length > 0 || hasChildrenProp || hasDangerouslySetInnerHTML) context.report({
|
|
1930
|
+
data: { elementType: domElementType },
|
|
1930
1931
|
messageId: "default",
|
|
1931
|
-
node
|
|
1932
|
-
data: { elementType: domElementType }
|
|
1932
|
+
node
|
|
1933
1933
|
});
|
|
1934
|
-
} };
|
|
1934
|
+
} });
|
|
1935
1935
|
}
|
|
1936
1936
|
|
|
1937
1937
|
//#endregion
|
|
1938
|
-
//#region src/rules/prefer-namespace-import.ts
|
|
1938
|
+
//#region src/rules/prefer-namespace-import/prefer-namespace-import.ts
|
|
1939
1939
|
const RULE_NAME = "prefer-namespace-import";
|
|
1940
1940
|
var prefer_namespace_import_default = createRule({
|
|
1941
1941
|
meta: {
|
|
1942
|
-
type: "
|
|
1942
|
+
type: "suggestion",
|
|
1943
1943
|
docs: { description: "Enforces importing React DOM via a namespace import." },
|
|
1944
1944
|
fixable: "code",
|
|
1945
1945
|
messages: { default: "Prefer importing React DOM via a namespace import." },
|
|
@@ -1955,13 +1955,11 @@ const importSources = [
|
|
|
1955
1955
|
"react-dom/server"
|
|
1956
1956
|
];
|
|
1957
1957
|
function create(context) {
|
|
1958
|
-
return { [`ImportDeclaration ImportDefaultSpecifier`](node) {
|
|
1958
|
+
return defineRuleListener({ [`ImportDeclaration ImportDefaultSpecifier`](node) {
|
|
1959
1959
|
const importSource = node.parent.source.value;
|
|
1960
1960
|
if (!importSources.includes(importSource)) return;
|
|
1961
1961
|
const hasOtherSpecifiers = node.parent.specifiers.length > 1;
|
|
1962
1962
|
context.report({
|
|
1963
|
-
messageId: "default",
|
|
1964
|
-
node: hasOtherSpecifiers ? node : node.parent,
|
|
1965
1963
|
data: { importSource },
|
|
1966
1964
|
fix(fixer) {
|
|
1967
1965
|
const importDeclarationText = context.sourceCode.getText(node.parent);
|
|
@@ -1972,9 +1970,11 @@ function create(context) {
|
|
|
1972
1970
|
if (!hasOtherSpecifiers) return fixer.replaceText(node.parent, `${importStringPrefix} * as ${node.local.name} from ${importSourceQuoted}${semi}`);
|
|
1973
1971
|
const specifiers = importDeclarationText.slice(importDeclarationText.indexOf("{"), importDeclarationText.indexOf("}") + 1);
|
|
1974
1972
|
return fixer.replaceText(node.parent, [`${importStringPrefix} * as ${node.local.name} from ${importSourceQuoted}${semi}`, `${importStringPrefix} ${specifiers} from ${importSourceQuoted}${semi}`].join("\n"));
|
|
1975
|
-
}
|
|
1973
|
+
},
|
|
1974
|
+
messageId: "default",
|
|
1975
|
+
node: hasOtherSpecifiers ? node : node.parent
|
|
1976
1976
|
});
|
|
1977
|
-
} };
|
|
1977
|
+
} });
|
|
1978
1978
|
}
|
|
1979
1979
|
|
|
1980
1980
|
//#endregion
|
|
@@ -2052,14 +2052,13 @@ const settings = { ...settings$1 };
|
|
|
2052
2052
|
|
|
2053
2053
|
//#endregion
|
|
2054
2054
|
//#region src/index.ts
|
|
2055
|
-
const
|
|
2056
|
-
var src_default = {
|
|
2055
|
+
const finalPlugin = {
|
|
2057
2056
|
...plugin,
|
|
2058
2057
|
configs: {
|
|
2059
|
-
["recommended"]:
|
|
2060
|
-
["strict"]:
|
|
2058
|
+
["recommended"]: recommended_exports,
|
|
2059
|
+
["strict"]: strict_exports
|
|
2061
2060
|
}
|
|
2062
2061
|
};
|
|
2063
2062
|
|
|
2064
2063
|
//#endregion
|
|
2065
|
-
export {
|
|
2064
|
+
export { finalPlugin as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-dom",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.60",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for DOM related rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -43,16 +43,17 @@
|
|
|
43
43
|
"@typescript-eslint/utils": "canary",
|
|
44
44
|
"compare-versions": "^6.1.1",
|
|
45
45
|
"ts-pattern": "^5.9.0",
|
|
46
|
-
"@eslint-react/ast": "3.0.0-beta.
|
|
47
|
-
"@eslint-react/core": "3.0.0-beta.
|
|
48
|
-
"@eslint-react/eff": "3.0.0-beta.
|
|
49
|
-
"@eslint-react/shared": "3.0.0-beta.
|
|
50
|
-
"@eslint-react/var": "3.0.0-beta.
|
|
46
|
+
"@eslint-react/ast": "3.0.0-beta.60",
|
|
47
|
+
"@eslint-react/core": "3.0.0-beta.60",
|
|
48
|
+
"@eslint-react/eff": "3.0.0-beta.60",
|
|
49
|
+
"@eslint-react/shared": "3.0.0-beta.60",
|
|
50
|
+
"@eslint-react/var": "3.0.0-beta.60"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/react": "^19.2.14",
|
|
54
54
|
"@types/react-dom": "^19.2.3",
|
|
55
|
-
"
|
|
55
|
+
"eslint": "^10.0.2",
|
|
56
|
+
"tsdown": "^0.21.0-beta.2",
|
|
56
57
|
"@local/configs": "0.0.0"
|
|
57
58
|
},
|
|
58
59
|
"peerDependencies": {
|
|
@@ -68,6 +69,6 @@
|
|
|
68
69
|
"scripts": {
|
|
69
70
|
"build": "tsdown",
|
|
70
71
|
"lint:publish": "publint",
|
|
71
|
-
"lint:ts": "
|
|
72
|
+
"lint:ts": "tsl"
|
|
72
73
|
}
|
|
73
74
|
}
|