Skip to content

Commit 58e2e32

Browse files
authored
Merge branch 'main' into no-use-in-try-catch
2 parents c57d2a2 + 329ce10 commit 58e2e32

Some content is hidden

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

53 files changed

+563
-412
lines changed

.pkgs/eslint-plugin-local/dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function isInitializedFromSource(name2, source, initialScope) {
2626
}
2727
const args = getRequireExpressionArguments(init);
2828
const arg0 = args?.[0];
29-
if (arg0 == null || !AST.isStringLiteral(arg0)) {
29+
if (arg0 == null || !AST.isKindOfLiteral(arg0, "string")) {
3030
return false;
3131
}
3232
return arg0.value === source || arg0.value.startsWith(`${source}/`);

.pkgs/eslint-plugin-local/src/utils/is-initialized-from-source.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export function isInitializedFromSource(
3333
// check for: `variable = require('source')` or `variable = require('source').variable`
3434
const args = getRequireExpressionArguments(init);
3535
const arg0 = args?.[0];
36-
if (arg0 == null || !AST.isStringLiteral(arg0)) {
36+
if (arg0 == null || !AST.isKindOfLiteral(arg0, "string")) {
3737
return false;
3838
}
3939
// check for: `require('source')` or `require('source/...')`

VERSION

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

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@eslint-react/monorepo",
3-
"version": "1.28.0-beta.1",
3+
"version": "1.28.0-next.2",
44
"private": true,
55
"description": "Monorepo for eslint-plugin-react-[x, dom, web-api, hooks-extra, naming-convention].",
66
"keywords": [
@@ -60,7 +60,7 @@
6060
"@local/eslint-plugin-local": "workspace:*",
6161
"@napi-rs/canvas": "^0.1.67",
6262
"@stylistic/eslint-plugin": "^4.0.1",
63-
"@swc/core": "^1.10.18",
63+
"@swc/core": "^1.11.1",
6464
"@tsconfig/node22": "^22.0.0",
6565
"@tsconfig/strictest": "^2.0.5",
6666
"@types/node": "^22.13.5",

packages/core/docs/-internal-/interfaces/TSTypeOperator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The loc property is defined as nullable by ESTree, but ESLint requires this prop
2828

2929
### operator
3030

31-
> **operator**: `"keyof"` \| `"readonly"` \| `"unique"`
31+
> **operator**: `"readonly"` \| `"keyof"` \| `"unique"`
3232
3333
***
3434

packages/core/docs/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
- [getComponentNameFromIdentifier](functions/getComponentNameFromIdentifier.md)
5353
- [getFunctionComponentIdentifier](functions/getFunctionComponentIdentifier.md)
5454
- [hasNoneOrValidComponentName](functions/hasNoneOrValidComponentName.md)
55+
- [hasValidHierarchy](functions/hasValidHierarchy.md)
5556
- [isCallFromReact](functions/isCallFromReact.md)
5657
- [isCallFromReactMember](functions/isCallFromReactMember.md)
5758
- [isChildrenCount](functions/isChildrenCount.md)
@@ -83,6 +84,11 @@
8384
- [isForwardRef](functions/isForwardRef.md)
8485
- [isForwardRefCall](functions/isForwardRefCall.md)
8586
- [isFromReact](functions/isFromReact.md)
87+
- [isFromReactLoose](functions/isFromReactLoose.md)
88+
- [isFromReactMember](functions/isFromReactMember.md)
89+
- [isFromReactMemberLoose](functions/isFromReactMemberLoose.md)
90+
- [isFromReactMemberStrict](functions/isFromReactMemberStrict.md)
91+
- [isFromReactStrict](functions/isFromReactStrict.md)
8692
- [isFunctionOfComponentDidMount](functions/isFunctionOfComponentDidMount.md)
8793
- [isFunctionOfComponentWillUnmount](functions/isFunctionOfComponentWillUnmount.md)
8894
- [isFunctionOfRenderMethod](functions/isFunctionOfRenderMethod.md)
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
[**@eslint-react/core**](../README.md)
2+
3+
***
4+
5+
[@eslint-react/core](../README.md) / hasValidHierarchy
6+
7+
# Function: hasValidHierarchy()
8+
9+
> **hasValidHierarchy**(`node`, `context`, `hint`): `boolean`
10+
11+
internal
12+
13+
## Parameters
14+
15+
### node
16+
17+
[`TSESTreeFunction`](../-internal-/type-aliases/TSESTreeFunction.md)
18+
19+
### context
20+
21+
[`Readonly`](../-internal-/type-aliases/Readonly.md)
22+
23+
### hint
24+
25+
`bigint`
26+
27+
## Returns
28+
29+
`boolean`

packages/core/docs/functions/isFromReact.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,16 @@
88

99
> **isFromReact**(`name`): (`node`, `context`) => `boolean`
1010
11-
Checks if the given node is a call expression to the given function or method of the pragma
12-
1311
## Parameters
1412

1513
### name
1614

1715
`string`
1816

19-
The name of the function or method to check
20-
2117
## Returns
2218

2319
`Function`
2420

25-
A predicate that checks if the given node is a call expression to the given function or method
26-
2721
### Parameters
2822

2923
#### node
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[**@eslint-react/core**](../README.md)
2+
3+
***
4+
5+
[@eslint-react/core](../README.md) / isFromReactLoose
6+
7+
# Function: isFromReactLoose()
8+
9+
> **isFromReactLoose**(`node`, `name`): `boolean`
10+
11+
## Parameters
12+
13+
### node
14+
15+
[`Identifier`](../-internal-/interfaces/Identifier.md) | [`MemberExpression`](../-internal-/type-aliases/MemberExpression.md)
16+
17+
### name
18+
19+
`string`
20+
21+
## Returns
22+
23+
`boolean`
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
[**@eslint-react/core**](../README.md)
2+
3+
***
4+
5+
[@eslint-react/core](../README.md) / isFromReactMember
6+
7+
# Function: isFromReactMember()
8+
9+
> **isFromReactMember**(`memberName`, `name`): (`node`, `context`) => `boolean`
10+
11+
## Parameters
12+
13+
### memberName
14+
15+
`string`
16+
17+
### name
18+
19+
`string`
20+
21+
## Returns
22+
23+
`Function`
24+
25+
### Parameters
26+
27+
#### node
28+
29+
[`MemberExpression`](../-internal-/type-aliases/MemberExpression.md)
30+
31+
#### context
32+
33+
[`Readonly`](../-internal-/type-aliases/Readonly.md)
34+
35+
### Returns
36+
37+
`boolean`

0 commit comments

Comments
 (0)