eslint-plugin-react-dom 2.0.7-beta.2 → 2.0.7-beta.3
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 +7 -13
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -47,7 +47,7 @@ const settings = { "react-x": DEFAULT_ESLINT_REACT_SETTINGS };
|
|
|
47
47
|
//#endregion
|
|
48
48
|
//#region package.json
|
|
49
49
|
var name = "eslint-plugin-react-dom";
|
|
50
|
-
var version = "2.0.7-beta.
|
|
50
|
+
var version = "2.0.7-beta.3";
|
|
51
51
|
|
|
52
52
|
//#endregion
|
|
53
53
|
//#region src/utils/create-jsx-element-resolver.ts
|
|
@@ -262,8 +262,7 @@ var no_hydrate_default = createRule({
|
|
|
262
262
|
const hydrate = "hydrate";
|
|
263
263
|
function create$13(context) {
|
|
264
264
|
if (!context.sourceCode.text.includes(hydrate)) return {};
|
|
265
|
-
|
|
266
|
-
if (compare(settings$1.version, "18.0.0", "<")) return {};
|
|
265
|
+
if (compare(getSettingsFromContext(context).version, "18.0.0", "<")) return {};
|
|
267
266
|
const reactDomNames = /* @__PURE__ */ new Set();
|
|
268
267
|
const hydrateNames = /* @__PURE__ */ new Set();
|
|
269
268
|
return {
|
|
@@ -465,8 +464,7 @@ var no_render_default = createRule({
|
|
|
465
464
|
});
|
|
466
465
|
function create$9(context) {
|
|
467
466
|
if (!context.sourceCode.text.includes("render")) return {};
|
|
468
|
-
|
|
469
|
-
if (compare(settings$1.version, "18.0.0", "<")) return {};
|
|
467
|
+
if (compare(getSettingsFromContext(context).version, "18.0.0", "<")) return {};
|
|
470
468
|
const reactDomNames = new Set(["ReactDOM", "ReactDom"]);
|
|
471
469
|
const renderNames = /* @__PURE__ */ new Set();
|
|
472
470
|
return {
|
|
@@ -1812,8 +1810,7 @@ function create$4(context) {
|
|
|
1812
1810
|
const sandboxProp = getJsxAttribute(context, node)("sandbox");
|
|
1813
1811
|
if (sandboxProp == null) return;
|
|
1814
1812
|
const sandboxValue = resolveJsxAttributeValue(context, sandboxProp);
|
|
1815
|
-
|
|
1816
|
-
if (isUnsafeSandboxCombination(sandboxValueStatic)) context.report({
|
|
1813
|
+
if (isUnsafeSandboxCombination(sandboxValue.toStatic("sandbox"))) context.report({
|
|
1817
1814
|
messageId: "noUnsafeIframeSandbox",
|
|
1818
1815
|
node: sandboxValue.node ?? sandboxProp
|
|
1819
1816
|
});
|
|
@@ -1874,8 +1871,7 @@ function create$3(context) {
|
|
|
1874
1871
|
if (resolveJsxAttributeValue(context, targetProp).toStatic("target") !== "_blank") return;
|
|
1875
1872
|
const hrefProp = findAttribute("href");
|
|
1876
1873
|
if (hrefProp == null) return;
|
|
1877
|
-
|
|
1878
|
-
if (!isExternalLinkLike(hrefValue)) return;
|
|
1874
|
+
if (!isExternalLinkLike(resolveJsxAttributeValue(context, hrefProp).toStatic("href"))) return;
|
|
1879
1875
|
const relProp = findAttribute("rel");
|
|
1880
1876
|
if (relProp == null) {
|
|
1881
1877
|
context.report({
|
|
@@ -1890,8 +1886,7 @@ function create$3(context) {
|
|
|
1890
1886
|
});
|
|
1891
1887
|
return;
|
|
1892
1888
|
}
|
|
1893
|
-
|
|
1894
|
-
if (isSafeRel(relValue)) return;
|
|
1889
|
+
if (isSafeRel(resolveJsxAttributeValue(context, relProp).toStatic("rel"))) return;
|
|
1895
1890
|
context.report({
|
|
1896
1891
|
messageId: "noUnsafeTargetBlank",
|
|
1897
1892
|
node: relProp,
|
|
@@ -1926,8 +1921,7 @@ var no_use_form_state_default = createRule({
|
|
|
1926
1921
|
});
|
|
1927
1922
|
function create$2(context) {
|
|
1928
1923
|
if (!context.sourceCode.text.includes("useFormState")) return {};
|
|
1929
|
-
|
|
1930
|
-
if (compare(settings$1.version, "19.0.0", "<")) return {};
|
|
1924
|
+
if (compare(getSettingsFromContext(context).version, "19.0.0", "<")) return {};
|
|
1931
1925
|
const reactDomNames = /* @__PURE__ */ new Set();
|
|
1932
1926
|
const useFormStateNames = /* @__PURE__ */ new Set();
|
|
1933
1927
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-dom",
|
|
3
|
-
"version": "2.0.7-beta.
|
|
3
|
+
"version": "2.0.7-beta.3",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for React DOM related rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -41,16 +41,16 @@
|
|
|
41
41
|
"compare-versions": "^6.1.1",
|
|
42
42
|
"string-ts": "^2.2.1",
|
|
43
43
|
"ts-pattern": "^5.8.0",
|
|
44
|
-
"@eslint-react/ast": "2.0.7-beta.
|
|
45
|
-
"@eslint-react/core": "2.0.7-beta.
|
|
46
|
-
"@eslint-react/eff": "2.0.7-beta.
|
|
47
|
-
"@eslint-react/
|
|
48
|
-
"@eslint-react/
|
|
49
|
-
"@eslint-react/
|
|
44
|
+
"@eslint-react/ast": "2.0.7-beta.3",
|
|
45
|
+
"@eslint-react/core": "2.0.7-beta.3",
|
|
46
|
+
"@eslint-react/eff": "2.0.7-beta.3",
|
|
47
|
+
"@eslint-react/shared": "2.0.7-beta.3",
|
|
48
|
+
"@eslint-react/var": "2.0.7-beta.3",
|
|
49
|
+
"@eslint-react/kit": "2.0.7-beta.3"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@types/react": "^19.2.
|
|
53
|
-
"@types/react-dom": "^19.2.
|
|
52
|
+
"@types/react": "^19.2.2",
|
|
53
|
+
"@types/react-dom": "^19.2.1",
|
|
54
54
|
"tsdown": "^0.15.6",
|
|
55
55
|
"@local/configs": "0.0.0"
|
|
56
56
|
},
|