@eslint-react/var 5.30.0-beta.22 → 5.30.0-beta.24

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 +19 -2
  2. package/package.json +5 -5
package/dist/index.d.ts CHANGED
@@ -257,7 +257,21 @@ export declare function resolve(context: RuleContext, node: TSESTree.Identifier,
257
257
  * @returns The identifier and member expression targets being written.
258
258
  */
259
259
  export declare function resolveAssignmentTargets(node: TSESTree.Node): (TSESTree.Identifier | TSESTree.MemberExpression)[];
260
- /** The possible assignment targets returned by {@link resolveEnclosingAssignmentTarget}. */
260
+ /**
261
+ * The possible assignment targets returned by {@link resolveEnclosingAssignmentTarget}:
262
+ *
263
+ * - `const <id> = ...`: the declared binding — an `Identifier`, or the whole
264
+ * `ObjectPattern`/`ArrayPattern` for a destructuring declaration.
265
+ * - `<target> = ...`: the assignment's left side (an `Identifier`, a
266
+ * `MemberExpression`, or a destructuring pattern).
267
+ * - `class { <key> = ... }`: the property key.
268
+ * - `export default <declaration>`: the exported declaration.
269
+ *
270
+ * The union is wider than the cases above suggest: `DefaultExportDeclarations`
271
+ * includes `Expression` (`export default <expr>`), and `PropertyName` includes
272
+ * computed keys, which are arbitrary expressions as well. Listing the narrower
273
+ * node types explicitly would be redundant, so they are documented here instead.
274
+ */
261
275
  export type EnclosingAssignmentTarget = TSESTree.DefaultExportDeclarations | TSESTree.PropertyName | null;
262
276
  /**
263
277
  * Resolve the enclosing assignment target (variable, property, etc.) of the node.
@@ -268,7 +282,10 @@ export declare function resolveEnclosingAssignmentTarget(node: TSESTree.Node): E
268
282
  /**
269
283
  * Resolve the import source of a variable by walking its latest definition.
270
284
  * @param name The variable name.
271
- * @param initialScope The initial scope.
285
+ * @param initialScope The initial scope. The lookup walks the scope chain
286
+ * upward only, so this must be the scope of a reference to the variable or
287
+ * one of its descendants (e.g. the module scope); passing an ancestor scope
288
+ * such as the program's global scope resolves nothing.
272
289
  * @returns The import source, or `null` when it cannot be resolved.
273
290
  */
274
291
  export declare function resolveImportSource(name: string, initialScope: Scope): string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/var",
3
- "version": "5.30.0-beta.22",
3
+ "version": "5.30.0-beta.24",
4
4
  "description": "ESLint React's TSESTree AST utility module for static analysis of variables.",
5
5
  "homepage": "https://github.com/Rel1cx/eslint-react",
6
6
  "bugs": {
@@ -29,8 +29,8 @@
29
29
  "dist"
30
30
  ],
31
31
  "dependencies": {
32
- "@eslint-react/ast": "5.30.0-beta.22",
33
- "@eslint-react/eslint": "5.30.0-beta.22",
32
+ "@eslint-react/ast": "5.30.0-beta.24",
33
+ "@eslint-react/eslint": "5.30.0-beta.24",
34
34
  "@typescript-eslint/scope-manager": "^8.72.1",
35
35
  "@typescript-eslint/types": "^8.72.1",
36
36
  "@typescript-eslint/utils": "^8.72.1",
@@ -43,9 +43,9 @@
43
43
  "@tsconfig/node20": "^20.1.10",
44
44
  "@types/node": "^20.19.43",
45
45
  "eslint": "^10.14.0",
46
- "tsdown": "^0.23.4",
46
+ "tsdown": "^0.23.5",
47
47
  "typescript": "6.0.3",
48
- "vitest": "^5.0.5"
48
+ "vitest": "^5.1.0"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "eslint": "*",