@eslint-react/core 5.27.4 → 5.28.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.
Files changed (2) hide show
  1. package/dist/index.d.ts +6 -4
  2. package/package.json +6 -6
package/dist/index.d.ts CHANGED
@@ -390,10 +390,12 @@ export declare function getCreateElementProp(context: RuleContext, node: null |
390
390
  */
391
391
  export declare function isCreateElementChildrenArgument(context: RuleContext, node: TSESTree.Node): boolean;
392
392
  /**
393
- * Check if the node is inside the props object (the second argument) of a `createElement` call.
393
+ * Check if the node is directly inside the props object (the second argument) of a `createElement` call,
394
+ * that is, its closest `ObjectExpression` ancestor is the props object itself. Nodes nested deeper
395
+ * (ex: inside an object nested in the props object) are not considered inside.
394
396
  * @param context The ESLint rule context.
395
397
  * @param node The node to check.
396
- * @returns `true` if the node is inside `createElement`'s props object.
398
+ * @returns `true` if the node is directly inside `createElement`'s props object.
397
399
  */
398
400
  export declare function isInsideCreateElementProps(context: RuleContext, node: TSESTree.Node): boolean;
399
401
  //#endregion
@@ -436,7 +438,7 @@ export type FunctionSemanticNode = ClientFunctionSemanticNode | ServerFunctionSe
436
438
  * nodes as the ECMAScript spec's `IsAnonymousFunctionDefinition()` with some
437
439
  * exceptions to better fit our use case.
438
440
  *
439
- * Ported from {@link https://github.com/facebook/react/blob/bb8a76c6cc77ea2976d690ea09f5a1b3d9b1792a/packages/eslint-plugin-react-hooks/src/rules/RulesOfHooks.ts#L860 | RulesOfHooks.ts}
441
+ * Ported from {@link https://github.com/react/react/blob/bb8a76c6cc77ea2976d690ea09f5a1b3d9b1792a/packages/eslint-plugin-react-hooks/src/rules/RulesOfHooks.ts#L860 | RulesOfHooks.ts}
440
442
  *
441
443
  * @param node The function node to analyze.
442
444
  * @returns The identifier node if found, `null` otherwise.
@@ -522,7 +524,7 @@ export type HookCall = TSESTree.CallExpression | TSESTree.TaggedTemplateExpressi
522
524
  * Check if the name is a hook name (`use` itself, or starts with `use` followed by an uppercase letter or digit).
523
525
  * @param name The name of the identifier to check.
524
526
  * @returns `true` if the name is a hook name.
525
- * @see https://github.com/facebook/react/blob/1d6c8168db1d82713202e842df3167787ffa00ed/packages/eslint-plugin-react-hooks/src/rules/RulesOfHooks.ts#L16
527
+ * @see https://github.com/react/react/blob/1d6c8168db1d82713202e842df3167787ffa00ed/packages/eslint-plugin-react-hooks/src/rules/RulesOfHooks.ts#L16
526
528
  */
527
529
  export declare function isHookName(name: string): boolean;
528
530
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/core",
3
- "version": "5.27.4",
3
+ "version": "5.28.1",
4
4
  "description": "ESLint React's ESLint utility module for static analysis of React core APIs and patterns.",
5
5
  "homepage": "https://github.com/Rel1cx/eslint-react",
6
6
  "bugs": {
@@ -29,10 +29,10 @@
29
29
  "dist"
30
30
  ],
31
31
  "dependencies": {
32
- "@eslint-react/ast": "5.27.4",
33
- "@eslint-react/eslint": "5.27.4",
34
- "@eslint-react/shared": "5.27.4",
35
- "@eslint-react/var": "5.27.4",
32
+ "@eslint-react/ast": "5.28.1",
33
+ "@eslint-react/eslint": "5.28.1",
34
+ "@eslint-react/shared": "5.28.1",
35
+ "@eslint-react/var": "5.28.1",
36
36
  "@typescript-eslint/types": "^8.71.2",
37
37
  "@typescript-eslint/utils": "^8.71.2",
38
38
  "ts-pattern": "^5.9.2"
@@ -45,7 +45,7 @@
45
45
  "@types/node": "^20.19.43",
46
46
  "@typescript-eslint/typescript-estree": "^8.71.2",
47
47
  "dedent": "^1.7.2",
48
- "eslint": "^10.12.0",
48
+ "eslint": "^10.13.0",
49
49
  "tsdown": "^0.23.1",
50
50
  "typescript": "6.0.3",
51
51
  "vitest": "^5.0.5"