@eslint-react/kit 5.3.0-next.2 → 5.3.1-next.0
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 +23 -23
- package/dist/index.js +3 -1
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,29 @@
|
|
|
1
|
+
import { TSESTreeFunction, TSESTreeTypeExpression } from "@eslint-react/ast";
|
|
1
2
|
import * as core from "@eslint-react/core";
|
|
2
3
|
import { ESLintReactSettingsNormalized } from "@eslint-react/shared";
|
|
3
4
|
import { ESLintUtils } from "@typescript-eslint/utils";
|
|
4
|
-
import { SyntaxKind } from "typescript";
|
|
5
5
|
import { RuleContext, RuleFix, RuleFixer, RuleListener, RuleListener as RuleListener$1 } from "@typescript-eslint/utils/ts-eslint";
|
|
6
|
+
import { SyntaxKind } from "typescript";
|
|
6
7
|
import { ESLint, Linter } from "eslint";
|
|
7
8
|
|
|
9
|
+
//#region ../eslint/dist/index.d.ts
|
|
10
|
+
/**
|
|
11
|
+
* Merges multiple visitor objects into a single visitor object.
|
|
12
|
+
*
|
|
13
|
+
* @param base Base visitor object (target of merge)
|
|
14
|
+
* @param rest Additional visitor objects to merge (one or more)
|
|
15
|
+
* @returns Merged visitor object
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```typescript
|
|
19
|
+
* const visitor1 = { Identifier: () => console.log(1) };
|
|
20
|
+
* const visitor2 = { Identifier: () => console.log(2) };
|
|
21
|
+
* const merged = merge(visitor1, visitor2);
|
|
22
|
+
* // When encountering Identifier nodes, outputs 1 then 2
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
declare function merge(base: RuleListener$1, ...rest: RuleListener$1[]): RuleListener$1; //#endregion
|
|
26
|
+
//#endregion
|
|
8
27
|
//#region ../../node_modules/.pnpm/@typescript-eslint+types@8.58.2/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts
|
|
9
28
|
declare type Accessibility = 'private' | 'protected' | 'public';
|
|
10
29
|
declare type AccessorProperty = AccessorPropertyComputedName | AccessorPropertyNonComputedName;
|
|
@@ -2331,28 +2350,6 @@ declare module './generated/ast-spec' {
|
|
|
2331
2350
|
}
|
|
2332
2351
|
}
|
|
2333
2352
|
//#endregion
|
|
2334
|
-
//#region ../ast/dist/index.d.ts
|
|
2335
|
-
//#region src/types.d.ts
|
|
2336
|
-
type TSESTreeFunction = ArrowFunctionExpression | FunctionDeclaration | FunctionExpression;
|
|
2337
|
-
//#endregion
|
|
2338
|
-
//#region ../eslint/dist/index.d.ts
|
|
2339
|
-
/**
|
|
2340
|
-
* Merges multiple visitor objects into a single visitor object.
|
|
2341
|
-
*
|
|
2342
|
-
* @param base Base visitor object (target of merge)
|
|
2343
|
-
* @param rest Additional visitor objects to merge (one or more)
|
|
2344
|
-
* @returns Merged visitor object
|
|
2345
|
-
*
|
|
2346
|
-
* @example
|
|
2347
|
-
* ```typescript
|
|
2348
|
-
* const visitor1 = { Identifier: () => console.log(1) };
|
|
2349
|
-
* const visitor2 = { Identifier: () => console.log(2) };
|
|
2350
|
-
* const merged = merge(visitor1, visitor2);
|
|
2351
|
-
* // When encountering Identifier nodes, outputs 1 then 2
|
|
2352
|
-
* ```
|
|
2353
|
-
*/
|
|
2354
|
-
declare function merge(base: RuleListener$1, ...rest: RuleListener$1[]): RuleListener$1; //#endregion
|
|
2355
|
-
//#endregion
|
|
2356
2353
|
//#region src/index.d.ts
|
|
2357
2354
|
interface Collector<T> {
|
|
2358
2355
|
query: {
|
|
@@ -2366,6 +2363,9 @@ interface CollectorWithContext<T> extends Collector<T> {
|
|
|
2366
2363
|
};
|
|
2367
2364
|
}
|
|
2368
2365
|
interface RuleToolkit {
|
|
2366
|
+
ast: {
|
|
2367
|
+
unwrap(node: Node): Exclude<Node, TSESTreeTypeExpression>;
|
|
2368
|
+
};
|
|
2369
2369
|
collect: {
|
|
2370
2370
|
components(context: RuleContext, options?: {
|
|
2371
2371
|
collectDisplayName?: boolean;
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Extract } from "@eslint-react/ast";
|
|
1
2
|
import * as core from "@eslint-react/core";
|
|
2
3
|
import { getSettingsFromContext } from "@eslint-react/shared";
|
|
3
4
|
import { randomBytes } from "node:crypto";
|
|
@@ -6,7 +7,7 @@ import { ESLintUtils } from "@typescript-eslint/utils";
|
|
|
6
7
|
|
|
7
8
|
//#region package.json
|
|
8
9
|
var name = "@eslint-react/kit";
|
|
9
|
-
var version = "5.3.
|
|
10
|
+
var version = "5.3.1-next.0";
|
|
10
11
|
|
|
11
12
|
//#endregion
|
|
12
13
|
//#region ../eslint/dist/index.js
|
|
@@ -44,6 +45,7 @@ function merge(base, ...rest) {
|
|
|
44
45
|
//#region src/index.ts
|
|
45
46
|
function makeRuleToolkit(context) {
|
|
46
47
|
return {
|
|
48
|
+
ast: { unwrap: Extract.unwrap },
|
|
47
49
|
collect: {
|
|
48
50
|
components(context, options) {
|
|
49
51
|
const { api, visitor } = core.getFunctionComponentCollector(context, options);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-react/kit",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.1-next.0",
|
|
4
4
|
"description": "ESLint React's utility module for building custom React rules with JavaScript functions.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@typescript-eslint/utils": "^8.58.2",
|
|
40
40
|
"string-ts": "^2.3.1",
|
|
41
|
-
"@eslint-react/
|
|
42
|
-
"@eslint-react/shared": "5.3.
|
|
41
|
+
"@eslint-react/ast": "5.3.1-next.0",
|
|
42
|
+
"@eslint-react/shared": "5.3.1-next.0",
|
|
43
|
+
"@eslint-react/core": "5.3.1-next.0"
|
|
43
44
|
},
|
|
44
45
|
"devDependencies": {
|
|
45
46
|
"eslint": "^10.2.1",
|
|
46
47
|
"tsdown": "^0.21.9",
|
|
47
|
-
"@eslint-react/
|
|
48
|
-
"@eslint-react/eslint": "5.3.0-next.2",
|
|
48
|
+
"@eslint-react/eslint": "5.3.1-next.0",
|
|
49
49
|
"@local/configs": "0.0.0",
|
|
50
50
|
"@local/eff": "3.0.0-beta.72"
|
|
51
51
|
},
|