eslint-plugin-react-dom 1.24.0-next.12 → 1.24.0-next.13

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 CHANGED
@@ -30,7 +30,7 @@ var AST__namespace = /*#__PURE__*/_interopNamespace(AST);
30
30
 
31
31
  // package.json
32
32
  var name = "eslint-plugin-react-dom";
33
- var version = "1.24.0-next.12";
33
+ var version = "1.24.0-next.13";
34
34
  var createRule = shared.createRuleForPlugin("dom");
35
35
 
36
36
  // src/utils/find-custom-component.ts
@@ -53,7 +53,7 @@ function getElementNameOnJsxAndDom(node, context, polymorphicPropName, additiona
53
53
  node.openingElement.attributes
54
54
  );
55
55
  if (attributeNode == null) return [name2, name2];
56
- const polymorphicPropValue = JSX__namespace.getAttributeValue(polymorphicPropName, attributeNode, initialScope);
56
+ const polymorphicPropValue = JSX__namespace.getAttributeValue(attributeNode, polymorphicPropName, initialScope);
57
57
  if (polymorphicPropValue.kind === "some" && typeof polymorphicPropValue.value === "string") {
58
58
  return [name2, polymorphicPropValue.value];
59
59
  }
@@ -216,7 +216,7 @@ var no_missing_button_type_default = createRule({
216
216
  );
217
217
  if (attributeNode != null) {
218
218
  const attributeScope = context.sourceCode.getScope(attributeNode);
219
- const attributeValue = JSX__namespace.getAttributeValue(propNameOnJsx, attributeNode, attributeScope);
219
+ const attributeValue = JSX__namespace.getAttributeValue(attributeNode, propNameOnJsx, attributeScope);
220
220
  if (attributeValue.kind === "some" && typeof attributeValue.value !== "string") {
221
221
  context.report({
222
222
  messageId: "noMissingButtonType",
@@ -298,7 +298,7 @@ var no_missing_iframe_sandbox_default = createRule({
298
298
  );
299
299
  if (attributeNode != null) {
300
300
  const attributeScope = context.sourceCode.getScope(attributeNode);
301
- const attributeValue = JSX__namespace.getAttributeValue(propNameOnJsx, attributeNode, attributeScope);
301
+ const attributeValue = JSX__namespace.getAttributeValue(attributeNode, propNameOnJsx, attributeScope);
302
302
  if (attributeValue.kind === "some" && hasValidSandBox(attributeValue.value)) return;
303
303
  context.report({
304
304
  messageId: "noMissingIframeSandbox",
@@ -430,7 +430,8 @@ var no_script_url_default = createRule({
430
430
  return;
431
431
  }
432
432
  const attributeScope = context.sourceCode.getScope(node);
433
- const attributeValue = JSX__namespace.getAttributeValue(JSX__namespace.toString(node.name), node, attributeScope);
433
+ const attributeName = JSX__namespace.getAttributeName(node);
434
+ const attributeValue = JSX__namespace.getAttributeValue(node, attributeName, attributeScope);
434
435
  if (attributeValue.kind === "none" || typeof attributeValue.value !== "string") return;
435
436
  if (shared.RE_JAVASCRIPT_PROTOCOL.test(attributeValue.value)) {
436
437
  context.report({
@@ -1550,7 +1551,7 @@ var no_unsafe_iframe_sandbox_default = createRule({
1550
1551
  );
1551
1552
  if (attributeNode != null) {
1552
1553
  const attributeScope = context.sourceCode.getScope(attributeNode);
1553
- const attributeValue = JSX__namespace.getAttributeValue(propNameOnJsx, attributeNode, attributeScope);
1554
+ const attributeValue = JSX__namespace.getAttributeValue(attributeNode, propNameOnJsx, attributeScope);
1554
1555
  if (attributeValue.kind === "some" && !hasSafeSandbox(attributeValue.value)) {
1555
1556
  context.report({
1556
1557
  messageId: "noUnsafeIframeSandbox",
@@ -1621,7 +1622,7 @@ var no_unsafe_target_blank_default = createRule({
1621
1622
  );
1622
1623
  if (attributeNode == null) return customComponentProp?.defaultValue;
1623
1624
  const attributeScope = context.sourceCode.getScope(attributeNode);
1624
- const attributeValue = JSX__namespace.getAttributeValue(propNameOnJsx, attributeNode, attributeScope);
1625
+ const attributeValue = JSX__namespace.getAttributeValue(attributeNode, propNameOnJsx, attributeScope);
1625
1626
  if (attributeValue.kind === "some" && typeof attributeValue.value === "string") {
1626
1627
  return attributeValue.value;
1627
1628
  }
package/dist/index.mjs CHANGED
@@ -7,7 +7,7 @@ import { _ } from '@eslint-react/eff';
7
7
 
8
8
  // package.json
9
9
  var name = "eslint-plugin-react-dom";
10
- var version = "1.24.0-next.12";
10
+ var version = "1.24.0-next.13";
11
11
  var createRule = createRuleForPlugin("dom");
12
12
 
13
13
  // src/utils/find-custom-component.ts
@@ -30,7 +30,7 @@ function getElementNameOnJsxAndDom(node, context, polymorphicPropName, additiona
30
30
  node.openingElement.attributes
31
31
  );
32
32
  if (attributeNode == null) return [name2, name2];
33
- const polymorphicPropValue = JSX.getAttributeValue(polymorphicPropName, attributeNode, initialScope);
33
+ const polymorphicPropValue = JSX.getAttributeValue(attributeNode, polymorphicPropName, initialScope);
34
34
  if (polymorphicPropValue.kind === "some" && typeof polymorphicPropValue.value === "string") {
35
35
  return [name2, polymorphicPropValue.value];
36
36
  }
@@ -193,7 +193,7 @@ var no_missing_button_type_default = createRule({
193
193
  );
194
194
  if (attributeNode != null) {
195
195
  const attributeScope = context.sourceCode.getScope(attributeNode);
196
- const attributeValue = JSX.getAttributeValue(propNameOnJsx, attributeNode, attributeScope);
196
+ const attributeValue = JSX.getAttributeValue(attributeNode, propNameOnJsx, attributeScope);
197
197
  if (attributeValue.kind === "some" && typeof attributeValue.value !== "string") {
198
198
  context.report({
199
199
  messageId: "noMissingButtonType",
@@ -275,7 +275,7 @@ var no_missing_iframe_sandbox_default = createRule({
275
275
  );
276
276
  if (attributeNode != null) {
277
277
  const attributeScope = context.sourceCode.getScope(attributeNode);
278
- const attributeValue = JSX.getAttributeValue(propNameOnJsx, attributeNode, attributeScope);
278
+ const attributeValue = JSX.getAttributeValue(attributeNode, propNameOnJsx, attributeScope);
279
279
  if (attributeValue.kind === "some" && hasValidSandBox(attributeValue.value)) return;
280
280
  context.report({
281
281
  messageId: "noMissingIframeSandbox",
@@ -407,7 +407,8 @@ var no_script_url_default = createRule({
407
407
  return;
408
408
  }
409
409
  const attributeScope = context.sourceCode.getScope(node);
410
- const attributeValue = JSX.getAttributeValue(JSX.toString(node.name), node, attributeScope);
410
+ const attributeName = JSX.getAttributeName(node);
411
+ const attributeValue = JSX.getAttributeValue(node, attributeName, attributeScope);
411
412
  if (attributeValue.kind === "none" || typeof attributeValue.value !== "string") return;
412
413
  if (RE_JAVASCRIPT_PROTOCOL.test(attributeValue.value)) {
413
414
  context.report({
@@ -1527,7 +1528,7 @@ var no_unsafe_iframe_sandbox_default = createRule({
1527
1528
  );
1528
1529
  if (attributeNode != null) {
1529
1530
  const attributeScope = context.sourceCode.getScope(attributeNode);
1530
- const attributeValue = JSX.getAttributeValue(propNameOnJsx, attributeNode, attributeScope);
1531
+ const attributeValue = JSX.getAttributeValue(attributeNode, propNameOnJsx, attributeScope);
1531
1532
  if (attributeValue.kind === "some" && !hasSafeSandbox(attributeValue.value)) {
1532
1533
  context.report({
1533
1534
  messageId: "noUnsafeIframeSandbox",
@@ -1598,7 +1599,7 @@ var no_unsafe_target_blank_default = createRule({
1598
1599
  );
1599
1600
  if (attributeNode == null) return customComponentProp?.defaultValue;
1600
1601
  const attributeScope = context.sourceCode.getScope(attributeNode);
1601
- const attributeValue = JSX.getAttributeValue(propNameOnJsx, attributeNode, attributeScope);
1602
+ const attributeValue = JSX.getAttributeValue(attributeNode, propNameOnJsx, attributeScope);
1602
1603
  if (attributeValue.kind === "some" && typeof attributeValue.value === "string") {
1603
1604
  return attributeValue.value;
1604
1605
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-dom",
3
- "version": "1.24.0-next.12",
3
+ "version": "1.24.0-next.13",
4
4
  "description": "ESLint React's ESLint plugin for React DOM related rules.",
5
5
  "keywords": [
6
6
  "react",
@@ -47,12 +47,12 @@
47
47
  "compare-versions": "^6.1.1",
48
48
  "string-ts": "^2.2.0",
49
49
  "ts-pattern": "^5.6.0",
50
- "@eslint-react/ast": "1.24.0-next.12",
51
- "@eslint-react/core": "1.24.0-next.12",
52
- "@eslint-react/eff": "1.24.0-next.12",
53
- "@eslint-react/jsx": "1.24.0-next.12",
54
- "@eslint-react/shared": "1.24.0-next.12",
55
- "@eslint-react/var": "1.24.0-next.12"
50
+ "@eslint-react/ast": "1.24.0-next.13",
51
+ "@eslint-react/core": "1.24.0-next.13",
52
+ "@eslint-react/jsx": "1.24.0-next.13",
53
+ "@eslint-react/shared": "1.24.0-next.13",
54
+ "@eslint-react/eff": "1.24.0-next.13",
55
+ "@eslint-react/var": "1.24.0-next.13"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@types/react": "^19.0.7",