Skip to content

Commit 3597642

Browse files
committed
release: 2.0.0-next.20
2 parents cd9aeb6 + eb73019 commit 3597642

File tree

20 files changed

+308
-274
lines changed

20 files changed

+308
-274
lines changed

.pkgs/configs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"@stylistic/eslint-plugin": "^4.2.0",
2424
"eslint-plugin-de-morgan": "^1.2.1",
2525
"eslint-plugin-function": "^0.0.21",
26-
"eslint-plugin-jsdoc": "^50.6.14",
26+
"eslint-plugin-jsdoc": "^50.6.17",
2727
"eslint-plugin-perfectionist": "^4.13.0",
2828
"eslint-plugin-regexp": "^2.7.0",
2929
"eslint-plugin-unicorn": "^59.0.1",

.pkgs/eslint-plugin-local/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"@typescript-eslint/types": "^8.32.1",
3434
"@typescript-eslint/utils": "^8.32.1",
3535
"eslint-plugin-de-morgan": "^1.2.1",
36-
"eslint-plugin-jsdoc": "^50.6.14",
36+
"eslint-plugin-jsdoc": "^50.6.17",
3737
"eslint-plugin-perfectionist": "^4.13.0",
3838
"eslint-plugin-regexp": "^2.7.0",
3939
"eslint-plugin-unicorn": "^59.0.1",

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.0.0-next.19
1+
2.0.0-next.20

apps/website/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
"fumadocs-twoslash": "3.1.2",
2121
"fumadocs-typescript": "4.0.3",
2222
"fumadocs-ui": "15.3.0",
23-
"lucide-react": "^0.510.0",
23+
"lucide-react": "^0.511.0",
2424
"next": "^15.3.2",
2525
"next-view-transitions": "^0.3.4",
2626
"react": "^19.1.0",
2727
"react-dom": "^19.1.0",
28-
"shiki": "^3.4.1",
28+
"shiki": "^3.4.2",
2929
"tailwind-merge": "^3.3.0",
3030
"twoslash": "^0.3.1"
3131
},
@@ -37,7 +37,7 @@
3737
"@eslint/markdown": "^6.4.0",
3838
"@local/configs": "workspace:*",
3939
"@mdx-js/mdx": "^3.1.0",
40-
"@tailwindcss/postcss": "^4.1.6",
40+
"@tailwindcss/postcss": "^4.1.7",
4141
"@theguild/remark-mermaid": "^0.3.0",
4242
"@tsconfig/next": "^2.0.3",
4343
"@tsconfig/node22": "^22.0.1",
@@ -58,7 +58,7 @@
5858
"eslint-plugin-unicorn": "^59.0.1",
5959
"importx": "^0.5.2",
6060
"postcss": "^8.5.3",
61-
"tailwindcss": "^4.1.6",
61+
"tailwindcss": "^4.1.7",
6262
"tailwindcss-animated": "^2.0.0",
6363
"typescript": "^5.8.3",
6464
"typescript-eslint": "^8.32.1"

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@eslint-react/monorepo",
3-
"version": "2.0.0-next.19",
3+
"version": "2.0.0-next.20",
44
"private": true,
55
"description": "Monorepo for eslint-plugin-react-[x, dom, web-api, naming-convention].",
66
"keywords": [
@@ -73,7 +73,7 @@
7373
"eslint-config-flat-gitignore": "^2.1.0",
7474
"eslint-plugin-vitest": "^0.5.4",
7575
"jiti": "^2.4.2",
76-
"lefthook": "^1.11.12",
76+
"lefthook": "^1.11.13",
7777
"markdownlint": "^0.38.0",
7878
"nx": "20.8.1",
7979
"publint": "^0.3.12",
@@ -112,7 +112,7 @@
112112
"@types/react-dom": "^19.1.5",
113113
"cross-spawn": "^7.0.6",
114114
"esbuild": "^0.25.4",
115-
"lucide-react": "^0.510.0",
115+
"lucide-react": "^0.511.0",
116116
"next": "^15.3.2",
117117
"react": "^19.1.0",
118118
"react-dom": "^19.1.0",

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@eslint-react/core",
3-
"version": "2.0.0-next.19",
3+
"version": "2.0.0-next.20",
44
"description": "ESLint React's ESLint utility module for static analysis of React core APIs and patterns.",
55
"homepage": "https://github.com/Rel1cx/eslint-react",
66
"bugs": {

packages/plugins/eslint-plugin-react-debug/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-plugin-react-debug",
3-
"version": "2.0.0-next.19",
3+
"version": "2.0.0-next.20",
44
"description": "ESLint React's ESLint plugin for debugging related rules.",
55
"keywords": [
66
"react",

packages/plugins/eslint-plugin-react-dom/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-plugin-react-dom",
3-
"version": "2.0.0-next.19",
3+
"version": "2.0.0-next.20",
44
"description": "ESLint React's ESLint plugin for React DOM related rules.",
55
"keywords": [
66
"react",

packages/plugins/eslint-plugin-react-dom/src/rules/no-void-elements-with-children.spec.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,20 @@ ruleTester.run(RULE_NAME, rule, {
3232
},
3333
],
3434
},
35+
{
36+
code: tsx`<PolyComponent as="img" {...props} children="Foo" />;`,
37+
errors: [
38+
{
39+
messageId: "noVoidElementsWithChildren",
40+
data: { element: "img" },
41+
},
42+
],
43+
settings: {
44+
"react-x": {
45+
polymorphicPropName: "as",
46+
},
47+
},
48+
},
3549
{
3650
code: tsx`<br dangerouslySetInnerHTML={{ __html: "Foo" }} />;`,
3751
errors: [
@@ -46,6 +60,14 @@ ruleTester.run(RULE_NAME, rule, {
4660
...allValid,
4761
"<div>Foo</div>;",
4862
'<div children="Foo" />;',
63+
{
64+
code: tsx`<PolyComponent as="div" children="Foo" />;`,
65+
settings: {
66+
"react-x": {
67+
polymorphicPropName: "as",
68+
},
69+
},
70+
},
4971
'<div dangerouslySetInnerHTML={{ __html: "Foo" }} />;',
5072
],
5173
});

packages/plugins/eslint-plugin-react-dom/src/rules/no-void-elements-with-children.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { RuleListener } from "@typescript-eslint/utils/ts-eslint";
33
import type { CamelCase } from "string-ts";
44
import * as ER from "@eslint-react/core";
55

6-
import { createRule } from "../utils";
6+
import { createJsxElementResolver, createRule } from "../utils";
77

88
export const RULE_NAME = "no-void-elements-with-children";
99

@@ -49,9 +49,10 @@ export default createRule<[], MessageID>({
4949
});
5050

5151
export function create(context: RuleContext<MessageID, []>): RuleListener {
52+
const resolver = createJsxElementResolver(context);
5253
return {
5354
JSXElement(node) {
54-
const elementName = ER.getElementType(context, node);
55+
const { domElementType: elementName } = resolver.resolve(node);
5556
if (elementName.length === 0 || !voidElements.has(elementName)) {
5657
return;
5758
}

0 commit comments

Comments
 (0)