@eslint-react/ast 5.9.0 → 5.9.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.
package/dist/index.d.ts CHANGED
@@ -25,7 +25,7 @@ declare function isDirective(name: string): (node: TSESTree.Node) => node is TSE
25
25
  declare function isIdentifier(name: string): (node: TSESTree.Node) => node is TSESTree.Identifier;
26
26
  declare function isStringLiteral(node: TSESTree.Node): node is TSESTree.StringLiteral;
27
27
  declare const isClass: (node: TSESTree.Node | null | undefined) => node is TSESTree.ClassDeclarationWithName | TSESTree.ClassDeclarationWithOptionalName | TSESTree.ClassExpression;
28
- declare const isFunction: (node: TSESTree.Node | null | undefined) => node is TSESTree.ArrowFunctionExpression | TSESTree.FunctionDeclarationWithName | TSESTree.FunctionDeclarationWithOptionalName | TSESTree.FunctionExpression;
28
+ declare const isFunction: (node: TSESTree.Node | null | undefined) => node is TSESTree.ArrowFunctionExpressionWithBlockBody | TSESTree.ArrowFunctionExpressionWithExpressionBody | TSESTree.FunctionDeclarationWithName | TSESTree.FunctionDeclarationWithOptionalName | TSESTree.FunctionExpression;
29
29
  declare const isProperty: (node: TSESTree.Node | null | undefined) => node is TSESTree.PropertyDefinitionComputedName | TSESTree.PropertyDefinitionNonComputedName | TSESTree.TSIndexSignature | TSESTree.TSParameterProperty | TSESTree.TSPropertySignatureComputedName | TSESTree.TSPropertySignatureNonComputedName;
30
30
  declare const isPropertyOrMethod: (node: TSESTree.Node | null | undefined) => node is TSESTree.MethodDefinitionComputedName | TSESTree.MethodDefinitionNonComputedName | TSESTree.PropertyDefinitionComputedName | TSESTree.PropertyDefinitionNonComputedName;
31
31
  declare const isJSXElement: (node: TSESTree.Node | null | undefined) => node is TSESTree.JSXElement;
@@ -50,13 +50,12 @@ declare const isEqual: {
50
50
  (a: TSESTree.Node, b: TSESTree.Node): boolean;
51
51
  };
52
52
  declare namespace extract_d_exports {
53
- export { getFullyQualifiedName, getHumanReadableKind, getPropertyName, getRootIdentifier, unwrap };
53
+ export { getFullyQualifiedName, getPropertyName, getRootIdentifier, unwrap };
54
54
  }
55
55
  declare function unwrap(node: TSESTree.Node): Exclude<TSESTree.Node, TSESTreeTypeExpression>;
56
56
  declare function getRootIdentifier(node: TSESTree.Expression | TSESTree.PrivateIdentifier): TSESTree.Identifier | null;
57
57
  declare function getPropertyName(node: TSESTree.Node): string | null;
58
58
  declare function getFullyQualifiedName(node: TSESTree.Node, getText: (node: TSESTree.Node) => string): string;
