Skip to content

Commit ab6016e

Browse files
authored
Merge branch 'main' into feat/fix-for-no-useless-fragment
2 parents 5ebfc28 + 0f53cb2 commit ab6016e

File tree

70 files changed

+2055
-1674
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+2055
-1674
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.24.2-next.0
1+
1.24.2-beta.1

eslint.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ export default tseslint.config(
168168
"@typescript-eslint/ban-types": "off",
169169
"@typescript-eslint/consistent-type-imports": "error",
170170
"@typescript-eslint/explicit-function-return-type": "off",
171+
"@typescript-eslint/no-namespace": "off",
171172
"@typescript-eslint/no-empty-object-type": "off",
172173
"@typescript-eslint/no-misused-promises": "off",
173174
"@typescript-eslint/no-unnecessary-parameter-property-assignment": "warn",

examples/dual-react-dom-lib/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"eslint-plugin-react-hooks": "^5.1.0",
4040
"eslint-plugin-vitest": "^0.5.4",
4141
"react": "^19.0.0",
42-
"tsup": "^8.3.5",
42+
"tsup": "^8.3.6",
4343
"typescript": "^5.7.3",
4444
"typescript-eslint": "^8.21.0"
4545
},

examples/next-app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@
2424
"@types/node": "^22.10.10",
2525
"@types/react": "^19.0.8",
2626
"@types/react-dom": "^19.0.3",
27-
"autoprefixer": "10.4.20",
27+
"autoprefixer": "^10.4.20",
2828
"eslint": "^9.19.0",
2929
"eslint-config-flat-gitignore": "^1.0.0",
3030
"eslint-plugin-react-hooks": "^5.1.0",
3131
"eslint-plugin-react-refresh": "^0.4.18",
32-
"postcss": "8.5.1",
32+
"postcss": "^8.5.1",
3333
"tailwindcss": "3.4.17",
3434
"typescript": "^5.7.3",
3535
"typescript-eslint": "^8.21.0"

package.json

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@eslint-react/monorepo",
3-
"version": "1.24.2-next.0",
3+
"version": "1.24.2-beta.1",
44
"private": true,
55
"description": "Monorepo for eslint-plugin-react-[x, dom, web-api, hooks-extra, naming-convention].",
66
"keywords": [
@@ -39,6 +39,7 @@
3939
"lint": "pnpm run lint:deps && pnpm run lint:publish && pnpm run lint:type && concurrently \"pnpm run lint:ts\" \"pnpm run lint:examples\" \"pnpm run lint:website\"",
4040
"lint:deps": "skott -m file-tree -e .ts -s",
4141
"lint:examples": "pnpm -r -F \"./examples/*\" run --parallel lint",
42+
"lint:monorepo": "sherif",
4243
"lint:publish": "pnpm -r run --parallel lint:publish",
4344
"lint:spell": "cspell lint --relative --no-progress \"**\"",
4445
"lint:ts": "eslint . --max-warnings 100",
@@ -55,7 +56,7 @@
5556
"@eslint/js": "^9.19.0",
5657
"@eslint/markdown": "^6.2.2",
5758
"@napi-rs/canvas": "^0.1.65",
58-
"@stylistic/eslint-plugin": "^2.13.0",
59+
"@stylistic/eslint-plugin": "^3.0.0",
5960
"@swc/core": "^1.10.9",
6061
"@tsconfig/node22": "^22.0.0",
6162
"@tsconfig/strictest": "^2.0.5",
@@ -75,7 +76,7 @@
7576
"esbuild": "^0.24.2",
7677
"eslint": "^9.19.0",
7778
"eslint-config-flat-gitignore": "^1.0.0",
78-
"eslint-plugin-jsdoc": "^50.6.2",
79+
"eslint-plugin-jsdoc": "^50.6.3",
7980
"eslint-plugin-perfectionist": "^4.7.0",
8081
"eslint-plugin-regexp": "^2.7.0",
8182
"eslint-plugin-simple-import-sort": "^12.1.1",
@@ -91,11 +92,12 @@
9192
"publint": "^0.3.2",
9293
"react": "^19.0.0",
9394
"react-dom": "^19.0.0",
95+
"sherif": "^1.2.0",
9496
"skott": "^0.35.4",
9597
"tinyexec": "^0.3.2",
9698
"tinyglobby": "^0.2.10",
9799
"ts-pattern": "^5.6.2",
98-
"tsup": "^8.3.5",
100+
"tsup": "^8.3.6",
99101
"tsx": "^4.19.2",
100102
"type-fest": "^4.33.0",
101103
"typedoc": "^0.27.6",
@@ -105,22 +107,22 @@
105107
"typescript-eslint": "^8.21.0",
106108
"vitest": "^3.0.4"
107109
},
108-
"packageManager": "[email protected]",
109110
"engines": {
110111
"node": ">=18.18.0"
111112
},
113+
"packageManager": "[email protected]",
112114
"pnpm": {
113115
"overrides": {
114-
"is-core-module": "npm:@nolyfill/is-core-module@^1.0.39",
115-
"safe-buffer": "npm:@nolyfill/safe-buffer@^1.0.41",
116-
"safer-buffer": "npm:@nolyfill/safer-buffer@^1.0.41",
117-
"typedarray": "npm:@nolyfill/typedarray@^1.0.29",
118116
"@types/react": "^19.0.8",
119117
"@types/react-dom": "^19.0.3",
120118
"cross-spawn": "^7.0.6",
119+
"is-core-module": "npm:@nolyfill/is-core-module@^1.0.39",
121120
"react": "^19.0.0",
122121
"react-dom": "^19.0.0",
122+
"safe-buffer": "npm:@nolyfill/safe-buffer@^1.0.41",
123+
"safer-buffer": "npm:@nolyfill/safer-buffer@^1.0.41",
123124
"ts-api-utils": "^2.0.0",
125+
"typedarray": "npm:@nolyfill/typedarray@^1.0.29",
124126
"typescript": "^5.7.3"
125127
}
126128
}

