eslint-plugin-react-dom 5.28.7 → 5.28.8
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.js +4 -9
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DEFAULT_ESLINT_REACT_SETTINGS, RE_JAVASCRIPT_PROTOCOL, getSettingsFromContext } from "@eslint-react/shared";
|
|
2
2
|
import * as ESLintUtils from "@typescript-eslint/utils/eslint-utils";
|
|
3
|
-
import "@eslint-react/eslint";
|
|
3
|
+
import { getText } from "@eslint-react/eslint";
|
|
4
4
|
import { findAttribute, getAttributeStaticValue, getElementFullType, hasAnyAttribute, hasAttribute, isAttribute, isHostElement, isPaddingWhitespace, resolveAttributeValue } from "@eslint-react/jsx";
|
|
5
5
|
import { Check, Extract } from "@eslint-react/ast";
|
|
6
6
|
import { createImportLookup } from "@eslint-react/var";
|
|
@@ -20,7 +20,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
20
20
|
//#endregion
|
|
21
21
|
//#region package.json
|
|
22
22
|
var name$2 = "eslint-plugin-react-dom";
|
|
23
|
-
var version = "5.28.
|
|
23
|
+
var version = "5.28.8";
|
|
24
24
|
//#endregion
|
|
25
25
|
//#region src/utils/create-rule.ts
|
|
26
26
|
function getDocsUrl(ruleName) {
|
|
@@ -172,11 +172,10 @@ function create$11(context) {
|
|
|
172
172
|
} };
|
|
173
173
|
}
|
|
174
174
|
function buildFix$2(context, node) {
|
|
175
|
-
const getText = (n) => context.sourceCode.getText(n);
|
|
176
175
|
return (fixer) => {
|
|
177
176
|
const [arg0, arg1] = node.arguments;
|
|
178
177
|
if (arg0 == null || arg1 == null) return null;
|
|
179
|
-
return [fixer.insertTextBefore(context.sourceCode.ast, "import { hydrateRoot } from \"react-dom/client\";\n"), fixer.replaceText(node, `hydrateRoot(${getText(arg1)}, ${getText(arg0)})`)];
|
|
178
|
+
return [fixer.insertTextBefore(context.sourceCode.ast, "import { hydrateRoot } from \"react-dom/client\";\n"), fixer.replaceText(node, `hydrateRoot(${getText(context, arg1)}, ${getText(context, arg0)})`)];
|
|
180
179
|
};
|
|
181
180
|
}
|
|
182
181
|
//#endregion
|
|
@@ -475,11 +474,10 @@ function create$7(context) {
|
|
|
475
474
|
} };
|
|
476
475
|
}
|
|
477
476
|
function buildFix$1(context, node) {
|
|
478
|
-
const getText = (n) => context.sourceCode.getText(n);
|
|
479
477
|
return (fixer) => {
|
|
480
478
|
const [arg0, arg1] = node.arguments;
|
|
481
479
|
if (arg0 == null || arg1 == null) return null;
|
|
482
|
-
return [fixer.insertTextBefore(context.sourceCode.ast, "import { createRoot } from \"react-dom/client\";\n"), fixer.replaceText(node, `createRoot(${getText(arg1)}).render(${getText(arg0)})`)];
|
|
480
|
+
return [fixer.insertTextBefore(context.sourceCode.ast, "import { createRoot } from \"react-dom/client\";\n"), fixer.replaceText(node, `createRoot(${getText(context, arg1)}).render(${getText(context, arg0)})`)];
|
|
483
481
|
};
|
|
484
482
|
}
|
|
485
483
|
var no_script_url_default = createRule({
|
|
@@ -1492,9 +1490,6 @@ function getStandardName(name, context) {
|
|
|
1492
1490
|
if (has(svgAttributeNames, name)) return svgAttributeNames[name] ?? null;
|
|
1493
1491
|
return getDOMPropertyNames(context).find((element) => element.toLowerCase() === name.toLowerCase()) ?? null;
|
|
1494
1492
|
}
|
|
1495
|
-
function getText(context, node) {
|
|
1496
|
-
return context.sourceCode.getText(node);
|
|
1497
|
-
}
|
|
1498
1493
|
//#endregion
|
|
1499
1494
|
//#region src/rules/no-unknown-property/no-unknown-property.ts
|
|
1500
1495
|
const RULE_NAME$4 = "no-unknown-property";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-dom",
|
|
3
|
-
"version": "5.28.
|
|
3
|
+
"version": "5.28.8",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for DOM related rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"dist"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@eslint-react/ast": "5.28.
|
|
41
|
-
"@eslint-react/eslint": "5.28.
|
|
42
|
-
"@eslint-react/jsx": "5.28.
|
|
43
|
-
"@eslint-react/shared": "5.28.
|
|
44
|
-
"@eslint-react/var": "5.28.
|
|
40
|
+
"@eslint-react/ast": "5.28.8",
|
|
41
|
+
"@eslint-react/eslint": "5.28.8",
|
|
42
|
+
"@eslint-react/jsx": "5.28.8",
|
|
43
|
+
"@eslint-react/shared": "5.28.8",
|
|
44
|
+
"@eslint-react/var": "5.28.8",
|
|
45
45
|
"@typescript-eslint/types": "^8.72.0",
|
|
46
46
|
"@typescript-eslint/utils": "^8.72.0",
|
|
47
47
|
"compare-versions": "^6.1.1",
|