59
- declare function getHumanReadableKind(node: TSESTree.Node): "regexp literal" | "null literal" | "string literal" | "number literal" | "bigint literal" | "boolean literal" | "symbol literal" | "undefined literal" | "object literal" | "function literal" | "decorator" | "identifier" | "program" | "property" | "super" | "accessor property" | "array expression" | "array pattern" | "function expression" | "arrow function expression" | "assignment expression" | "assignment pattern" | "await expression" | "binary expression" | "block statement" | "break statement" | "call expression" | "catch clause" | "chain expression" | "class body" | "class declaration" | "class expression" | "conditional expression" | "continue statement" | "debugger statement" | "while statement" | "do while statement" | "empty statement" | "export all declaration" | "export default declaration" | "export named declaration" | "export specifier" | "expression statement" | "for in statement" | "for of statement" | "for statement" | "function declaration" | "if statement" | "import attribute" | "import declaration" | "import default specifier" | "import expression" | "import namespace specifier" | "import specifier" | "jsx attribute" | "jsx closing element" | "jsx closing fragment" | "jsx element" | "jsx empty expression" | "jsx expression container" | "jsx fragment" | "jsx identifier" | "member expression" | "jsx member expression" | "jsx namespaced name" | "jsx opening element" | "jsx opening fragment" | "jsx spread attribute" | "jsx spread child" | "jsx text" | "labeled statement" | "logical expression" | "meta property" | "method definition" | "new expression" | "object expression" | "object pattern" | "private identifier" | "property definition" | "rest element" | "return statement" | "sequence expression" | "spread element" | "static block" | "switch case" | "switch statement" | "tagged template expression" | "template element" | "template literal" | "this expression" | "throw statement" | "try statement" | "unary expression" | "update expression" | "variable declaration" | "variable declarator" | "with statement" | "yield expression" | "ts abstract accessor property" | "ts abstract keyword" | "ts abstract method definition" | "ts abstract property definition" | "ts any keyword" | "ts array type" | "ts as expression" | "ts async keyword" | "ts big int keyword" | "ts boolean keyword" | "ts call signature declaration" | "ts class implements" | "ts conditional type" | "ts constructor type" | "ts construct signature declaration" | "ts declare function" | "ts declare keyword" | "ts empty body function expression" | "ts enum body" | "ts enum declaration" | "ts enum member" | "ts export assignment" | "ts export keyword" | "ts external module reference" | "ts function type" | "ts import equals declaration" | "ts import type" | "ts indexed access type" | "ts index signature" | "ts infer type" | "ts instantiation expression" | "ts interface body" | "ts interface declaration" | "ts interface heritage" | "ts intersection type" | "ts intrinsic keyword" | "ts literal type" | "ts mapped type" | "ts method signature" | "ts module block" | "ts module declaration" | "ts named tuple member" | "ts namespace export declaration" | "ts never keyword" | "ts non null expression" | "ts null keyword" | "ts number keyword" | "ts object keyword" | "ts optional type" | "ts parameter property" | "ts private keyword" | "ts property signature" | "ts protected keyword" | "ts public keyword" | "ts qualified name" | "ts readonly keyword" | "ts rest type" | "ts satisfies expression" | "ts static keyword" | "ts string keyword" | "ts symbol keyword" | "ts template literal type" | "ts this type" | "ts tuple type" | "ts type alias declaration" | "ts type annotation" | "ts type assertion" | "ts type literal" | "ts type operator" | "ts type parameter" | "ts type parameter declaration" | "ts type parameter instantiation" | "ts type predicate" | "ts type query" | "ts type reference" | "ts undefined keyword" | "ts union type" | "ts unknown keyword" | "ts void keyword";
60
59
  declare namespace traverse_d_exports {
61
60
  export { findParent };
62
61
  }
package/dist/index.js CHANGED
@@ -1,7 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-w6R9maHv.js";
2
2
  import { AST_NODE_TYPES } from "@typescript-eslint/types";
3
3
  import { ASTUtils } from "@typescript-eslint/utils";
4
- import { delimiterCase, toLowerCase } from "string-ts";
5
4
 
6
5
  //#region src/check.ts
7
6
  var check_exports = /* @__PURE__ */ __exportAll({
@@ -207,7 +206,6 @@ const compose = dual(2, (ab, bc) => (a) => bc(ab(a)));
207
206
  //#region src/extract.ts
208
207
  var extract_exports = /* @__PURE__ */ __exportAll({
209
208
  getFullyQualifiedName: () => getFullyQualifiedName,
210
- getHumanReadableKind: () => getHumanReadableKind,
211
209
  getPropertyName: () => getPropertyName,
212
210
  getRootIdentifier: () => getRootIdentifier,
213
211
  unwrap: () => unwrap
@@ -242,14 +240,6 @@ function getFullyQualifiedName(node, getText) {
242
240
  default: return getText(node);
243
241
  }
244
242
  }
245
- function getHumanReadableKind(node) {
246
- if (node.type === AST_NODE_TYPES.Literal) {
247
- if ("regex" in node) return "regexp literal";
248
- if (node.value === null) return "null literal";
249
- return `${typeof node.value} literal`;
250
- }
251
- return toLowerCase(delimiterCase(node.type, " "));
252
- }
253
243
 
254
244
  //#endregion
255
245
  //#region src/compare.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/ast",
3
- "version": "5.9.0",
3
+ "version": "5.9.1",
4
4
  "description": "ESLint React's TSESTree AST utility module.",
5
5
  "homepage": "https://github.com/Rel1cx/eslint-react",
6
6
  "bugs": {
@@ -29,17 +29,17 @@
29
29
  "dist"
30
30
  ],
31
31
  "dependencies": {
32
- "@typescript-eslint/types": "^8.61.0",
33
- "@typescript-eslint/typescript-estree": "^8.61.0",
34
- "@typescript-eslint/utils": "^8.61.0",
32
+ "@typescript-eslint/types": "^8.61.1",
33
+ "@typescript-eslint/typescript-estree": "^8.61.1",
34
+ "@typescript-eslint/utils": "^8.61.1",
35
35
  "string-ts": "^2.3.1"
36
36
  },
37
37
  "devDependencies": {
38
- "@typescript-eslint/parser": "^8.61.0",
39
- "eslint": "^10.4.1",
40
- "tsdown": "^0.22.2",
38
+ "@typescript-eslint/parser": "^8.61.1",
39
+ "eslint": "^10.5.0",
40
+ "tsdown": "^0.22.3",
41
41
  "typescript": "6.0.3",
42
- "vitest": "^4.1.8",
42
+ "vitest": "^4.1.9",
43
43
  "@local/configs": "0.0.0",
44
44
  "@local/eff": "0.0.0"
45
45
  },