packages/core/docs/README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,16 @@
44

55
# @eslint-react/core
66

7+
## Namespaces
8+
9+
- [isCallFromReact](namespaces/isCallFromReact/README.md)
10+
- [isCallFromReactMember](namespaces/isCallFromReactMember/README.md)
11+
- [useComponentCollector](namespaces/useComponentCollector/README.md)
12+
- [useComponentCollectorLegacy](namespaces/useComponentCollectorLegacy/README.md)
13+
- [useHookCollector](namespaces/useHookCollector/README.md)
14+
715
## Interfaces
816

9-
- [ComponentCollectorOptions](interfaces/ComponentCollectorOptions.md)
1017
- [ERClassComponent](interfaces/ERClassComponent.md)
1118
- [ERFunctionComponent](interfaces/ERFunctionComponent.md)
1219
- [ERHook](interfaces/ERHook.md)

packages/core/docs/functions/isCallFromReact.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
# Function: isCallFromReact()
88

9-
> **isCallFromReact**(`name`): `IsCallFromReact`
9+
> **isCallFromReact**(`name`): [`ReturnType`](../namespaces/isCallFromReact/type-aliases/ReturnType.md)
1010
1111
## Parameters
1212

@@ -16,4 +16,4 @@
1616

1717
## Returns
1818

19-
`IsCallFromReact`
19+
[`ReturnType`](../namespaces/isCallFromReact/type-aliases/ReturnType.md)

packages/core/docs/functions/isCallFromReactMember.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
# Function: isCallFromReactMember()
88

9-
> **isCallFromReactMember**(`pragmaMemberName`, `name`): `IsCallFromReactMember`
9+
> **isCallFromReactMember**(`pragmaMemberName`, `name`): [`ReturnType`](../namespaces/isCallFromReactMember/type-aliases/ReturnType.md)
1010
1111
## Parameters
1212

@@ -20,4 +20,4 @@
2020

2121
## Returns
2222

23-
`IsCallFromReactMember`
23+
[`ReturnType`](../namespaces/isCallFromReactMember/type-aliases/ReturnType.md)

packages/core/docs/functions/useComponentCollector.md

Lines changed: 3 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
# Function: useComponentCollector()
88

9-
> **useComponentCollector**(`context`, `hint`, `options`): `object`
9+
> **useComponentCollector**(`context`, `hint`, `options`): [`ReturnType`](../namespaces/useComponentCollector/type-aliases/ReturnType.md)
1010
1111
Get a ctx and listeners for the rule to collect function components
1212

@@ -26,98 +26,12 @@ The hint to use
2626

2727
### options
2828

29-
[`ComponentCollectorOptions`](../interfaces/ComponentCollectorOptions.md) = `{}`
29+
[`Options`](../namespaces/useComponentCollector/type-aliases/Options.md) = `{}`
3030

3131
The options to use
3232

3333
## Returns
3434

