@alexlit/lint-kit 182.0.0 → 182.1.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/package.json +1 -1
- package/packages/config-commitlint/package.json +3 -3
- package/packages/config-eslint/package.json +7 -7
- package/packages/config-stylelint/package.json +3 -3
- package/packages/config-eslint/node_modules/eslint-visitor-keys/LICENSE +0 -201
- package/packages/config-eslint/node_modules/eslint-visitor-keys/README.md +0 -121
- package/packages/config-eslint/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs +0 -396
- package/packages/config-eslint/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.d.cts +0 -28
- package/packages/config-eslint/node_modules/eslint-visitor-keys/dist/index.d.ts +0 -16
- package/packages/config-eslint/node_modules/eslint-visitor-keys/dist/visitor-keys.d.ts +0 -12
- package/packages/config-eslint/node_modules/eslint-visitor-keys/lib/index.js +0 -67
- package/packages/config-eslint/node_modules/eslint-visitor-keys/lib/visitor-keys.js +0 -327
- package/packages/config-eslint/node_modules/eslint-visitor-keys/package.json +0 -59
- package/packages/config-eslint/node_modules/jsonc-eslint-parser/LICENSE +0 -21
- package/packages/config-eslint/node_modules/jsonc-eslint-parser/README.md +0 -109
- package/packages/config-eslint/node_modules/jsonc-eslint-parser/lib/chunk-C7Uep-_p.mjs +0 -20
- package/packages/config-eslint/node_modules/jsonc-eslint-parser/lib/index.d.mts +0 -210
- package/packages/config-eslint/node_modules/jsonc-eslint-parser/lib/index.mjs +0 -1305
- package/packages/config-eslint/node_modules/jsonc-eslint-parser/package.json +0 -98
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
import { VisitorKeys as VisitorKeys$1 } from "eslint-visitor-keys";
|
|
2
|
-
import * as eslint from "eslint";
|
|
3
|
-
import { AST, SourceCode } from "eslint";
|
|
4
|
-
import { Comment } from "estree";
|
|
5
|
-
import { AST as AST$1 } from "jsonc-eslint-parser";
|
|
6
|
-
|
|
7
|
-
//#region src/parser/ast.d.ts
|
|
8
|
-
declare namespace ast_d_exports {
|
|
9
|
-
export { JSONArrayExpression, JSONBigIntLiteral, JSONBinaryExpression, JSONExpression, JSONExpressionStatement, JSONIdentifier, JSONKeywordLiteral, JSONLiteral, JSONNode, JSONNumberIdentifier, JSONNumberLiteral, JSONObjectExpression, JSONProgram, JSONProperty, JSONRegExpLiteral, JSONStringLiteral, JSONTemplateElement, JSONTemplateLiteral, JSONUnaryExpression, JSONUndefinedIdentifier, Locations, Position, SourceLocation };
|
|
10
|
-
}
|
|
11
|
-
interface Locations {
|
|
12
|
-
loc: SourceLocation;
|
|
13
|
-
range: [number, number];
|
|
14
|
-
}
|
|
15
|
-
interface BaseJSONNode extends Locations {
|
|
16
|
-
type: string;
|
|
17
|
-
}
|
|
18
|
-
interface SourceLocation {
|
|
19
|
-
start: Position;
|
|
20
|
-
end: Position;
|
|
21
|
-
}
|
|
22
|
-
interface Position {
|
|
23
|
-
/** >= 1 */
|
|
24
|
-
line: number;
|
|
25
|
-
/** >= 0 */
|
|
26
|
-
column: number;
|
|
27
|
-
}
|
|
28
|
-
type JSONNode = JSONProgram | JSONExpressionStatement | JSONExpression | JSONProperty | JSONIdentifier | JSONTemplateLiteral | JSONTemplateElement;
|
|
29
|
-
interface JSONProgram extends BaseJSONNode {
|
|
30
|
-
type: "Program";
|
|
31
|
-
body: [JSONExpressionStatement];
|
|
32
|
-
comments: Comment[];
|
|
33
|
-
tokens: AST.Token[];
|
|
34
|
-
parent: null;
|
|
35
|
-
}
|
|
36
|
-
interface JSONExpressionStatement extends BaseJSONNode {
|
|
37
|
-
type: "JSONExpressionStatement";
|
|
38
|
-
expression: JSONExpression;
|
|
39
|
-
parent: JSONProgram;
|
|
40
|
-
}
|
|
41
|
-
type JSONExpression = JSONArrayExpression | JSONObjectExpression | JSONLiteral | JSONUnaryExpression | JSONNumberIdentifier | JSONUndefinedIdentifier | JSONTemplateLiteral | JSONBinaryExpression;
|
|
42
|
-
interface JSONArrayExpression extends BaseJSONNode {
|
|
43
|
-
type: "JSONArrayExpression";
|
|
44
|
-
elements: (JSONExpression | null)[];
|
|
45
|
-
parent: JSONArrayExpression | JSONProperty | JSONExpressionStatement;
|
|
46
|
-
}
|
|
47
|
-
interface JSONObjectExpression extends BaseJSONNode {
|
|
48
|
-
type: "JSONObjectExpression";
|
|
49
|
-
properties: JSONProperty[];
|
|
50
|
-
parent: JSONArrayExpression | JSONProperty | JSONExpressionStatement;
|
|
51
|
-
}
|
|
52
|
-
interface JSONProperty extends BaseJSONNode {
|
|
53
|
-
type: "JSONProperty";
|
|
54
|
-
key: JSONIdentifier | JSONStringLiteral | JSONNumberLiteral;
|
|
55
|
-
value: JSONExpression;
|
|
56
|
-
kind: "init";
|
|
57
|
-
method: false;
|
|
58
|
-
shorthand: false;
|
|
59
|
-
computed: false;
|
|
60
|
-
parent: JSONObjectExpression;
|
|
61
|
-
}
|
|
62
|
-
interface JSONIdentifier extends BaseJSONNode {
|
|
63
|
-
type: "JSONIdentifier";
|
|
64
|
-
name: string;
|
|
65
|
-
parent?: JSONArrayExpression | JSONProperty | JSONExpressionStatement | JSONUnaryExpression;
|
|
66
|
-
}
|
|
67
|
-
interface JSONNumberIdentifier extends JSONIdentifier {
|
|
68
|
-
name: "Infinity" | "NaN";
|
|
69
|
-
}
|
|
70
|
-
interface JSONUndefinedIdentifier extends JSONIdentifier {
|
|
71
|
-
name: "undefined";
|
|
72
|
-
}
|
|
73
|
-
interface JSONLiteralBase extends BaseJSONNode {
|
|
74
|
-
type: "JSONLiteral";
|
|
75
|
-
raw: string;
|
|
76
|
-
parent?: JSONArrayExpression | JSONProperty | JSONExpressionStatement | JSONUnaryExpression | JSONBinaryExpression;
|
|
77
|
-
}
|
|
78
|
-
interface JSONStringLiteral extends JSONLiteralBase {
|
|
79
|
-
value: string;
|
|
80
|
-
regex: null;
|
|
81
|
-
bigint: null;
|
|
82
|
-
}
|
|
83
|
-
interface JSONNumberLiteral extends JSONLiteralBase {
|
|
84
|
-
value: number;
|
|
85
|
-
regex: null;
|
|
86
|
-
bigint: null;
|
|
87
|
-
}
|
|
88
|
-
interface JSONKeywordLiteral extends JSONLiteralBase {
|
|
89
|
-
value: boolean | null;
|
|
90
|
-
regex: null;
|
|
91
|
-
bigint: null;
|
|
92
|
-
}
|
|
93
|
-
interface JSONRegExpLiteral extends JSONLiteralBase {
|
|
94
|
-
value: null;
|
|
95
|
-
regex: {
|
|
96
|
-
pattern: string;
|
|
97
|
-
flags: string;
|
|
98
|
-
};
|
|
99
|
-
bigint: null;
|
|
100
|
-
}
|
|
101
|
-
interface JSONBigIntLiteral extends JSONLiteralBase {
|
|
102
|
-
value: null;
|
|
103
|
-
regex: null;
|
|
104
|
-
bigint: string;
|
|
105
|
-
}
|
|
106
|
-
type JSONLiteral = JSONStringLiteral | JSONNumberLiteral | JSONKeywordLiteral | JSONRegExpLiteral | JSONBigIntLiteral;
|
|
107
|
-
interface JSONUnaryExpression extends BaseJSONNode {
|
|
108
|
-
type: "JSONUnaryExpression";
|
|
109
|
-
operator: "-" | "+";
|
|
110
|
-
prefix: true;
|
|
111
|
-
argument: JSONNumberLiteral | JSONNumberIdentifier;
|
|
112
|
-
parent: JSONArrayExpression | JSONProperty | JSONExpressionStatement;
|
|
113
|
-
}
|
|
114
|
-
interface JSONTemplateLiteral extends BaseJSONNode {
|
|
115
|
-
type: "JSONTemplateLiteral";
|
|
116
|
-
quasis: [JSONTemplateElement];
|
|
117
|
-
expressions: [];
|
|
118
|
-
parent: JSONArrayExpression | JSONProperty | JSONExpressionStatement;
|
|
119
|
-
}
|
|
120
|
-
interface JSONTemplateElement extends BaseJSONNode {
|
|
121
|
-
type: "JSONTemplateElement";
|
|
122
|
-
tail: boolean;
|
|
123
|
-
value: {
|
|
124
|
-
cooked: string;
|
|
125
|
-
raw: string;
|
|
126
|
-
};
|
|
127
|
-
parent: JSONTemplateLiteral;
|
|
128
|
-
}
|
|
129
|
-
interface JSONBinaryExpression extends BaseJSONNode {
|
|
130
|
-
type: "JSONBinaryExpression";
|
|
131
|
-
operator: "-" | "+" | "*" | "/" | "%" | "**";
|
|
132
|
-
left: JSONNumberLiteral | JSONUnaryExpression | JSONBinaryExpression;
|
|
133
|
-
right: JSONNumberLiteral | JSONUnaryExpression | JSONBinaryExpression;
|
|
134
|
-
parent: JSONArrayExpression | JSONProperty | JSONExpressionStatement | JSONUnaryExpression | JSONBinaryExpression;
|
|
135
|
-
}
|
|
136
|
-
//#endregion
|
|
137
|
-
//#region src/parser/parser.d.ts
|
|
138
|
-
/**
|
|
139
|
-
* Parse JSON source code
|
|
140
|
-
*/
|
|
141
|
-
declare function parseJSON(code: string, options?: any): JSONProgram;
|
|
142
|
-
/**
|
|
143
|
-
* Parse source code
|
|
144
|
-
*/
|
|
145
|
-
declare function parseForESLint(code: string, options?: any): {
|
|
146
|
-
ast: JSONProgram;
|
|
147
|
-
visitorKeys: SourceCode.VisitorKeys;
|
|
148
|
-
services: {
|
|
149
|
-
isJSON: boolean;
|
|
150
|
-
};
|
|
151
|
-
};
|
|
152
|
-
//#endregion
|
|
153
|
-
//#region src/parser/traverse.d.ts
|
|
154
|
-
interface Visitor<N> {
|
|
155
|
-
visitorKeys?: VisitorKeys$1;
|
|
156
|
-
enterNode(node: N, parent: N | null): void;
|
|
157
|
-
leaveNode(node: N, parent: N | null): void;
|
|
158
|
-
}
|
|
159
|
-
declare function traverseNodes(node: JSONNode, visitor: Visitor<JSONNode>): void;
|
|
160
|
-
//#endregion
|
|
161
|
-
//#region src/utils/ast.d.ts
|
|
162
|
-
/**
|
|
163
|
-
* Checks if given node is JSONExpression
|
|
164
|
-
*/
|
|
165
|
-
declare function isExpression<N extends JSONNode>(node: N): node is N & JSONExpression;
|
|
166
|
-
/**
|
|
167
|
-
* Checks if given node is JSONNumberIdentifier
|
|
168
|
-
*/
|
|
169
|
-
declare function isNumberIdentifier(node: JSONIdentifier): node is JSONNumberIdentifier;
|
|
170
|
-
/**
|
|
171
|
-
* Checks if given node is JSONUndefinedIdentifier
|
|
172
|
-
*/
|
|
173
|
-
declare function isUndefinedIdentifier(node: JSONIdentifier): node is JSONUndefinedIdentifier;
|
|
174
|
-
type JSONValue = string | number | boolean | null | undefined | JSONObjectValue | JSONValue[] | RegExp | bigint;
|
|
175
|
-
type JSONObjectValue = {
|
|
176
|
-
[key: string]: JSONValue;
|
|
177
|
-
};
|
|
178
|
-
declare function getStaticJSONValue(node: JSONUnaryExpression | JSONNumberIdentifier | JSONNumberLiteral | JSONBinaryExpression): number;
|
|
179
|
-
declare function getStaticJSONValue(node: JSONUndefinedIdentifier): undefined;
|
|
180
|
-
declare function getStaticJSONValue(node: JSONTemplateLiteral | JSONTemplateElement | JSONStringLiteral): string;
|
|
181
|
-
declare function getStaticJSONValue(node: JSONKeywordLiteral): boolean | null;
|
|
182
|
-
declare function getStaticJSONValue(node: JSONRegExpLiteral): RegExp;
|
|
183
|
-
declare function getStaticJSONValue(node: JSONBigIntLiteral): bigint;
|
|
184
|
-
declare function getStaticJSONValue(node: JSONLiteral): string | number | boolean | RegExp | bigint | null;
|
|
185
|
-
declare function getStaticJSONValue(node: Exclude<JSONExpression, JSONObjectExpression | JSONArrayExpression>): Exclude<JSONValue, JSONObjectValue | JSONValue[]>;
|
|
186
|
-
declare function getStaticJSONValue(node: JSONObjectExpression): JSONObjectValue;
|
|
187
|
-
declare function getStaticJSONValue(node: JSONArrayExpression): JSONValue[];
|
|
188
|
-
declare function getStaticJSONValue(node: JSONExpression | JSONExpressionStatement | JSONProgram | JSONNode): JSONValue;
|
|
189
|
-
declare namespace meta_d_exports {
|
|
190
|
-
export { name, version };
|
|
191
|
-
}
|
|
192
|
-
declare const name: string;
|
|
193
|
-
declare const version: string;
|
|
194
|
-
//#endregion
|
|
195
|
-
//#region src/types.d.ts
|
|
196
|
-
type JSONSyntax = "JSON" | "JSONC" | "JSON5" | null;
|
|
197
|
-
interface JSONParserOptions {
|
|
198
|
-
jsonSyntax?: JSONSyntax;
|
|
199
|
-
}
|
|
200
|
-
type RuleFunction<Node extends AST$1.JSONNode = any> = (node: Node) => void;
|
|
201
|
-
type BuiltInRuleListeners = { [Node in AST$1.JSONNode as Node["type"]]?: RuleFunction<Node> };
|
|
202
|
-
type BuiltInRuleListenerExits = { [Node in AST$1.JSONNode as `${Node["type"]}:exit`]?: RuleFunction<Node> };
|
|
203
|
-
interface RuleListener extends BuiltInRuleListeners, BuiltInRuleListenerExits {
|
|
204
|
-
[key: string]: RuleFunction | undefined;
|
|
205
|
-
}
|
|
206
|
-
//#endregion
|
|
207
|
-
//#region src/index.d.ts
|
|
208
|
-
declare const VisitorKeys: eslint.SourceCode.VisitorKeys;
|
|
209
|
-
//#endregion
|
|
210
|
-
export { type ast_d_exports as AST, BuiltInRuleListenerExits, BuiltInRuleListeners, JSONParserOptions, JSONSyntax, RuleFunction, RuleListener, VisitorKeys, getStaticJSONValue, isExpression, isNumberIdentifier, isUndefinedIdentifier, meta_d_exports as meta, name, parseForESLint, parseJSON, traverseNodes };
|