eslint-plugin-react-dom 5.28.8 → 5.30.0-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/index.d.ts +0 -2
- package/dist/index.js +18 -35
- package/package.json +7 -7
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Check, Extract } from "@eslint-react/ast";
|
|
|
6
6
|
import { createImportLookup } from "@eslint-react/var";
|
|
7
7
|
import { AST_NODE_TYPES } from "@typescript-eslint/types";
|
|
8
8
|
import { compare } from "compare-versions";
|
|
9
|
-
|
|
9
|
+
// \0rolldown/runtime.js
|
|
10
10
|
var __defProp = Object.defineProperty;
|
|
11
11
|
var __exportAll = (all, no_symbols) => {
|
|
12
12
|
let target = {};
|
|
@@ -17,12 +17,10 @@ var __exportAll = (all, no_symbols) => {
|
|
|
17
17
|
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
18
18
|
return target;
|
|
19
19
|
};
|
|
20
|
-
|
|
21
|
-
//#region package.json
|
|
20
|
+
// package.json
|
|
22
21
|
var name$2 = "eslint-plugin-react-dom";
|
|
23
|
-
var version = "5.
|
|
24
|
-
|
|
25
|
-
//#region src/utils/create-rule.ts
|
|
22
|
+
var version = "5.30.0-beta.1";
|
|
23
|
+
// src/utils/create-rule.ts
|
|
26
24
|
function getDocsUrl(ruleName) {
|
|
27
25
|
return `https://eslint-react.xyz/docs/rules/dom-${ruleName}`;
|
|
28
26
|
}
|
|
@@ -178,8 +176,7 @@ function buildFix$2(context, node) {
|
|
|
178
176
|
return [fixer.insertTextBefore(context.sourceCode.ast, "import { hydrateRoot } from \"react-dom/client\";\n"), fixer.replaceText(node, `hydrateRoot(${getText(context, arg1)}, ${getText(context, arg0)})`)];
|
|
179
177
|
};
|
|
180
178
|
}
|
|
181
|
-
|
|
182
|
-
//#region ../../.pkgs/eff/dist/index.js
|
|
179
|
+
// ../../.pkgs/eff/dist/index.js
|
|
183
180
|
const pipeArguments = (self, args) => {
|
|
184
181
|
switch (args.length) {
|
|
185
182
|
case 0: return self;
|
|
@@ -273,8 +270,7 @@ dual(2, (self, predicate) => {
|
|
|
273
270
|
while (idx < len && predicate(input[idx], idx)) idx++;
|
|
274
271
|
return input.slice(0, idx);
|
|
275
272
|
});
|
|
276
|
-
|
|
277
|
-
//#region src/utils/create-jsx-element-resolver.ts
|
|
273
|
+
// src/utils/create-jsx-element-resolver.ts
|
|
278
274
|
function createJSXElementResolver(context) {
|
|
279
275
|
const { polymorphicPropName } = getSettingsFromContext(context);
|
|
280
276
|
return { resolve(node) {
|
|
@@ -293,8 +289,7 @@ function createJSXElementResolver(context) {
|
|
|
293
289
|
return result;
|
|
294
290
|
} };
|
|
295
291
|
}
|
|
296
|
-
|
|
297
|
-
//#region src/rules/no-missing-button-type/no-missing-button-type.ts
|
|
292
|
+
// src/rules/no-missing-button-type/no-missing-button-type.ts
|
|
298
293
|
const RULE_NAME$10 = "no-missing-button-type";
|
|
299
294
|
const BUTTON_TYPES = [
|
|
300
295
|
"button",
|
|
@@ -385,8 +380,7 @@ function create$9(context) {
|
|
|
385
380
|
});
|
|
386
381
|
} };
|
|
387
382
|
}
|
|
388
|
-
|
|
389
|
-
//#region src/rules/no-render-return-value/no-render-return-value.ts
|
|
383
|
+
// src/rules/no-render-return-value/no-render-return-value.ts
|
|
390
384
|
const RULE_NAME$8 = "no-render-return-value";
|
|
391
385
|
const BANNED_PARENT_TYPES = [
|
|
392
386
|
AST_NODE_TYPES.VariableDeclarator,
|
|
@@ -523,8 +517,7 @@ function create$5(context) {
|
|
|
523
517
|
});
|
|
524
518
|
} };
|
|
525
519
|
}
|
|
526
|
-
|
|
527
|
-
//#region src/rules/no-unknown-property/lib.ts
|
|
520
|
+
// src/rules/no-unknown-property/lib.ts
|
|
528
521
|
const DOM_ATTRIBUTE_NAMES = {
|
|
529
522
|
"accept-charset": "acceptCharset",
|
|
530
523
|
class: "className",
|
|
@@ -1490,8 +1483,7 @@ function getStandardName(name, context) {
|
|
|
1490
1483
|
if (has(svgAttributeNames, name)) return svgAttributeNames[name] ?? null;
|
|
1491
1484
|
return getDOMPropertyNames(context).find((element) => element.toLowerCase() === name.toLowerCase()) ?? null;
|
|
1492
1485
|
}
|
|
1493
|
-
|
|
1494
|
-
//#region src/rules/no-unknown-property/no-unknown-property.ts
|
|
1486
|
+
// src/rules/no-unknown-property/no-unknown-property.ts
|
|
1495
1487
|
const RULE_NAME$4 = "no-unknown-property";
|
|
1496
1488
|
const DEFAULTS = {
|
|
1497
1489
|
ignore: [],
|
|
@@ -1594,8 +1586,7 @@ function create$4(context) {
|
|
|
1594
1586
|
});
|
|
1595
1587
|
} };
|
|
1596
1588
|
}
|
|
1597
|
-
|
|
1598
|
-
//#region src/rules/no-unsafe-iframe-sandbox/no-unsafe-iframe-sandbox.ts
|
|
1589
|
+
// src/rules/no-unsafe-iframe-sandbox/no-unsafe-iframe-sandbox.ts
|
|
1599
1590
|
const RULE_NAME$3 = "no-unsafe-iframe-sandbox";
|
|
1600
1591
|
const UNSAFE_SANDBOX_VALUES = ["allow-scripts", "allow-same-origin"];
|
|
1601
1592
|
var no_unsafe_iframe_sandbox_default = createRule({
|
|
@@ -1624,8 +1615,7 @@ function create$3(context) {
|
|
|
1624
1615
|
});
|
|
1625
1616
|
} };
|
|
1626
1617
|
}
|
|
1627
|
-
|
|
1628
|
-
//#region src/rules/no-unsafe-target-blank/lib.ts
|
|
1618
|
+
// src/rules/no-unsafe-target-blank/lib.ts
|
|
1629
1619
|
function isExternalLinkLike(value) {
|
|
1630
1620
|
if (!isString(value)) return false;
|
|
1631
1621
|
return value.startsWith("https://") || /^(?:\w+:|\/\/)/u.test(value);
|
|
@@ -1635,8 +1625,7 @@ function isSafeRel(value, allowReferrer) {
|
|
|
1635
1625
|
if (/\bnoreferrer\b/u.test(value)) return true;
|
|
1636
1626
|
return allowReferrer && /\bnoopener\b/u.test(value);
|
|
1637
1627
|
}
|
|
1638
|
-
|
|
1639
|
-
//#region src/rules/no-unsafe-target-blank/no-unsafe-target-blank.ts
|
|
1628
|
+
// src/rules/no-unsafe-target-blank/no-unsafe-target-blank.ts
|
|
1640
1629
|
const RULE_NAME$2 = "no-unsafe-target-blank";
|
|
1641
1630
|
const defaultOptions = [{ allowReferrer: false }];
|
|
1642
1631
|
const schema = [{
|
|
@@ -1741,8 +1730,7 @@ function buildFix(context, node) {
|
|
|
1741
1730
|
return [fixer.insertTextBefore(context.sourceCode.ast, `import { useActionState } from "${importSource}";\n`), fixer.replaceText(node.callee, "useActionState")];
|
|
1742
1731
|
};
|
|
1743
1732
|
}
|
|
1744
|
-
|
|
1745
|
-
//#region src/rules/no-void-elements-with-children/lib.ts
|
|
1733
|
+
// src/rules/no-void-elements-with-children/lib.ts
|
|
1746
1734
|
const KNOWN_VOID_ELEMENTS = /* @__PURE__ */ new Set([
|
|
1747
1735
|
"area",
|
|
1748
1736
|
"base",
|
|
@@ -1783,8 +1771,7 @@ function create(context) {
|
|
|
1783
1771
|
});
|
|
1784
1772
|
} };
|
|
1785
1773
|
}
|
|
1786
|
-
|
|
1787
|
-
//#region src/plugin.ts
|
|
1774
|
+
// src/plugin.ts
|
|
1788
1775
|
const plugin = {
|
|
1789
1776
|
meta: {
|
|
1790
1777
|
name: name$2,
|
|
@@ -1809,8 +1796,7 @@ const plugin = {
|
|
|
1809
1796
|
"no-void-elements-with-children": no_void_elements_with_children_default
|
|
1810
1797
|
}
|
|
1811
1798
|
};
|
|
1812
|
-
|
|
1813
|
-
//#region src/configs/recommended.ts
|
|
1799
|
+
// src/configs/recommended.ts
|
|
1814
1800
|
var recommended_exports = /* @__PURE__ */ __exportAll({
|
|
1815
1801
|
name: () => name$1,
|
|
1816
1802
|
plugins: () => plugins$1,
|
|
@@ -1833,8 +1819,7 @@ const rules$1 = {
|
|
|
1833
1819
|
};
|
|
1834
1820
|
const plugins$1 = { "react-dom": plugin };
|
|
1835
1821
|
const settings$1 = { "react-x": DEFAULT_ESLINT_REACT_SETTINGS };
|
|
1836
|
-
|
|
1837
|
-
//#region src/configs/strict.ts
|
|
1822
|
+
// src/configs/strict.ts
|
|
1838
1823
|
var strict_exports = /* @__PURE__ */ __exportAll({
|
|
1839
1824
|
name: () => name,
|
|
1840
1825
|
plugins: () => plugins,
|
|
@@ -1850,8 +1835,7 @@ const rules = {
|
|
|
1850
1835
|
};
|
|
1851
1836
|
const plugins = { ...plugins$1 };
|
|
1852
1837
|
const settings = { ...settings$1 };
|
|
1853
|
-
|
|
1854
|
-
//#region src/index.ts
|
|
1838
|
+
// src/index.ts
|
|
1855
1839
|
function createConfig(base) {
|
|
1856
1840
|
return {
|
|
1857
1841
|
...base,
|
|
@@ -1870,5 +1854,4 @@ const finalPlugin = {
|
|
|
1870
1854
|
["strict"]: createConfig(strict_exports)
|
|
1871
1855
|
}
|
|
1872
1856
|
};
|
|
1873
|
-
//#endregion
|
|
1874
1857
|
export { finalPlugin as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-dom",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.30.0-beta.1",
|
|
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.
|
|
41
|
-
"@eslint-react/eslint": "5.
|
|
42
|
-
"@eslint-react/jsx": "5.
|
|
43
|
-
"@eslint-react/shared": "5.
|
|
44
|
-
"@eslint-react/var": "5.
|
|
40
|
+
"@eslint-react/ast": "5.30.0-beta.1",
|
|
41
|
+
"@eslint-react/eslint": "5.30.0-beta.1",
|
|
42
|
+
"@eslint-react/jsx": "5.30.0-beta.1",
|
|
43
|
+
"@eslint-react/shared": "5.30.0-beta.1",
|
|
44
|
+
"@eslint-react/var": "5.30.0-beta.1",
|
|
45
45
|
"@typescript-eslint/types": "^8.72.0",
|
|
46
46
|
"@typescript-eslint/utils": "^8.72.0",
|
|
47
47
|
"compare-versions": "^6.1.1",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@types/react-dom": "^19.3.0",
|
|
58
58
|
"dedent": "^1.7.2",
|
|
59
59
|
"eslint": "^10.13.0",
|
|
60
|
-
"tsdown": "^0.23.
|
|
60
|
+
"tsdown": "^0.23.2",
|
|
61
61
|
"typescript": "6.0.3"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|