@eslint-react/core 5.2.4-beta.3 → 5.2.4-beta.5

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.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { TSESTreeClass, TSESTreeDirective, TSESTreeFunction, TSESTreeMethodOrPropertyDefinition } from "@eslint-react/ast";
2
2
  import { TSESTree } from "@typescript-eslint/types";
3
- import { RuleContext } from "@eslint-react/eslint";
4
3
  import { RegExpLike } from "@eslint-react/shared";
5
- import { ESLintUtils, TSESTree as TSESTree$1 } from "@typescript-eslint/utils";
6
4
  import ts from "typescript";
5
+ import { RuleContext } from "@eslint-react/eslint";
7
6
  import { Scope } from "@typescript-eslint/scope-manager";
7
+ import { ESLintUtils } from "@typescript-eslint/utils";
8
8
 
9
9
  //#region src/api.d.ts
10
10
  declare namespace isAPI {
@@ -315,7 +315,7 @@ type FunctionSemanticNode = ClientFunctionSemanticNode | ServerFunctionSemanticN
315
315
  * @param node - The function node to analyze.
316
316
  * @returns The identifier node if found, `null` otherwise.
317
317
  */
318
- declare function getFunctionId(node: TSESTree.Expression | TSESTreeFunction): TSESTree.ArrayExpression | TSESTree.ArrayPattern | TSESTree.ArrowFunctionExpression | TSESTree.AssignmentExpression | TSESTree.AwaitExpression | TSESTree.PrivateInExpression | TSESTree.SymmetricBinaryExpression | TSESTree.CallExpression | TSESTree.ChainExpression | TSESTree.ClassExpression | TSESTree.ConditionalExpression | TSESTree.FunctionExpression | TSESTree.Identifier | TSESTree.ImportExpression | TSESTree.JSXElement | TSESTree.JSXFragment | TSESTree.BigIntLiteral | TSESTree.BooleanLiteral | TSESTree.NullLiteral | TSESTree.NumberLiteral | TSESTree.RegExpLiteral | TSESTree.StringLiteral | TSESTree.LogicalExpression | TSESTree.MemberExpressionComputedName | TSESTree.MemberExpressionNonComputedName | TSESTree.MetaProperty | TSESTree.NewExpression | TSESTree.ObjectExpression | TSESTree.ObjectPattern | TSESTree.PrivateIdentifier | TSESTree.SequenceExpression | TSESTree.Super | TSESTree.TaggedTemplateExpression | TSESTree.TemplateLiteral | TSESTree.ThisExpression | TSESTree.TSAsExpression | TSESTree.TSInstantiationExpression | TSESTree.TSNonNullExpression | TSESTree.TSSatisfiesExpression | TSESTree.TSTypeAssertion | TSESTree.UnaryExpressionBitwiseNot | TSESTree.UnaryExpressionDelete | TSESTree.UnaryExpressionMinus | TSESTree.UnaryExpressionNot | TSESTree.UnaryExpressionPlus | TSESTree.UnaryExpressionTypeof | TSESTree.UnaryExpressionVoid | TSESTree.UpdateExpression | TSESTree.YieldExpression | null;
318
+ declare function getFunctionId(node: TSESTree.Expression | TSESTreeFunction): TSESTree.ArrayExpression | TSESTree.ArrayPattern | TSESTree.ArrowFunctionExpression | TSESTree.AssignmentExpression | TSESTree.AwaitExpression | TSESTree.PrivateInExpression | TSESTree.SymmetricBinaryExpression | TSESTree.CallExpression | TSESTree.ChainExpression | TSESTree.ClassExpression | TSESTree.ConditionalExpression | TSESTree.FunctionExpression | TSESTree.Identifier | TSESTree.ImportExpression | TSESTree.JSXElement | TSESTree.JSXFragment | TSESTree.BigIntLiteral | TSESTree.BooleanLiteral | TSESTree.NullLiteral | TSESTree.NumberLiteral | TSESTree.RegExpLiteral | TSESTree.StringLiteral | TSESTree.TemplateLiteral | TSESTree.LogicalExpression | TSESTree.MemberExpressionComputedName | TSESTree.MemberExpressionNonComputedName | TSESTree.MetaProperty | TSESTree.NewExpression | TSESTree.ObjectExpression | TSESTree.ObjectPattern | TSESTree.SequenceExpression | TSESTree.Super | TSESTree.TaggedTemplateExpression | TSESTree.ThisExpression | TSESTree.TSAsExpression | TSESTree.TSInstantiationExpression | TSESTree.TSNonNullExpression | TSESTree.TSSatisfiesExpression | TSESTree.TSTypeAssertion | TSESTree.UnaryExpressionBitwiseNot | TSESTree.UnaryExpressionDelete | TSESTree.UnaryExpressionMinus | TSESTree.UnaryExpressionNot | TSESTree.UnaryExpressionPlus | TSESTree.UnaryExpressionTypeof | TSESTree.UnaryExpressionVoid | TSESTree.UpdateExpression | TSESTree.YieldExpression | TSESTree.PrivateIdentifier | null;
319
319
  /**
320
320
  * Identifies the initialization path of a function node in the AST.
321
321
  *
@@ -602,7 +602,7 @@ declare function isUseEffectCleanupCallback(node: TSESTree.Node | null): boolean
602
602
  declare namespace getHookCollector {
603
603
  type ReturnType = {
604
604
  api: {
605
- getAllHooks(node: TSESTree$1.Program): HookSemanticNode[];
605
+ getAllHooks(node: TSESTree.Program): HookSemanticNode[];
606
606
  };
607
607
  visitor: ESLintUtils.RuleListener;
608
608
  };
package/dist/index.js CHANGED
@@ -1,11 +1,9 @@
1
1
  import { Check, Extract, Traverse, is, isOneOf } from "@eslint-react/ast";
2
2
  import { resolveImportSource } from "@eslint-react/var";
3
3
  import { AST_NODE_TYPES } from "@typescript-eslint/types";
4
- import "@eslint-react/eslint";
5
4
  import { randomBytes } from "node:crypto";
6
5
  import { JsxDetectionHint, isJsxLike } from "@eslint-react/jsx";
7
6
  import { RE_COMPONENT_NAME, RE_COMPONENT_NAME_LOOSE } from "@eslint-react/shared";
8
- import { AST_NODE_TYPES as AST_NODE_TYPES$1 } from "@typescript-eslint/utils";
9
7
  import { P, isMatching, match } from "ts-pattern";
10
8
  import ts from "typescript";
11
9
 
@@ -971,7 +969,7 @@ function getHookCollector(context) {
971
969
  const entry = getCurrentEntry();
972
970
  if (entry == null) return;
973
971
  const { body } = entry.node;
974
- if (body.type === AST_NODE_TYPES$1.BlockStatement) return;
972
+ if (body.type === AST_NODE_TYPES.BlockStatement) return;
975
973
  entry.rets.push(body);
976
974
  },
977
975
  CallExpression(node) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/core",
3
- "version": "5.2.4-beta.3",
3
+ "version": "5.2.4-beta.5",
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": {
@@ -34,11 +34,11 @@
34
34
  "@typescript-eslint/types": "^8.58.2",
35
35
  "@typescript-eslint/utils": "^8.58.2",
36
36
  "ts-pattern": "^5.9.0",
37
- "@eslint-react/eslint": "5.2.4-beta.3",
38
- "@eslint-react/jsx": "5.2.4-beta.3",
39
- "@eslint-react/ast": "5.2.4-beta.3",
40
- "@eslint-react/shared": "5.2.4-beta.3",
41
- "@eslint-react/var": "5.2.4-beta.3"
37
+ "@eslint-react/ast": "5.2.4-beta.5",
38
+ "@eslint-react/eslint": "5.2.4-beta.5",
39
+ "@eslint-react/jsx": "5.2.4-beta.5",
40
+ "@eslint-react/shared": "5.2.4-beta.5",
41
+ "@eslint-react/var": "5.2.4-beta.5"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@typescript-eslint/typescript-estree": "^8.58.2",