@rslint/core 0.5.2 → 0.5.4-canary.1781059600
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/bin/rslint.cjs +21 -4
- package/dist/0~engine.js +406 -0
- package/dist/34.js +33 -0
- package/dist/browser.d.ts +52 -39
- package/dist/browser.js +42 -74
- package/dist/cli.d.ts +3 -2
- package/dist/cli.js +1051 -93
- package/dist/config-loader.d.ts +45 -14
- package/dist/config-loader.js +95 -59
- package/dist/eslint-plugin/612.js +43 -0
- package/dist/eslint-plugin/index.d.ts +892 -0
- package/dist/eslint-plugin/index.js +26692 -0
- package/dist/eslint-plugin/lint-worker.js +26225 -0
- package/dist/eslint-plugin/types.d.ts +23 -0
- package/dist/eslint-plugin/types.js +1 -0
- package/dist/index.d.ts +626 -19
- package/dist/index.js +598 -15
- package/dist/service.d.ts +360 -30
- package/dist/service.js +19 -34
- package/package.json +27 -11
- package/dist/browser.d.ts.map +0 -1
- package/dist/cli.d.ts.map +0 -1
- package/dist/config-loader.d.ts.map +0 -1
- package/dist/configs/import.d.ts +0 -6
- package/dist/configs/import.d.ts.map +0 -1
- package/dist/configs/import.js +0 -7
- package/dist/configs/index.d.ts +0 -16
- package/dist/configs/index.d.ts.map +0 -1
- package/dist/configs/index.js +0 -32
- package/dist/configs/javascript.d.ts +0 -6
- package/dist/configs/javascript.d.ts.map +0 -1
- package/dist/configs/javascript.js +0 -72
- package/dist/configs/jest.d.ts +0 -7
- package/dist/configs/jest.d.ts.map +0 -1
- package/dist/configs/jest.js +0 -35
- package/dist/configs/promise.d.ts +0 -6
- package/dist/configs/promise.d.ts.map +0 -1
- package/dist/configs/promise.js +0 -20
- package/dist/configs/react-hooks.d.ts +0 -6
- package/dist/configs/react-hooks.d.ts.map +0 -1
- package/dist/configs/react-hooks.js +0 -24
- package/dist/configs/react.d.ts +0 -6
- package/dist/configs/react.d.ts.map +0 -1
- package/dist/configs/react.js +0 -31
- package/dist/configs/typescript.d.ts +0 -8
- package/dist/configs/typescript.d.ts.map +0 -1
- package/dist/configs/typescript.js +0 -119
- package/dist/configs/unicorn.d.ts +0 -8
- package/dist/configs/unicorn.d.ts.map +0 -1
- package/dist/configs/unicorn.js +0 -161
- package/dist/define-config.d.ts +0 -109
- package/dist/define-config.d.ts.map +0 -1
- package/dist/define-config.js +0 -6
- package/dist/index.d.ts.map +0 -1
- package/dist/node.d.ts +0 -31
- package/dist/node.d.ts.map +0 -1
- package/dist/node.js +0 -116
- package/dist/service.d.ts.map +0 -1
- package/dist/tsconfig.build.tsbuildinfo +0 -1
- package/dist/types.d.ts +0 -342
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -1
- package/dist/utils/args.d.ts +0 -19
- package/dist/utils/args.d.ts.map +0 -1
- package/dist/utils/args.js +0 -101
- package/dist/utils/config-discovery.d.ts +0 -47
- package/dist/utils/config-discovery.d.ts.map +0 -1
- package/dist/utils/config-discovery.js +0 -238
- package/dist/worker.d.ts +0 -2
- package/dist/worker.d.ts.map +0 -1
- package/dist/worker.js +0 -114
package/dist/service.d.ts
CHANGED
|
@@ -1,30 +1,360 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
export declare interface ApplyFixesRequest {
|
|
2
|
+
fileContent: string;
|
|
3
|
+
diagnostics: Diagnostic[];
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export declare interface ApplyFixesResponse {
|
|
7
|
+
fixedContent: string[];
|
|
8
|
+
wasFixed: boolean;
|
|
9
|
+
appliedCount: number;
|
|
10
|
+
unappliedCount: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export declare interface Diagnostic {
|
|
14
|
+
ruleName: string;
|
|
15
|
+
message: string;
|
|
16
|
+
messageId: string;
|
|
17
|
+
filePath: string;
|
|
18
|
+
range: Range;
|
|
19
|
+
severity?: string;
|
|
20
|
+
suggestions: any[];
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Edge in the flow graph (from antecedent to current)
|
|
25
|
+
*/
|
|
26
|
+
declare interface FlowEdge {
|
|
27
|
+
from: number;
|
|
28
|
+
to: number;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Flow graph for visualization
|
|
33
|
+
*/
|
|
34
|
+
declare interface FlowGraph {
|
|
35
|
+
nodes: FlowGraphNode[];
|
|
36
|
+
edges: FlowEdge[];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Node in the flow graph
|
|
41
|
+
*/
|
|
42
|
+
declare interface FlowGraphNode {
|
|
43
|
+
id: number;
|
|
44
|
+
flags: number;
|
|
45
|
+
flagNames?: string[];
|
|
46
|
+
nodePos?: number;
|
|
47
|
+
nodeEnd?: number;
|
|
48
|
+
nodeKindName?: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Control flow analysis information
|
|
53
|
+
*/
|
|
54
|
+
export declare interface FlowInfo {
|
|
55
|
+
flags: number;
|
|
56
|
+
flagNames?: string[];
|
|
57
|
+
nodeKind?: number;
|
|
58
|
+
nodeKindName?: string;
|
|
59
|
+
nodePos?: number;
|
|
60
|
+
nodeEnd?: number;
|
|
61
|
+
antecedent?: FlowInfo;
|
|
62
|
+
antecedents?: FlowInfo[];
|
|
63
|
+
graph?: FlowGraph;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Request for AST info at a specific position
|
|
68
|
+
*/
|
|
69
|
+
export declare interface GetAstInfoRequest {
|
|
70
|
+
fileContent: string;
|
|
71
|
+
position: number;
|
|
72
|
+
end?: number;
|
|
73
|
+
kind?: number;
|
|
74
|
+
depth?: number;
|
|
75
|
+
fileName?: string;
|
|
76
|
+
compilerOptions?: Record<string, unknown>;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Response containing detailed AST information
|
|
81
|
+
*/
|
|
82
|
+
export declare interface GetAstInfoResponse {
|
|
83
|
+
node?: NodeInfo;
|
|
84
|
+
type?: TypeInfo;
|
|
85
|
+
symbol?: SymbolInfo;
|
|
86
|
+
signature?: SignatureInfo;
|
|
87
|
+
flow?: FlowInfo;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Index signature information
|
|
92
|
+
*/
|
|
93
|
+
export declare interface IndexInfo {
|
|
94
|
+
keyType: TypeInfo;
|
|
95
|
+
valueType: TypeInfo;
|
|
96
|
+
isReadonly: boolean;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export declare interface LanguageOptions {
|
|
100
|
+
parserOptions?: ParserOptions;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export declare interface LintOptions {
|
|
104
|
+
files?: string[];
|
|
105
|
+
config?: string;
|
|
106
|
+
workingDirectory?: string;
|
|
107
|
+
ruleOptions?: Record<string, string>;
|
|
108
|
+
fileContents?: Record<string, string>;
|
|
109
|
+
languageOptions?: LanguageOptions;
|
|
110
|
+
includeEncodedSourceFiles?: boolean;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export declare interface LintResponse {
|
|
114
|
+
diagnostics: Diagnostic[];
|
|
115
|
+
errorCount: number;
|
|
116
|
+
fileCount: number;
|
|
117
|
+
ruleCount: number;
|
|
118
|
+
duration: string;
|
|
119
|
+
encodedSourceFiles?: Record<string, string>;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Detailed information about an AST node
|
|
124
|
+
*/
|
|
125
|
+
export declare interface NodeInfo {
|
|
126
|
+
id?: number;
|
|
127
|
+
kind: number;
|
|
128
|
+
kindName: string;
|
|
129
|
+
pos: number;
|
|
130
|
+
end: number;
|
|
131
|
+
flags: number;
|
|
132
|
+
flagNames?: string[];
|
|
133
|
+
text?: string;
|
|
134
|
+
fileName?: string;
|
|
135
|
+
parent?: NodeInfo;
|
|
136
|
+
name?: NodeInfo;
|
|
137
|
+
expression?: NodeInfo;
|
|
138
|
+
left?: NodeInfo;
|
|
139
|
+
right?: NodeInfo;
|
|
140
|
+
operatorToken?: NodeInfo;
|
|
141
|
+
operand?: NodeInfo;
|
|
142
|
+
condition?: NodeInfo;
|
|
143
|
+
whenTrue?: NodeInfo;
|
|
144
|
+
whenFalse?: NodeInfo;
|
|
145
|
+
thenStatement?: NodeInfo;
|
|
146
|
+
elseStatement?: NodeInfo;
|
|
147
|
+
body?: NodeInfo;
|
|
148
|
+
initializer?: NodeInfo;
|
|
149
|
+
type?: NodeInfo;
|
|
150
|
+
members?: NodeInfo[];
|
|
151
|
+
heritageClauses?: NodeInfo[];
|
|
152
|
+
typeParameters?: NodeInfo[];
|
|
153
|
+
parameters?: NodeInfo[];
|
|
154
|
+
modifiers?: NodeInfo[];
|
|
155
|
+
arguments?: NodeInfo[];
|
|
156
|
+
statements?: NodeInfo[];
|
|
157
|
+
properties?: NodeInfo[];
|
|
158
|
+
elements?: NodeInfo[];
|
|
159
|
+
declarationList?: NodeInfo;
|
|
160
|
+
declarations?: NodeInfo[];
|
|
161
|
+
importClause?: NodeInfo;
|
|
162
|
+
moduleSpecifier?: NodeInfo;
|
|
163
|
+
namedBindings?: NodeInfo;
|
|
164
|
+
exportClause?: NodeInfo;
|
|
165
|
+
incrementor?: NodeInfo;
|
|
166
|
+
statement?: NodeInfo;
|
|
167
|
+
caseBlock?: NodeInfo;
|
|
168
|
+
clauses?: NodeInfo[];
|
|
169
|
+
tryBlock?: NodeInfo;
|
|
170
|
+
catchClause?: NodeInfo;
|
|
171
|
+
finallyBlock?: NodeInfo;
|
|
172
|
+
variableDeclaration?: NodeInfo;
|
|
173
|
+
block?: NodeInfo;
|
|
174
|
+
argumentExpression?: NodeInfo;
|
|
175
|
+
equalsToken?: NodeInfo;
|
|
176
|
+
objectAssignmentInitializer?: NodeInfo;
|
|
177
|
+
head?: NodeInfo;
|
|
178
|
+
templateSpans?: NodeInfo[];
|
|
179
|
+
literal?: NodeInfo;
|
|
180
|
+
tag?: NodeInfo;
|
|
181
|
+
template?: NodeInfo;
|
|
182
|
+
questionToken?: NodeInfo;
|
|
183
|
+
dotDotDotToken?: NodeInfo;
|
|
184
|
+
exclamationToken?: NodeInfo;
|
|
185
|
+
asteriskToken?: NodeInfo;
|
|
186
|
+
equalsGreaterThanToken?: NodeInfo;
|
|
187
|
+
questionDotToken?: NodeInfo;
|
|
188
|
+
typeArguments?: NodeInfo[];
|
|
189
|
+
constraint?: NodeInfo;
|
|
190
|
+
defaultType?: NodeInfo;
|
|
191
|
+
locals?: SymbolInfo[];
|
|
192
|
+
endOfFileToken?: NodeInfo;
|
|
193
|
+
imports?: NodeInfo[];
|
|
194
|
+
isDeclarationFile?: boolean;
|
|
195
|
+
scriptKind?: number;
|
|
196
|
+
identifierCount?: number;
|
|
197
|
+
symbolCount?: number;
|
|
198
|
+
nodeCount?: number;
|
|
199
|
+
listMetas?: Record<string, NodeListMeta>;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* NodeList metadata (Pos, End, HasTrailingComma)
|
|
204
|
+
*/
|
|
205
|
+
declare interface NodeListMeta {
|
|
206
|
+
pos: number;
|
|
207
|
+
end: number;
|
|
208
|
+
hasTrailingComma: boolean;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Function parameter information (deprecated - use SymbolInfo instead)
|
|
213
|
+
*/
|
|
214
|
+
export declare interface ParameterInfo {
|
|
215
|
+
name: string;
|
|
216
|
+
type?: TypeInfo;
|
|
217
|
+
optional: boolean;
|
|
218
|
+
rest: boolean;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export declare interface ParserOptions {
|
|
222
|
+
projectService?: boolean;
|
|
223
|
+
project?: string[] | string;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Shared types for rslint IPC protocol across all environments
|
|
228
|
+
*/
|
|
229
|
+
declare interface Position {
|
|
230
|
+
line: number;
|
|
231
|
+
column: number;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
declare interface Range {
|
|
235
|
+
start: Position;
|
|
236
|
+
end: Position;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export declare interface RSlintOptions {
|
|
240
|
+
rslintPath?: string;
|
|
241
|
+
workingDirectory?: string;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Main RslintService class that automatically uses the appropriate implementation
|
|
246
|
+
*/
|
|
247
|
+
export declare class RSLintService {
|
|
248
|
+
private readonly service;
|
|
249
|
+
constructor(service: RslintServiceInterface);
|
|
250
|
+
/**
|
|
251
|
+
* Run the linter on specified files
|
|
252
|
+
*/
|
|
253
|
+
lint(options?: LintOptions): Promise<LintResponse>;
|
|
254
|
+
/**
|
|
255
|
+
* Apply fixes to a file based on diagnostics
|
|
256
|
+
*/
|
|
257
|
+
applyFixes(options: ApplyFixesRequest): Promise<ApplyFixesResponse>;
|
|
258
|
+
/**
|
|
259
|
+
* Get detailed AST information at a specific position
|
|
260
|
+
* Returns Node, Type, Symbol, Signature, and Flow information
|
|
261
|
+
*/
|
|
262
|
+
getAstInfo(options: GetAstInfoRequest): Promise<GetAstInfoResponse>;
|
|
263
|
+
/**
|
|
264
|
+
* Close the service
|
|
265
|
+
*/
|
|
266
|
+
close(): Promise<void>;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export declare interface RslintServiceInterface {
|
|
270
|
+
sendMessage(kind: string, data: any): Promise<any>;
|
|
271
|
+
terminate(): void;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Detailed information about a function/method signature
|
|
276
|
+
*/
|
|
277
|
+
export declare interface SignatureInfo {
|
|
278
|
+
flags: number;
|
|
279
|
+
flagNames?: string[];
|
|
280
|
+
minArgumentCount: number;
|
|
281
|
+
pos?: number;
|
|
282
|
+
fileName?: string;
|
|
283
|
+
parameters?: SymbolInfo[];
|
|
284
|
+
thisParameter?: SymbolInfo;
|
|
285
|
+
typeParameters?: TypeInfo[];
|
|
286
|
+
returnType?: TypeInfo;
|
|
287
|
+
typePredicate?: TypePredicateInfo;
|
|
288
|
+
declaration?: NodeInfo;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Detailed information about a TypeScript symbol
|
|
293
|
+
*/
|
|
294
|
+
export declare interface SymbolInfo {
|
|
295
|
+
id?: number;
|
|
296
|
+
name: string;
|
|
297
|
+
escapedName?: string;
|
|
298
|
+
flags: number;
|
|
299
|
+
flagNames?: string[];
|
|
300
|
+
checkFlags?: number;
|
|
301
|
+
checkFlagNames?: string[];
|
|
302
|
+
pos?: number;
|
|
303
|
+
fileName?: string;
|
|
304
|
+
declarations?: NodeInfo[];
|
|
305
|
+
valueDeclaration?: NodeInfo;
|
|
306
|
+
members?: SymbolInfo[];
|
|
307
|
+
exports?: SymbolInfo[];
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Detailed information about a TypeScript type
|
|
312
|
+
*/
|
|
313
|
+
export declare interface TypeInfo {
|
|
314
|
+
id?: number;
|
|
315
|
+
flags: number;
|
|
316
|
+
flagNames?: string[];
|
|
317
|
+
objectFlags?: number;
|
|
318
|
+
objectFlagNames?: string[];
|
|
319
|
+
intrinsicName?: string;
|
|
320
|
+
typeString: string;
|
|
321
|
+
pos?: number;
|
|
322
|
+
fileName?: string;
|
|
323
|
+
value?: unknown;
|
|
324
|
+
freshType?: TypeInfo;
|
|
325
|
+
regularType?: TypeInfo;
|
|
326
|
+
symbol?: SymbolInfo;
|
|
327
|
+
aliasSymbol?: SymbolInfo;
|
|
328
|
+
typeArguments?: TypeInfo[];
|
|
329
|
+
baseTypes?: TypeInfo[];
|
|
330
|
+
properties?: SymbolInfo[];
|
|
331
|
+
callSignatures?: SignatureInfo[];
|
|
332
|
+
constructSignatures?: SignatureInfo[];
|
|
333
|
+
indexInfos?: IndexInfo[];
|
|
334
|
+
types?: TypeInfo[];
|
|
335
|
+
constraint?: TypeInfo;
|
|
336
|
+
default?: TypeInfo;
|
|
337
|
+
target?: TypeInfo;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Generic type parameter information
|
|
342
|
+
*/
|
|
343
|
+
export declare interface TypeParamInfo {
|
|
344
|
+
name: string;
|
|
345
|
+
constraint?: TypeInfo;
|
|
346
|
+
default?: TypeInfo;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* Type predicate information for type guards
|
|
351
|
+
*/
|
|
352
|
+
export declare interface TypePredicateInfo {
|
|
353
|
+
kind: number;
|
|
354
|
+
kindName: string;
|
|
355
|
+
parameterName?: string;
|
|
356
|
+
parameterIndex?: number;
|
|
357
|
+
type?: TypeInfo;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
export { }
|
package/dist/service.js
CHANGED
|
@@ -1,19 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
* Main RslintService class that automatically uses the appropriate implementation
|
|
3
|
-
*/
|
|
4
|
-
export class RSLintService {
|
|
1
|
+
class RSLintService {
|
|
5
2
|
service;
|
|
6
|
-
constructor(service)
|
|
3
|
+
constructor(service){
|
|
7
4
|
this.service = service;
|
|
8
5
|
}
|
|
9
|
-
/**
|
|
10
|
-
* Run the linter on specified files
|
|
11
|
-
*/
|
|
12
6
|
async lint(options = {}) {
|
|
13
|
-
const { files, config, workingDirectory, ruleOptions, fileContents, languageOptions, includeEncodedSourceFiles
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
const { files, config, workingDirectory, ruleOptions, fileContents, languageOptions, includeEncodedSourceFiles } = options;
|
|
8
|
+
await this.service.sendMessage('handshake', {
|
|
9
|
+
version: '1.0.0'
|
|
10
|
+
});
|
|
17
11
|
return this.service.sendMessage('lint', {
|
|
18
12
|
files,
|
|
19
13
|
config,
|
|
@@ -22,31 +16,24 @@ export class RSLintService {
|
|
|
22
16
|
fileContents,
|
|
23
17
|
languageOptions,
|
|
24
18
|
includeEncodedSourceFiles,
|
|
25
|
-
format: 'jsonline'
|
|
19
|
+
format: 'jsonline'
|
|
26
20
|
});
|
|
27
21
|
}
|
|
28
|
-
/**
|
|
29
|
-
* Apply fixes to a file based on diagnostics
|
|
30
|
-
*/
|
|
31
22
|
async applyFixes(options) {
|
|
32
23
|
const { fileContent, diagnostics } = options;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
24
|
+
await this.service.sendMessage('handshake', {
|
|
25
|
+
version: '1.0.0'
|
|
26
|
+
});
|
|
36
27
|
return this.service.sendMessage('applyFixes', {
|
|
37
28
|
fileContent,
|
|
38
|
-
diagnostics
|
|
29
|
+
diagnostics
|
|
39
30
|
});
|
|
40
31
|
}
|
|
41
|
-
/**
|
|
42
|
-
* Get detailed AST information at a specific position
|
|
43
|
-
* Returns Node, Type, Symbol, Signature, and Flow information
|
|
44
|
-
*/
|
|
45
32
|
async getAstInfo(options) {
|
|
46
|
-
const { fileContent, position, end, kind, depth = 2, fileName, compilerOptions
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
33
|
+
const { fileContent, position, end, kind, depth = 2, fileName, compilerOptions } = options;
|
|
34
|
+
await this.service.sendMessage('handshake', {
|
|
35
|
+
version: '1.0.0'
|
|
36
|
+
});
|
|
50
37
|
return this.service.sendMessage('getAstInfo', {
|
|
51
38
|
fileContent,
|
|
52
39
|
position,
|
|
@@ -54,18 +41,16 @@ export class RSLintService {
|
|
|
54
41
|
kind,
|
|
55
42
|
depth,
|
|
56
43
|
fileName,
|
|
57
|
-
compilerOptions
|
|
44
|
+
compilerOptions
|
|
58
45
|
});
|
|
59
46
|
}
|
|
60
|
-
/**
|
|
61
|
-
* Close the service
|
|
62
|
-
*/
|
|
63
47
|
async close() {
|
|
64
|
-
return new Promise((resolve)
|
|
65
|
-
this.service.sendMessage('exit', {}).finally(()
|
|
48
|
+
return new Promise((resolve)=>{
|
|
49
|
+
this.service.sendMessage('exit', {}).finally(()=>{
|
|
66
50
|
this.service.terminate();
|
|
67
51
|
resolve();
|
|
68
52
|
});
|
|
69
53
|
});
|
|
70
54
|
}
|
|
71
55
|
}
|
|
56
|
+
export { RSLintService };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rslint/core",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4-canary.1781059600",
|
|
4
4
|
"exports": {
|
|
5
5
|
".": {
|
|
6
6
|
"@typescript/source": "./src/index.ts",
|
|
@@ -18,6 +18,10 @@
|
|
|
18
18
|
"@typescript/source": "./src/config-loader.ts",
|
|
19
19
|
"default": "./dist/config-loader.js"
|
|
20
20
|
},
|
|
21
|
+
"./eslint-plugin": {
|
|
22
|
+
"@typescript/source": "./src/eslint-plugin/index.ts",
|
|
23
|
+
"default": "./dist/eslint-plugin/index.js"
|
|
24
|
+
},
|
|
21
25
|
"./bin": "./bin/rslint.cjs",
|
|
22
26
|
"./package.json": "./package.json"
|
|
23
27
|
},
|
|
@@ -48,11 +52,21 @@
|
|
|
48
52
|
"webworker"
|
|
49
53
|
],
|
|
50
54
|
"devDependencies": {
|
|
55
|
+
"@eslint/plugin-kit": "0.3.5",
|
|
56
|
+
"@rslib/core": "0.22.0",
|
|
51
57
|
"@types/node": "24.0.14",
|
|
52
58
|
"@types/picomatch": "4.0.2",
|
|
59
|
+
"@typescript-eslint/scope-manager": "8.59.4",
|
|
60
|
+
"@typescript-eslint/visitor-keys": "8.59.4",
|
|
53
61
|
"@typescript/native-preview": "7.0.0-dev.20250904.1",
|
|
62
|
+
"eslint-scope": "9.1.2",
|
|
63
|
+
"eslint-visitor-keys": "5.0.1",
|
|
64
|
+
"espree": "11.2.0",
|
|
65
|
+
"esquery": "1.7.0",
|
|
66
|
+
"globals": "17.6.0",
|
|
67
|
+
"tinyglobby": "0.2.15",
|
|
54
68
|
"typescript": "5.9.3",
|
|
55
|
-
"@rslint/api": "0.5.
|
|
69
|
+
"@rslint/api": "0.5.4-canary.1781059600"
|
|
56
70
|
},
|
|
57
71
|
"peerDependencies": {
|
|
58
72
|
"jiti": "^2.0.0"
|
|
@@ -63,22 +77,24 @@
|
|
|
63
77
|
}
|
|
64
78
|
},
|
|
65
79
|
"optionalDependencies": {
|
|
66
|
-
"@rslint/darwin-arm64": "0.5.
|
|
67
|
-
"@rslint/
|
|
68
|
-
"@rslint/linux-x64": "0.5.
|
|
69
|
-
"@rslint/
|
|
70
|
-
"@rslint/
|
|
71
|
-
"@rslint/
|
|
80
|
+
"@rslint/native-darwin-arm64": "0.5.4-canary.1781059600",
|
|
81
|
+
"@rslint/native-linux-arm64-gnu": "0.5.4-canary.1781059600",
|
|
82
|
+
"@rslint/native-linux-x64-gnu": "0.5.4-canary.1781059600",
|
|
83
|
+
"@rslint/native-linux-arm64-musl": "0.5.4-canary.1781059600",
|
|
84
|
+
"@rslint/native-linux-x64-musl": "0.5.4-canary.1781059600",
|
|
85
|
+
"@rslint/native-darwin-x64": "0.5.4-canary.1781059600",
|
|
86
|
+
"@rslint/native-win32-arm64-msvc": "0.5.4-canary.1781059600",
|
|
87
|
+
"@rslint/native-win32-x64-msvc": "0.5.4-canary.1781059600"
|
|
72
88
|
},
|
|
73
89
|
"dependencies": {
|
|
74
90
|
"picomatch": "4.0.4",
|
|
75
|
-
"
|
|
91
|
+
"@rslint/native": "0.5.4-canary.1781059600"
|
|
76
92
|
},
|
|
77
93
|
"scripts": {
|
|
78
94
|
"build:bin": "go build -v -o bin/ ../../cmd/rslint",
|
|
79
95
|
"build:debug": "GOEXPERIMENT=noregabi go build -v -gcflags='all=-N -l' -o bin/ ../../cmd/rslint ",
|
|
80
|
-
"build:js": "
|
|
81
|
-
"dev": "
|
|
96
|
+
"build:js": "rslib build",
|
|
97
|
+
"dev": "rslib build --watch",
|
|
82
98
|
"build": "pnpm build:bin && pnpm build:js",
|
|
83
99
|
"test": "rstest run",
|
|
84
100
|
"test:update": "rstest run -u"
|
package/dist/browser.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,sBAAsB,EACtB,aAAa,EAGd,MAAM,YAAY,CAAC;AAEpB;;GAEG;AACH,qBAAa,oBAAqB,YAAW,sBAAsB;IACjE,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA8B;IAC9D,OAAO,CAAC,MAAM,CAAC,CAAgB;IAC/B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,YAAY,CAAgB;IAEpC,YAAY,OAAO,EAAE,aAAa,GAAG;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAW1E;YAKa,YAAY;IAwB1B;;OAEG;IACH,OAAO,CAAC,YAAY;IA+CpB;;OAEG;IACH,OAAO,CAAC,aAAa;IAoBrB;;OAEG;IACG,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAWvD;IAED;;OAEG;IACH,OAAO,CAAC,cAAc;IActB;;OAEG;IACH,SAAS,IAAI,IAAI,CAWhB;CACF"}
|
package/dist/cli.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AA+GA,wBAAsB,GAAG,CACvB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,CAAC,CAkDjB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config-loader.d.ts","sourceRoot":"","sources":["../src/config-loader.ts"],"names":[],"mappings":"AAGA,4DAA4D;AAC5D,OAAO,EACL,eAAe,EACf,YAAY,EACZ,cAAc,EACd,kBAAkB,GACnB,MAAM,6BAA6B,CAAC;AAErC;;;;;GAKG;AACH,wBAAsB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAqCzE;AAuBD;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAqC1E"}
|
package/dist/configs/import.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { RslintConfigEntry } from '../define-config.js';
|
|
2
|
-
// Aligned with official eslint-plugin-import recommended.
|
|
3
|
-
// Rules commented out with "not implemented" are in the official preset but not yet available.
|
|
4
|
-
declare const recommended: RslintConfigEntry;
|
|
5
|
-
export { recommended };
|
|
6
|
-
//# sourceMappingURL=import.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"import.d.ts","sourceRoot":"","sources":["../../src/configs/import.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,0DAA0D;AAC1D,+FAA+F;AAC/F,QAAA,MAAM,WAAW,EAAE,iBAclB,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
package/dist/configs/import.js
DELETED
package/dist/configs/index.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { RslintConfigEntry } from '../define-config.js';
|
|
2
|
-
interface PluginExport {
|
|
3
|
-
configs: {
|
|
4
|
-
recommended: RslintConfigEntry;
|
|
5
|
-
};
|
|
6
|
-
}
|
|
7
|
-
export declare const ts: PluginExport;
|
|
8
|
-
export declare const js: PluginExport;
|
|
9
|
-
export declare const reactPlugin: PluginExport;
|
|
10
|
-
export declare const reactHooksPlugin: PluginExport;
|
|
11
|
-
export declare const importPlugin: PluginExport;
|
|
12
|
-
export declare const promisePlugin: PluginExport;
|
|
13
|
-
export declare const jestPlugin: PluginExport;
|
|
14
|
-
export declare const unicornPlugin: PluginExport;
|
|
15
|
-
export {};
|
|
16
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/configs/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAU7D,UAAU,YAAY;IACpB,OAAO,EAAE;QAAE,WAAW,EAAE,iBAAiB,CAAA;KAAE,CAAC;CAC7C;AAED,eAAO,MAAM,EAAE,EAAE,YAEhB,CAAC;AAEF,eAAO,MAAM,EAAE,EAAE,YAEhB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,YAEzB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,YAE9B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,YAE1B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,YAE3B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,YAExB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,YAE3B,CAAC"}
|
package/dist/configs/index.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { recommended as tsRecommended } from './typescript.js';
|
|
2
|
-
import { recommended as jsRecommended } from './javascript.js';
|
|
3
|
-
import { recommended as reactRecommended } from './react.js';
|
|
4
|
-
import { recommended as reactHooksRecommended } from './react-hooks.js';
|
|
5
|
-
import { recommended as importRecommended } from './import.js';
|
|
6
|
-
import { recommended as promiseRecommended } from './promise.js';
|
|
7
|
-
import { recommended as jestRecommended } from './jest.js';
|
|
8
|
-
import { recommended as unicornRecommended } from './unicorn.js';
|
|
9
|
-
export const ts = {
|
|
10
|
-
configs: { recommended: tsRecommended },
|
|
11
|
-
};
|
|
12
|
-
export const js = {
|
|
13
|
-
configs: { recommended: jsRecommended },
|
|
14
|
-
};
|
|
15
|
-
export const reactPlugin = {
|
|
16
|
-
configs: { recommended: reactRecommended },
|
|
17
|
-
};
|
|
18
|
-
export const reactHooksPlugin = {
|
|
19
|
-
configs: { recommended: reactHooksRecommended },
|
|
20
|
-
};
|
|
21
|
-
export const importPlugin = {
|
|
22
|
-
configs: { recommended: importRecommended },
|
|
23
|
-
};
|
|
24
|
-
export const promisePlugin = {
|
|
25
|
-
configs: { recommended: promiseRecommended },
|
|
26
|
-
};
|
|
27
|
-
export const jestPlugin = {
|
|
28
|
-
configs: { recommended: jestRecommended },
|
|
29
|
-
};
|
|
30
|
-
export const unicornPlugin = {
|
|
31
|
-
configs: { recommended: unicornRecommended },
|
|
32
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { RslintConfigEntry } from '../define-config.js';
|
|
2
|
-
// Aligned with official eslint:recommended (@eslint/js@10.x).
|
|
3
|
-
// Rules commented out with "not implemented" are in the official preset but not yet available.
|
|
4
|
-
declare const recommended: RslintConfigEntry;
|
|
5
|
-
export { recommended };
|
|
6
|
-
//# sourceMappingURL=javascript.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"javascript.d.ts","sourceRoot":"","sources":["../../src/configs/javascript.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,8DAA8D;AAC9D,+FAA+F;AAC/F,QAAA,MAAM,WAAW,EAAE,iBAoElB,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC"}
|