35-
`object`
35+
[`ReturnType`](../namespaces/useComponentCollector/type-aliases/ReturnType.md)
3636

3737
The component collector
38-
39-
### ctx
40-
41-
> **ctx**: `object`
42-
43-
#### ctx.getCurrentEntry()
44-
45-
> **getCurrentEntry**: () => `undefined` \| \{ `hookCalls`: `CallExpression`[]; `isComponent`: `boolean`; `key`: `string`; `node`: `TSESTreeFunction`; \}
46-
47-
##### Returns
48-
49-
`undefined` \| \{ `hookCalls`: `CallExpression`[]; `isComponent`: `boolean`; `key`: `string`; `node`: `TSESTreeFunction`; \}
50-
51-
#### ctx.getAllComponents()
52-
53-
##### Parameters
54-
55-
###### node
56-
57-
`Program`
58-
59-
##### Returns
60-
61-
`Map`\<`string`, [`ERFunctionComponent`](../interfaces/ERFunctionComponent.md)\>
62-
63-
#### ctx.getCurrentEntries()
64-
65-
##### Returns
66-
67-
`object`[]
68-
69-
### listeners
70-
71-
> **listeners**: `object`
72-
73-
#### listeners.:function\[type\]()
74-
75-
> `readonly` **:function\[type\]**: (`node`) => `void` = `onFunctionEnter`
76-
77-
##### Parameters
78-
79-
###### node
80-
81-
`TSESTreeFunction`
82-
83-
##### Returns
84-
85-
`void`
86-
87-
#### listeners.:function\[type\]:exit()
88-
89-
> `readonly` **:function\[type\]:exit**: () => `undefined` \| \{ `hookCalls`: `CallExpression`[]; `isComponent`: `boolean`; `key`: `string`; `node`: `TSESTreeFunction`; \} = `onFunctionExit`
90-
91-
##### Returns
92-
93-
`undefined` \| \{ `hookCalls`: `CallExpression`[]; `isComponent`: `boolean`; `key`: `string`; `node`: `TSESTreeFunction`; \}
94-
95-
#### listeners.ArrowFunctionExpression\[type\]\[body.type!='BlockStatement'\]()
96-
97-
##### Returns
98-
99-
`void`
100-
101-
#### listeners.CallExpression\[type\]:exit()?
102-
103-
##### Parameters
104-
105-
###### node
106-
107-
`CallExpression`
108-
109-
##### Returns
110-
111-
`void`
112-
113-
#### listeners.ReturnStatement\[type\]()
114-
115-
##### Parameters
116-
117-
###### node
118-
119-
`ReturnStatement`
120-
121-
##### Returns
122-
123-
`void`

packages/core/docs/functions/useComponentCollectorLegacy.md

Lines changed: 2 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -6,60 +6,12 @@
66

77
# Function: useComponentCollectorLegacy()
88

9-
> **useComponentCollectorLegacy**(): `object`
9+
> **useComponentCollectorLegacy**(): [`ReturnType`](../namespaces/useComponentCollectorLegacy/type-aliases/ReturnType.md)
1010
1111
Get a ctx and listeners for the rule to collect class components
1212

1313
## Returns
1414

15-
`object`
15+
[`ReturnType`](../namespaces/useComponentCollectorLegacy/type-aliases/ReturnType.md)
1616

1717
The context and listeners for the rule
18-
19-
### ctx
20-
21-
> **ctx**: `object`
22-
23-
#### ctx.getAllComponents()
24-
25-
##### Parameters
26-
27-
###### node
28-
29-
`Program`
30-
31-
##### Returns
32-
33-
`Map`\<`string`, [`ERClassComponent`](../interfaces/ERClassComponent.md)\>
34-
35-
### listeners
36-
37-
> **listeners**: `object`
38-
39-
#### listeners.ClassDeclaration\[type\]()
40-
41-
> `readonly` **ClassDeclaration\[type\]**: (`node`) => `void` = `collect`
42-
43-
##### Parameters
44-
45-
###### node
46-
47-
`TSESTreeClass`
48-
49-
##### Returns
50-
51-
`void`
52-
53-
#### listeners.ClassExpression\[type\]()
54-
55-
> `readonly` **ClassExpression\[type\]**: (`node`) => `void` = `collect`
56-
57-
##### Parameters
58-
59-
###### node
60-
61-
`TSESTreeClass`
62-
63-
##### Returns
64-
65-
`void`

0 commit comments

Comments
 (0)