eslint-plugin-react-dom 5.18.2 → 5.18.4
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 +11 -6
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -25,7 +25,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
25
25
|
//#endregion
|
|
26
26
|
//#region package.json
|
|
27
27
|
var name$2 = "eslint-plugin-react-dom";
|
|
28
|
-
var version = "5.18.
|
|
28
|
+
var version = "5.18.4";
|
|
29
29
|
|
|
30
30
|
//#endregion
|
|
31
31
|
//#region src/utils/create-rule.ts
|
|
@@ -152,7 +152,8 @@ var no_hydrate_default = createRule({
|
|
|
152
152
|
});
|
|
153
153
|
function create$11(context) {
|
|
154
154
|
if (!context.sourceCode.text.includes("hydrate")) return {};
|
|
155
|
-
|
|
155
|
+
const settings = getSettingsFromContext(context);
|
|
156
|
+
if (compare(settings.version, "18.0.0", "<")) return {};
|
|
156
157
|
const reactDomNames = /* @__PURE__ */ new Set();
|
|
157
158
|
const hydrateNames = /* @__PURE__ */ new Set();
|
|
158
159
|
return {
|
|
@@ -415,7 +416,8 @@ var no_render_default = createRule({
|
|
|
415
416
|
});
|
|
416
417
|
function create$7(context) {
|
|
417
418
|
if (!context.sourceCode.text.includes("render")) return {};
|
|
418
|
-
|
|
419
|
+
const settings = getSettingsFromContext(context);
|
|
420
|
+
if (compare(settings.version, "18.0.0", "<")) return {};
|
|
419
421
|
const reactDomNames = /* @__PURE__ */ new Set(["ReactDOM", "ReactDOM"]);
|
|
420
422
|
const renderNames = /* @__PURE__ */ new Set();
|
|
421
423
|
return {
|
|
@@ -1775,7 +1777,8 @@ function create$2(context) {
|
|
|
1775
1777
|
const { domElementType } = resolver.resolve(node);
|
|
1776
1778
|
if (domElementType !== "a") return;
|
|
1777
1779
|
if (getAttributeStaticValue(context, node, "target") !== "_blank") return;
|
|
1778
|
-
|
|
1780
|
+
const hrefValueString = getAttributeStaticValue(context, node, "href");
|
|
1781
|
+
if (!isExternalLinkLike(hrefValueString)) return;
|
|
1779
1782
|
const relProp = findAttribute(context, node, "rel");
|
|
1780
1783
|
if (relProp == null) {
|
|
1781
1784
|
context.report({
|
|
@@ -1790,7 +1793,8 @@ function create$2(context) {
|
|
|
1790
1793
|
});
|
|
1791
1794
|
return;
|
|
1792
1795
|
}
|
|
1793
|
-
|
|
1796
|
+
const relValueString = getAttributeStaticValue(context, node, "rel");
|
|
1797
|
+
if (isSafeRel(relValueString)) return;
|
|
1794
1798
|
context.report({
|
|
1795
1799
|
messageId: "default",
|
|
1796
1800
|
node: relProp,
|
|
@@ -1821,7 +1825,8 @@ var no_use_form_state_default = createRule({
|
|
|
1821
1825
|
});
|
|
1822
1826
|
function create$1(context) {
|
|
1823
1827
|
if (!context.sourceCode.text.includes("useFormState")) return {};
|
|
1824
|
-
|
|
1828
|
+
const settings = getSettingsFromContext(context);
|
|
1829
|
+
if (compare(settings.version, "19.0.0", "<")) return {};
|
|
1825
1830
|
const reactDomNames = /* @__PURE__ */ new Set();
|
|
1826
1831
|
const useFormStateNames = /* @__PURE__ */ new Set();
|
|
1827
1832
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-dom",
|
|
3
|
-
"version": "5.18.
|
|
3
|
+
"version": "5.18.4",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for DOM related rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -37,19 +37,19 @@
|
|
|
37
37
|
"dist"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@typescript-eslint/types": "^8.
|
|
41
|
-
"@typescript-eslint/utils": "^8.
|
|
40
|
+
"@typescript-eslint/types": "^8.66.0",
|
|
41
|
+
"@typescript-eslint/utils": "^8.66.0",
|
|
42
42
|
"compare-versions": "^6.1.1",
|
|
43
|
-
"@eslint-react/
|
|
44
|
-
"@eslint-react/
|
|
45
|
-
"@eslint-react/eslint": "5.18.
|
|
46
|
-
"@eslint-react/
|
|
43
|
+
"@eslint-react/shared": "5.18.4",
|
|
44
|
+
"@eslint-react/ast": "5.18.4",
|
|
45
|
+
"@eslint-react/eslint": "5.18.4",
|
|
46
|
+
"@eslint-react/jsx": "5.18.4"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/react": "^19.2.18",
|
|
50
50
|
"@types/react-dom": "^19.2.4",
|
|
51
51
|
"dedent": "^1.7.2",
|
|
52
|
-
"eslint": "^10.8.
|
|
52
|
+
"eslint": "^10.8.1",
|
|
53
53
|
"tsdown": "^0.22.14",
|
|
54
54
|
"typescript": "6.0.3",
|
|
55
55
|
"@local/configs": "0.0.0",
|