@svelte-vitals/core 0.55.2 → 0.55.4
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/README.md +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -2
- package/dist/internal.d.ts +485 -259
- package/dist/internal.js +422 -138
- package/dist/{json-BQf9Qb2D.d.ts → json-CWGGrAda.d.ts} +88 -43
- package/dist/{markdown-DgHBAvYl.js → markdown-YuU0EwLR.js} +1040 -449
- package/package.json +6 -6
package/dist/internal.d.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as ResolvedImages, A as KitModuleFacts, At as ResolvedHead, B as BranchStep, Bt as emptyComponentFacts, C as SEARCH_RESULT_RULES, Ct as Severity, D as settingSeverity, Dt as defaultProject, E as selectRules, Et as defaultConfig, F as ResolvedHeadings, Ft as EffectFact, G as SECTIONING_TAGS, H as LandmarkInput, Ht as Runtime, I as A11yOccurrenceInfo, It as OrphanEffectFact, J as isTopFragment, K as decodeFragmentId, L as A11ySkipCause, Lt as SourceSpan, M as pageRendersOnlyWhenBuilding, Mt as isClassicScriptType, N as routeNeverSsr, Nt as ComponentFacts, O as withFailedRulesOff, P as HeadingInfo, Pt as EachBlockFact, Q as ImageInfo, R as ANCESTRY_DEPENDENT_TAGS, Rt as SuppressionDirective, S as CompiledOverride, St as Scope, T as formatFailedRuleWarning, Tt as Value, U as NAMING_ATTRS, Ut as withReadLimit, V as IDREF_ATTRS, Vt as skippedFileWarnings, W as ResolvedA11y, X as splitTokens, Y as resolveLandmark, Z as stripTextDirective, _ as RuleOptionsSpec, _t as Result, a as formatJsonReportChunks, at as classify, b as shouldSkipRangeCheck, c as ScoreOptions, ct as summarize, d as computeScore, dt as Config, et as isSvgSrc, f as Rule, g as RuleOptionSpec, gt as Project, h as isPenalized, i as formatJsonReport, j as layoutNeverRenders, jt as hasRel, k as withIndexableOff, kt as HeadTag, l as ScoreResult, m as docsUrlFor, mt as KitAlias, nt as formatGithubReport, o as HealthResult, ot as effectiveSeverity, p as RuleContext, pt as Fix, q as foldOccurrences, r as buildJsonReport, rt as Classification, st as hasFailureAtOrAbove, t as JsonReport, tt as formatMarkdownReport, u as computeHealth, ut as Category, v as isPlainObject, w as compileOverrides, x as validateRuleSetting, y as resolveRuleOptions, z as ASIDE_DEMOTING_TAGS, zt as collectComponentFacts } from "./json-CWGGrAda.js";
|
|
2
2
|
import { AST } from "svelte/compiler";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type Node$2 = any;
|
|
4
|
+
/** A component's script `const` lists that nothing in its scripts or template can change. */
|
|
5
|
+
export declare function collectComponentConstantLists(ast: Node$2, opts?: {
|
|
6
|
+
sets?: boolean;
|
|
7
|
+
}): Set<string>;
|
|
5
8
|
/**
|
|
6
9
|
* Export names of a module's constant lists — `export const X = [ … ]`, or a local one exported by
|
|
7
10
|
* name — that the module itself never writes (correctness/each-key, correctness/each-index-key).
|
|
8
11
|
*/
|
|
9
|
-
export declare function collectConstantListExports(program: Node$
|
|
12
|
+
export declare function collectConstantListExports(program: Node$2): Set<string>;
|
|
10
13
|
/** What the per-file parsers produce — `ComponentFacts` minus `file`, with `suppressions` always present. */
|
|
11
14
|
type ParsedFacts = Omit<ComponentFacts, 'file' | 'suppressions'> & {
|
|
12
15
|
suppressions: SuppressionDirective[];
|
|
@@ -17,9 +20,469 @@ type ParsedFacts = Omit<ComponentFacts, 'file' | 'suppressions'> & {
|
|
|
17
20
|
* runes module's orphan-$effect facts (correctness/orphan-effect).
|
|
18
21
|
*/
|
|
19
22
|
export declare function parseComponentFacts(source: string, filename: string): ParsedFacts;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
// This definition file follows a somewhat unusual format. ESTree allows
|
|
24
|
+
// runtime type checks based on the `type` parameter. In order to explain this
|
|
25
|
+
// to typescript we want to use discriminated union types:
|
|
26
|
+
// https://github.com/Microsoft/TypeScript/pull/9163
|
|
27
|
+
//
|
|
28
|
+
// For ESTree this is a bit tricky because the high level interfaces like
|
|
29
|
+
// Node or Function are pulling double duty. We want to pass common fields down
|
|
30
|
+
// to the interfaces that extend them (like Identifier or
|
|
31
|
+
// ArrowFunctionExpression), but you can't extend a type union or enforce
|
|
32
|
+
// common fields on them. So we've split the high level interfaces into two
|
|
33
|
+
// types, a base type which passes down inherited fields, and a type union of
|
|
34
|
+
// all types which extend the base type. Only the type union is exported, and
|
|
35
|
+
// the union is how other types refer to the collection of inheriting types.
|
|
36
|
+
//
|
|
37
|
+
// This makes the definitions file here somewhat more difficult to maintain,
|
|
38
|
+
// but it has the notable advantage of making ESTree much easier to use as
|
|
39
|
+
// an end user.
|
|
40
|
+
interface BaseNodeWithoutComments {
|
|
41
|
+
// Every leaf interface that extends BaseNode must specify a type property.
|
|
42
|
+
// The type property should be a string literal. For example, Identifier
|
|
43
|
+
// has: `type: "Identifier"`
|
|
44
|
+
type: string;
|
|
45
|
+
loc?: SourceLocation | null | undefined;
|
|
46
|
+
range?: [number, number] | undefined;
|
|
47
|
+
}
|
|
48
|
+
interface BaseNode extends BaseNodeWithoutComments {
|
|
49
|
+
leadingComments?: Comment[] | undefined;
|
|
50
|
+
trailingComments?: Comment[] | undefined;
|
|
51
|
+
}
|
|
52
|
+
interface Comment extends BaseNodeWithoutComments {
|
|
53
|
+
type: "Line" | "Block";
|
|
54
|
+
value: string;
|
|
55
|
+
}
|
|
56
|
+
interface SourceLocation {
|
|
57
|
+
source?: string | null | undefined;
|
|
58
|
+
start: Position;
|
|
59
|
+
end: Position;
|
|
60
|
+
}
|
|
61
|
+
interface Position {
|
|
62
|
+
/** >= 1 */
|
|
63
|
+
line: number;
|
|
64
|
+
/** >= 0 */
|
|
65
|
+
column: number;
|
|
66
|
+
}
|
|
67
|
+
interface BaseFunction extends BaseNode {
|
|
68
|
+
params: Pattern[];
|
|
69
|
+
generator?: boolean | undefined;
|
|
70
|
+
async?: boolean | undefined;
|
|
71
|
+
// The body is either BlockStatement or Expression because arrow functions
|
|
72
|
+
// can have a body that's either. FunctionDeclarations and
|
|
73
|
+
// FunctionExpressions have only BlockStatement bodies.
|
|
74
|
+
body: BlockStatement | Expression;
|
|
75
|
+
}
|
|
76
|
+
type Statement = ExpressionStatement | BlockStatement | StaticBlock | EmptyStatement | DebuggerStatement | WithStatement | ReturnStatement | LabeledStatement | BreakStatement | ContinueStatement | IfStatement | SwitchStatement | ThrowStatement | TryStatement | WhileStatement | DoWhileStatement | ForStatement | ForInStatement | ForOfStatement | Declaration;
|
|
77
|
+
interface BaseStatement extends BaseNode {}
|
|
78
|
+
interface EmptyStatement extends BaseStatement {
|
|
79
|
+
type: "EmptyStatement";
|
|
80
|
+
}
|
|
81
|
+
interface BlockStatement extends BaseStatement {
|
|
82
|
+
type: "BlockStatement";
|
|
83
|
+
body: Statement[];
|
|
84
|
+
innerComments?: Comment[] | undefined;
|
|
85
|
+
}
|
|
86
|
+
interface StaticBlock extends Omit<BlockStatement, "type"> {
|
|
87
|
+
type: "StaticBlock";
|
|
88
|
+
}
|
|
89
|
+
interface ExpressionStatement extends BaseStatement {
|
|
90
|
+
type: "ExpressionStatement";
|
|
91
|
+
expression: Expression;
|
|
92
|
+
}
|
|
93
|
+
interface IfStatement extends BaseStatement {
|
|
94
|
+
type: "IfStatement";
|
|
95
|
+
test: Expression;
|
|
96
|
+
consequent: Statement;
|
|
97
|
+
alternate?: Statement | null | undefined;
|
|
98
|
+
}
|
|
99
|
+
interface LabeledStatement extends BaseStatement {
|
|
100
|
+
type: "LabeledStatement";
|
|
101
|
+
label: Identifier;
|
|
102
|
+
body: Statement;
|
|
103
|
+
}
|
|
104
|
+
interface BreakStatement extends BaseStatement {
|
|
105
|
+
type: "BreakStatement";
|
|
106
|
+
label?: Identifier | null | undefined;
|
|
107
|
+
}
|
|
108
|
+
interface ContinueStatement extends BaseStatement {
|
|
109
|
+
type: "ContinueStatement";
|
|
110
|
+
label?: Identifier | null | undefined;
|
|
111
|
+
}
|
|
112
|
+
interface WithStatement extends BaseStatement {
|
|
113
|
+
type: "WithStatement";
|
|
114
|
+
object: Expression;
|
|
115
|
+
body: Statement;
|
|
116
|
+
}
|
|
117
|
+
interface SwitchStatement extends BaseStatement {
|
|
118
|
+
type: "SwitchStatement";
|
|
119
|
+
discriminant: Expression;
|
|
120
|
+
cases: SwitchCase[];
|
|
121
|
+
}
|
|
122
|
+
interface ReturnStatement extends BaseStatement {
|
|
123
|
+
type: "ReturnStatement";
|
|
124
|
+
argument?: Expression | null | undefined;
|
|
125
|
+
}
|
|
126
|
+
interface ThrowStatement extends BaseStatement {
|
|
127
|
+
type: "ThrowStatement";
|
|
128
|
+
argument: Expression;
|
|
129
|
+
}
|
|
130
|
+
interface TryStatement extends BaseStatement {
|
|
131
|
+
type: "TryStatement";
|
|
132
|
+
block: BlockStatement;
|
|
133
|
+
handler?: CatchClause | null | undefined;
|
|
134
|
+
finalizer?: BlockStatement | null | undefined;
|
|
135
|
+
}
|
|
136
|
+
interface WhileStatement extends BaseStatement {
|
|
137
|
+
type: "WhileStatement";
|
|
138
|
+
test: Expression;
|
|
139
|
+
body: Statement;
|
|
140
|
+
}
|
|
141
|
+
interface DoWhileStatement extends BaseStatement {
|
|
142
|
+
type: "DoWhileStatement";
|
|
143
|
+
body: Statement;
|
|
144
|
+
test: Expression;
|
|
145
|
+
}
|
|
146
|
+
interface ForStatement extends BaseStatement {
|
|
147
|
+
type: "ForStatement";
|
|
148
|
+
init?: VariableDeclaration | Expression | null | undefined;
|
|
149
|
+
test?: Expression | null | undefined;
|
|
150
|
+
update?: Expression | null | undefined;
|
|
151
|
+
body: Statement;
|
|
152
|
+
}
|
|
153
|
+
interface BaseForXStatement extends BaseStatement {
|
|
154
|
+
left: VariableDeclaration | Pattern;
|
|
155
|
+
right: Expression;
|
|
156
|
+
body: Statement;
|
|
157
|
+
}
|
|
158
|
+
interface ForInStatement extends BaseForXStatement {
|
|
159
|
+
type: "ForInStatement";
|
|
160
|
+
}
|
|
161
|
+
interface DebuggerStatement extends BaseStatement {
|
|
162
|
+
type: "DebuggerStatement";
|
|
163
|
+
}
|
|
164
|
+
type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration;
|
|
165
|
+
interface BaseDeclaration extends BaseStatement {}
|
|
166
|
+
interface MaybeNamedFunctionDeclaration extends BaseFunction, BaseDeclaration {
|
|
167
|
+
type: "FunctionDeclaration";
|
|
168
|
+
/** It is null when a function declaration is a part of the `export default function` statement */
|
|
169
|
+
id: Identifier | null;
|
|
170
|
+
body: BlockStatement;
|
|
171
|
+
}
|
|
172
|
+
interface FunctionDeclaration extends MaybeNamedFunctionDeclaration {
|
|
173
|
+
id: Identifier;
|
|
174
|
+
}
|
|
175
|
+
interface VariableDeclaration extends BaseDeclaration {
|
|
176
|
+
type: "VariableDeclaration";
|
|
177
|
+
declarations: VariableDeclarator[];
|
|
178
|
+
kind: "var" | "let" | "const" | "using" | "await using";
|
|
179
|
+
}
|
|
180
|
+
interface VariableDeclarator extends BaseNode {
|
|
181
|
+
type: "VariableDeclarator";
|
|
182
|
+
id: Pattern;
|
|
183
|
+
init?: Expression | null | undefined;
|
|
184
|
+
}
|
|
185
|
+
interface ExpressionMap {
|
|
186
|
+
ArrayExpression: ArrayExpression;
|
|
187
|
+
ArrowFunctionExpression: ArrowFunctionExpression;
|
|
188
|
+
AssignmentExpression: AssignmentExpression;
|
|
189
|
+
AwaitExpression: AwaitExpression;
|
|
190
|
+
BinaryExpression: BinaryExpression;
|
|
191
|
+
CallExpression: CallExpression;
|
|
192
|
+
ChainExpression: ChainExpression;
|
|
193
|
+
ClassExpression: ClassExpression;
|
|
194
|
+
ConditionalExpression: ConditionalExpression;
|
|
195
|
+
FunctionExpression: FunctionExpression;
|
|
196
|
+
Identifier: Identifier;
|
|
197
|
+
ImportExpression: ImportExpression;
|
|
198
|
+
Literal: Literal;
|
|
199
|
+
LogicalExpression: LogicalExpression;
|
|
200
|
+
MemberExpression: MemberExpression;
|
|
201
|
+
MetaProperty: MetaProperty;
|
|
202
|
+
NewExpression: NewExpression;
|
|
203
|
+
ObjectExpression: ObjectExpression;
|
|
204
|
+
SequenceExpression: SequenceExpression;
|
|
205
|
+
TaggedTemplateExpression: TaggedTemplateExpression;
|
|
206
|
+
TemplateLiteral: TemplateLiteral;
|
|
207
|
+
ThisExpression: ThisExpression;
|
|
208
|
+
UnaryExpression: UnaryExpression;
|
|
209
|
+
UpdateExpression: UpdateExpression;
|
|
210
|
+
YieldExpression: YieldExpression;
|
|
211
|
+
}
|
|
212
|
+
type Expression = ExpressionMap[keyof ExpressionMap];
|
|
213
|
+
interface BaseExpression extends BaseNode {}
|
|
214
|
+
type ChainElement = SimpleCallExpression | MemberExpression;
|
|
215
|
+
interface ChainExpression extends BaseExpression {
|
|
216
|
+
type: "ChainExpression";
|
|
217
|
+
expression: ChainElement;
|
|
218
|
+
}
|
|
219
|
+
interface ThisExpression extends BaseExpression {
|
|
220
|
+
type: "ThisExpression";
|
|
221
|
+
}
|
|
222
|
+
interface ArrayExpression extends BaseExpression {
|
|
223
|
+
type: "ArrayExpression";
|
|
224
|
+
elements: Array<Expression | SpreadElement | null>;
|
|
225
|
+
}
|
|
226
|
+
interface ObjectExpression extends BaseExpression {
|
|
227
|
+
type: "ObjectExpression";
|
|
228
|
+
properties: Array<Property | SpreadElement>;
|
|
229
|
+
}
|
|
230
|
+
interface PrivateIdentifier extends BaseNode {
|
|
231
|
+
type: "PrivateIdentifier";
|
|
232
|
+
name: string;
|
|
233
|
+
}
|
|
234
|
+
interface Property extends BaseNode {
|
|
235
|
+
type: "Property";
|
|
236
|
+
key: Expression;
|
|
237
|
+
value: Expression | Pattern; // Could be an AssignmentProperty
|
|
238
|
+
kind: "init" | "get" | "set";
|
|
239
|
+
method: boolean;
|
|
240
|
+
shorthand: boolean;
|
|
241
|
+
computed: boolean;
|
|
242
|
+
}
|
|
243
|
+
interface PropertyDefinition extends BaseNode {
|
|
244
|
+
type: "PropertyDefinition";
|
|
245
|
+
key: Expression | PrivateIdentifier;
|
|
246
|
+
value?: Expression | null | undefined;
|
|
247
|
+
computed: boolean;
|
|
248
|
+
static: boolean;
|
|
249
|
+
}
|
|
250
|
+
interface FunctionExpression extends BaseFunction, BaseExpression {
|
|
251
|
+
id?: Identifier | null | undefined;
|
|
252
|
+
type: "FunctionExpression";
|
|
253
|
+
body: BlockStatement;
|
|
254
|
+
}
|
|
255
|
+
interface SequenceExpression extends BaseExpression {
|
|
256
|
+
type: "SequenceExpression";
|
|
257
|
+
expressions: Expression[];
|
|
258
|
+
}
|
|
259
|
+
interface UnaryExpression extends BaseExpression {
|
|
260
|
+
type: "UnaryExpression";
|
|
261
|
+
operator: UnaryOperator;
|
|
262
|
+
prefix: true;
|
|
263
|
+
argument: Expression;
|
|
264
|
+
}
|
|
265
|
+
interface BinaryExpression extends BaseExpression {
|
|
266
|
+
type: "BinaryExpression";
|
|
267
|
+
operator: BinaryOperator;
|
|
268
|
+
left: Expression | PrivateIdentifier;
|
|
269
|
+
right: Expression;
|
|
270
|
+
}
|
|
271
|
+
interface AssignmentExpression extends BaseExpression {
|
|
272
|
+
type: "AssignmentExpression";
|
|
273
|
+
operator: AssignmentOperator;
|
|
274
|
+
left: Pattern | MemberExpression;
|
|
275
|
+
right: Expression;
|
|
276
|
+
}
|
|
277
|
+
interface UpdateExpression extends BaseExpression {
|
|
278
|
+
type: "UpdateExpression";
|
|
279
|
+
operator: UpdateOperator;
|
|
280
|
+
argument: Expression;
|
|
281
|
+
prefix: boolean;
|
|
282
|
+
}
|
|
283
|
+
interface LogicalExpression extends BaseExpression {
|
|
284
|
+
type: "LogicalExpression";
|
|
285
|
+
operator: LogicalOperator;
|
|
286
|
+
left: Expression;
|
|
287
|
+
right: Expression;
|
|
288
|
+
}
|
|
289
|
+
interface ConditionalExpression extends BaseExpression {
|
|
290
|
+
type: "ConditionalExpression";
|
|
291
|
+
test: Expression;
|
|
292
|
+
alternate: Expression;
|
|
293
|
+
consequent: Expression;
|
|
294
|
+
}
|
|
295
|
+
interface BaseCallExpression extends BaseExpression {
|
|
296
|
+
callee: Expression | Super;
|
|
297
|
+
arguments: Array<Expression | SpreadElement>;
|
|
298
|
+
}
|
|
299
|
+
type CallExpression = SimpleCallExpression | NewExpression;
|
|
300
|
+
interface SimpleCallExpression extends BaseCallExpression {
|
|
301
|
+
type: "CallExpression";
|
|
302
|
+
optional: boolean;
|
|
303
|
+
}
|
|
304
|
+
interface NewExpression extends BaseCallExpression {
|
|
305
|
+
type: "NewExpression";
|
|
306
|
+
}
|
|
307
|
+
interface MemberExpression extends BaseExpression, BasePattern {
|
|
308
|
+
type: "MemberExpression";
|
|
309
|
+
object: Expression | Super;
|
|
310
|
+
property: Expression | PrivateIdentifier;
|
|
311
|
+
computed: boolean;
|
|
312
|
+
optional: boolean;
|
|
313
|
+
}
|
|
314
|
+
type Pattern = Identifier | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | MemberExpression;
|
|
315
|
+
interface BasePattern extends BaseNode {}
|
|
316
|
+
interface SwitchCase extends BaseNode {
|
|
317
|
+
type: "SwitchCase";
|
|
318
|
+
test?: Expression | null | undefined;
|
|
319
|
+
consequent: Statement[];
|
|
320
|
+
}
|
|
321
|
+
interface CatchClause extends BaseNode {
|
|
322
|
+
type: "CatchClause";
|
|
323
|
+
param: Pattern | null;
|
|
324
|
+
body: BlockStatement;
|
|
325
|
+
}
|
|
326
|
+
interface Identifier extends BaseNode, BaseExpression, BasePattern {
|
|
327
|
+
type: "Identifier";
|
|
328
|
+
name: string;
|
|
329
|
+
}
|
|
330
|
+
type Literal = SimpleLiteral | RegExpLiteral | BigIntLiteral;
|
|
331
|
+
interface SimpleLiteral extends BaseNode, BaseExpression {
|
|
332
|
+
type: "Literal";
|
|
333
|
+
value: string | boolean | number | null;
|
|
334
|
+
raw?: string | undefined;
|
|
335
|
+
}
|
|
336
|
+
interface RegExpLiteral extends BaseNode, BaseExpression {
|
|
337
|
+
type: "Literal";
|
|
338
|
+
value?: RegExp | null | undefined;
|
|
339
|
+
regex: {
|
|
340
|
+
pattern: string;
|
|
341
|
+
flags: string;
|
|
342
|
+
};
|
|
343
|
+
raw?: string | undefined;
|
|
344
|
+
}
|
|
345
|
+
interface BigIntLiteral extends BaseNode, BaseExpression {
|
|
346
|
+
type: "Literal";
|
|
347
|
+
value?: bigint | null | undefined;
|
|
348
|
+
bigint: string;
|
|
349
|
+
raw?: string | undefined;
|
|
350
|
+
}
|
|
351
|
+
type UnaryOperator = "-" | "+" | "!" | "~" | "typeof" | "void" | "delete";
|
|
352
|
+
type BinaryOperator = "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "**" | "|" | "^" | "&" | "in" | "instanceof";
|
|
353
|
+
type LogicalOperator = "||" | "&&" | "??";
|
|
354
|
+
type AssignmentOperator = "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "**=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&=" | "||=" | "&&=" | "??=";
|
|
355
|
+
type UpdateOperator = "++" | "--";
|
|
356
|
+
interface ForOfStatement extends BaseForXStatement {
|
|
357
|
+
type: "ForOfStatement";
|
|
358
|
+
await: boolean;
|
|
359
|
+
}
|
|
360
|
+
interface Super extends BaseNode {
|
|
361
|
+
type: "Super";
|
|
362
|
+
}
|
|
363
|
+
interface SpreadElement extends BaseNode {
|
|
364
|
+
type: "SpreadElement";
|
|
365
|
+
argument: Expression;
|
|
366
|
+
}
|
|
367
|
+
interface ArrowFunctionExpression extends BaseExpression, BaseFunction {
|
|
368
|
+
type: "ArrowFunctionExpression";
|
|
369
|
+
expression: boolean;
|
|
370
|
+
body: BlockStatement | Expression;
|
|
371
|
+
}
|
|
372
|
+
interface YieldExpression extends BaseExpression {
|
|
373
|
+
type: "YieldExpression";
|
|
374
|
+
argument?: Expression | null | undefined;
|
|
375
|
+
delegate: boolean;
|
|
376
|
+
}
|
|
377
|
+
interface TemplateLiteral extends BaseExpression {
|
|
378
|
+
type: "TemplateLiteral";
|
|
379
|
+
quasis: TemplateElement[];
|
|
380
|
+
expressions: Expression[];
|
|
381
|
+
}
|
|
382
|
+
interface TaggedTemplateExpression extends BaseExpression {
|
|
383
|
+
type: "TaggedTemplateExpression";
|
|
384
|
+
tag: Expression;
|
|
385
|
+
quasi: TemplateLiteral;
|
|
386
|
+
}
|
|
387
|
+
interface TemplateElement extends BaseNode {
|
|
388
|
+
type: "TemplateElement";
|
|
389
|
+
tail: boolean;
|
|
390
|
+
value: {
|
|
391
|
+
/** It is null when the template literal is tagged and the text has an invalid escape (e.g. - tag`\unicode and \u{55}`) */
|
|
392
|
+
cooked?: string | null | undefined;
|
|
393
|
+
raw: string;
|
|
394
|
+
};
|
|
395
|
+
}
|
|
396
|
+
interface AssignmentProperty extends Property {
|
|
397
|
+
value: Pattern;
|
|
398
|
+
kind: "init";
|
|
399
|
+
method: boolean; // false
|
|
400
|
+
}
|
|
401
|
+
interface ObjectPattern extends BasePattern {
|
|
402
|
+
type: "ObjectPattern";
|
|
403
|
+
properties: Array<AssignmentProperty | RestElement>;
|
|
404
|
+
}
|
|
405
|
+
interface ArrayPattern extends BasePattern {
|
|
406
|
+
type: "ArrayPattern";
|
|
407
|
+
elements: Array<Pattern | null>;
|
|
408
|
+
}
|
|
409
|
+
interface RestElement extends BasePattern {
|
|
410
|
+
type: "RestElement";
|
|
411
|
+
argument: Pattern;
|
|
412
|
+
}
|
|
413
|
+
interface AssignmentPattern extends BasePattern {
|
|
414
|
+
type: "AssignmentPattern";
|
|
415
|
+
left: Pattern;
|
|
416
|
+
right: Expression;
|
|
417
|
+
}
|
|
418
|
+
interface BaseClass extends BaseNode {
|
|
419
|
+
superClass?: Expression | null | undefined;
|
|
420
|
+
body: ClassBody;
|
|
421
|
+
}
|
|
422
|
+
interface ClassBody extends BaseNode {
|
|
423
|
+
type: "ClassBody";
|
|
424
|
+
body: Array<MethodDefinition | PropertyDefinition | StaticBlock>;
|
|
425
|
+
}
|
|
426
|
+
interface MethodDefinition extends BaseNode {
|
|
427
|
+
type: "MethodDefinition";
|
|
428
|
+
key: Expression | PrivateIdentifier;
|
|
429
|
+
value: FunctionExpression;
|
|
430
|
+
kind: "constructor" | "method" | "get" | "set";
|
|
431
|
+
computed: boolean;
|
|
432
|
+
static: boolean;
|
|
433
|
+
}
|
|
434
|
+
interface MaybeNamedClassDeclaration extends BaseClass, BaseDeclaration {
|
|
435
|
+
type: "ClassDeclaration";
|
|
436
|
+
/** It is null when a class declaration is a part of the `export default class` statement */
|
|
437
|
+
id: Identifier | null;
|
|
438
|
+
}
|
|
439
|
+
interface ClassDeclaration extends MaybeNamedClassDeclaration {
|
|
440
|
+
id: Identifier;
|
|
441
|
+
}
|
|
442
|
+
interface ClassExpression extends BaseClass, BaseExpression {
|
|
443
|
+
type: "ClassExpression";
|
|
444
|
+
id?: Identifier | null | undefined;
|
|
445
|
+
}
|
|
446
|
+
interface MetaProperty extends BaseExpression {
|
|
447
|
+
type: "MetaProperty";
|
|
448
|
+
meta: Identifier;
|
|
449
|
+
property: Identifier;
|
|
450
|
+
}
|
|
451
|
+
interface ImportExpression extends BaseExpression {
|
|
452
|
+
type: "ImportExpression";
|
|
453
|
+
source: Expression;
|
|
454
|
+
options?: Expression | null | undefined;
|
|
455
|
+
}
|
|
456
|
+
interface AwaitExpression extends BaseExpression {
|
|
457
|
+
type: "AwaitExpression";
|
|
458
|
+
argument: Expression;
|
|
459
|
+
}
|
|
460
|
+
type Node$1 = any;
|
|
461
|
+
interface TSSatisfiesExpression {
|
|
462
|
+
type: 'TSSatisfiesExpression';
|
|
463
|
+
start: number;
|
|
464
|
+
end: number;
|
|
465
|
+
expression: TsExpression;
|
|
466
|
+
}
|
|
467
|
+
interface TSAsExpression {
|
|
468
|
+
type: 'TSAsExpression';
|
|
469
|
+
start: number;
|
|
470
|
+
end: number;
|
|
471
|
+
expression: TsExpression;
|
|
472
|
+
}
|
|
473
|
+
interface TSNonNullExpression {
|
|
474
|
+
type: 'TSNonNullExpression';
|
|
475
|
+
start: number;
|
|
476
|
+
end: number;
|
|
477
|
+
expression: TsExpression;
|
|
478
|
+
}
|
|
479
|
+
/** An estree `Expression`, optionally wrapped in one or more of the three TS wrappers above. */
|
|
480
|
+
type TsExpression = Expression | TSSatisfiesExpression | TSAsExpression | TSNonNullExpression;
|
|
481
|
+
/** Unwrap TS wrapper expressions (`x satisfies T`, `x as T`, `x!`) to the underlying expression. Shared with the Kit-module and Vite-config parsers. */
|
|
482
|
+
export declare function unwrapTs(expr: TsExpression): Expression;
|
|
483
|
+
export declare function unwrapTs(expr: TsExpression | undefined): Expression | undefined;
|
|
484
|
+
/** Generic ESTree walk over a `<script>` program: visit every node with a `.type`. */
|
|
485
|
+
export declare function walkEstree(node: Node$1, visit: (n: Node$1) => void): void;
|
|
23
486
|
/**
|
|
24
487
|
* Inline `svelte-vitals-disable-next-line` directives (issue #92). A plain text scan, not an
|
|
25
488
|
* AST walk, so `<script>` (`//`) and template (`<!-- -->`) comments are covered uniformly. The
|
|
@@ -37,12 +500,10 @@ export declare function collectSuppressions(source: string): SuppressionDirectiv
|
|
|
37
500
|
* runes-module facts (correctness/orphan-effect) and the Kit-module facts (the security kit-module rules).
|
|
38
501
|
*/
|
|
39
502
|
type ParsedModule = {
|
|
40
|
-
program: Node | undefined;
|
|
503
|
+
program: Node$1 | undefined;
|
|
41
504
|
wrapped: string;
|
|
42
505
|
};
|
|
43
506
|
export declare function parseModuleProgram(source: string, filename: string): ParsedModule;
|
|
44
|
-
//#endregion
|
|
45
|
-
//#region src/inline-directives.d.ts
|
|
46
507
|
/** File-relative-path → the inline directives collected from that file. */
|
|
47
508
|
type DirectiveIndex = ReadonlyMap<string, readonly SuppressionDirective[]>;
|
|
48
509
|
/**
|
|
@@ -64,8 +525,6 @@ export declare function addFactsDirectives(index: Map<string, readonly Suppressi
|
|
|
64
525
|
* not turn its directives into errors.
|
|
65
526
|
*/
|
|
66
527
|
export declare function unknownDirectiveIds(index: DirectiveIndex, rules: readonly Rule[]): string[];
|
|
67
|
-
//#endregion
|
|
68
|
-
//#region src/source-files.d.ts
|
|
69
528
|
/**
|
|
70
529
|
* Every file under `src/`, as project-relative paths, sorted. Paths only — nothing is
|
|
71
530
|
* read, so this is the cheaper of the two passes over `src/` (the component collector
|
|
@@ -80,8 +539,9 @@ export declare function unknownDirectiveIds(index: DirectiveIndex, rules: readon
|
|
|
80
539
|
* those rules are concerned, and dot directories never appear at all (see `Runtime.glob`).
|
|
81
540
|
*/
|
|
82
541
|
export declare function collectSourceFiles(rt: Runtime, cwd: string): Promise<string[]>;
|
|
83
|
-
|
|
84
|
-
|
|
542
|
+
type Node = any;
|
|
543
|
+
/** `parseFalseExports` over a parsed module. */
|
|
544
|
+
export declare function collectFalseExports(program: Node): Set<string>;
|
|
85
545
|
/**
|
|
86
546
|
* Resolve an import specifier to a path relative to the analyzed project's root (the
|
|
87
547
|
* cwd svelte-vitals runs from — not necessarily a repo root; in a monorepo the project
|
|
@@ -109,8 +569,6 @@ export declare function collectSourceFiles(rt: Runtime, cwd: string): Promise<st
|
|
|
109
569
|
* repo-local specifier resolution in the repo.
|
|
110
570
|
*/
|
|
111
571
|
export declare function resolveRepoLocalPath(spec: string, importerFile: string, aliases?: readonly KitAlias[]): string | undefined;
|
|
112
|
-
//#endregion
|
|
113
|
-
//#region src/kit-module-collect.d.ts
|
|
114
572
|
/**
|
|
115
573
|
* Scan SvelteKit route/hooks files for SSR shared-state facts (the security kit-module rules): route
|
|
116
574
|
* `+page`/`+layout` server and universal modules, `+server` endpoints, and
|
|
@@ -122,8 +580,6 @@ export declare function resolveRepoLocalPath(spec: string, importerFile: string,
|
|
|
122
580
|
* specifiers resolve through `$lib` → `src/lib` only.
|
|
123
581
|
*/
|
|
124
582
|
export declare function collectKitModuleFacts(rt: Runtime, cwd: string, aliases?: readonly KitAlias[]): Promise<KitModuleFacts[]>;
|
|
125
|
-
//#endregion
|
|
126
|
-
//#region src/vite-config-parse.d.ts
|
|
127
583
|
/**
|
|
128
584
|
* The `build: { minify: false }` override, when present as a literal: returns the
|
|
129
585
|
* `minify` property's 1-based line in the ORIGINAL source. Undefined for clean,
|
|
@@ -132,8 +588,6 @@ export declare function collectKitModuleFacts(rt: Runtime, cwd: string, aliases?
|
|
|
132
588
|
export declare function findMinifyDisabled(source: string): {
|
|
133
589
|
line: number;
|
|
134
590
|
} | undefined;
|
|
135
|
-
//#endregion
|
|
136
|
-
//#region src/svelte-config-parse.d.ts
|
|
137
591
|
/**
|
|
138
592
|
* The project's compiled alias list, following SvelteKit's config precedence: options passed to
|
|
139
593
|
* the `sveltekit()` Vite plugin make `svelte.config` irrelevant (Kit logs "svelte.config.js is
|
|
@@ -155,6 +609,8 @@ export declare function resolveKitAliases(viteConfig: {
|
|
|
155
609
|
* which leaves the specifier unresolved as before.
|
|
156
610
|
*/
|
|
157
611
|
export declare function withPackageImports(aliases: KitAlias[] | undefined, packageJsonSource: string | undefined): KitAlias[] | undefined;
|
|
612
|
+
/** Whether `kit.router.type` is the literal `'hash'` in a config whose value is known. */
|
|
613
|
+
export declare function findKitHashRouterInSvelteConfig(source: string): boolean;
|
|
158
614
|
/**
|
|
159
615
|
* The project's effective `kit.paths.base`, following SvelteKit's precedence: the `sveltekit()`
|
|
160
616
|
* plugin config when it carries one, otherwise `svelte.config`. `file` is the config the base
|
|
@@ -170,8 +626,6 @@ export declare function resolveKitPathsBase(viteConfig: {
|
|
|
170
626
|
value?: string;
|
|
171
627
|
file: string;
|
|
172
628
|
} | undefined;
|
|
173
|
-
//#endregion
|
|
174
|
-
//#region src/workspace-packages.d.ts
|
|
175
629
|
/** A package the app declares, from its repository or its `node_modules`: `dir` is relative to the app. */
|
|
176
630
|
interface WorkspacePackage {
|
|
177
631
|
name: string;
|
|
@@ -208,8 +662,6 @@ export declare function declaredInstalledPackages(packageJsonSource: string | un
|
|
|
208
662
|
* publish no Svelte marker get no entries: nothing they export is a component.
|
|
209
663
|
*/
|
|
210
664
|
export declare function withInstalledPackages(aliases: KitAlias[] | undefined, packages: readonly WorkspacePackage[]): KitAlias[] | undefined;
|
|
211
|
-
//#endregion
|
|
212
|
-
//#region src/svelte-ast.d.ts
|
|
213
665
|
/**
|
|
214
666
|
* Parse a `.svelte` source, tolerating style blocks written in a CSS dialect.
|
|
215
667
|
*
|
|
@@ -222,7 +674,7 @@ export declare function withInstalledPackages(aliases: KitAlias[] | undefined, p
|
|
|
222
674
|
* the text scan's imprecision cannot reach it. A file that does not parse is already a hard failure,
|
|
223
675
|
* which the retry can only improve on.
|
|
224
676
|
*/
|
|
225
|
-
export declare function parseSvelte(
|
|
677
|
+
export declare function parseSvelte(raw: string, filename: string): AST.Root;
|
|
226
678
|
/** A template fragment's child node relevant to value classification: literal text or a `{expr}`. */
|
|
227
679
|
type TextOrExpr = AST.Text | AST.ExpressionTag;
|
|
228
680
|
/**
|
|
@@ -253,8 +705,6 @@ export declare function findAttr(attributes: AST.Attribute[], name: string): AST
|
|
|
253
705
|
export declare function attrValueOf(attr: AST.Attribute): Value;
|
|
254
706
|
/** Literal static text of a single attribute node (e.g. a component prop), or undefined if dynamic/absent. */
|
|
255
707
|
export declare function attrTextOf(attr: AST.Attribute): string | undefined;
|
|
256
|
-
//#endregion
|
|
257
|
-
//#region src/project-paths.d.ts
|
|
258
708
|
/**
|
|
259
709
|
* Source-file locations that satisfy the project-scope rules, shared by every
|
|
260
710
|
* mode so the static (CLI) and rendered (plugin) collectors never drift. This
|
|
@@ -265,15 +715,16 @@ export declare const ROBOTS_SOURCE_PATHS: readonly ["static/robots.txt", "src/ro
|
|
|
265
715
|
/** Locations that satisfy the sitemap.xml project rule (seo/sitemap-xml). */
|
|
266
716
|
export declare const SITEMAP_SOURCE_PATHS: readonly ["static/sitemap.xml", "src/routes/sitemap.xml/+server.ts", "src/routes/sitemap.xml/+server.js"];
|
|
267
717
|
/** The `+server` endpoints above, wherever (group) directories nest them — filter with `servesRootFile`. */
|
|
268
|
-
export declare const ROOT_FILE_ENDPOINT_GLOB = "src/routes/**/{robots.txt,sitemap
|
|
269
|
-
/**
|
|
718
|
+
export declare const ROOT_FILE_ENDPOINT_GLOB = "src/routes/**/{robots.txt,sitemap*.xml}/+server.{ts,js}";
|
|
719
|
+
/**
|
|
720
|
+
* Whether a `+server` endpoint serves `/<file>`: (group) directories add no URL segment, and an optional
|
|
721
|
+
* parameter in the name (`sitemap[[page]].xml`) still answers the bare name.
|
|
722
|
+
*/
|
|
270
723
|
export declare function servesRootFile(rel: string, file: 'robots.txt' | 'sitemap.xml'): boolean;
|
|
271
724
|
/** Vite's own config resolution order — only the first existing file is the one Vite loads. */
|
|
272
725
|
export declare const VITE_CONFIG_FILES: readonly ["vite.config.js", "vite.config.mjs", "vite.config.ts", "vite.config.cjs", "vite.config.mts", "vite.config.cts"];
|
|
273
726
|
/** SvelteKit's config resolution order (`@sveltejs/kit` checks js before ts). */
|
|
274
727
|
export declare const SVELTE_CONFIG_FILES: readonly ["svelte.config.js", "svelte.config.ts"];
|
|
275
|
-
//#endregion
|
|
276
|
-
//#region src/engine.d.ts
|
|
277
728
|
interface FailedRule {
|
|
278
729
|
id: string;
|
|
279
730
|
message: string;
|
|
@@ -305,55 +756,25 @@ export declare function runAnalysis(rules: Rule[], ctx: RuleContext, directives:
|
|
|
305
756
|
failedRuleIds: string[];
|
|
306
757
|
scoringConfig: Config;
|
|
307
758
|
}>;
|
|
308
|
-
//#endregion
|
|
309
|
-
//#region src/rules/seo/title-presence.d.ts
|
|
310
759
|
/**
|
|
311
760
|
* seo/title-presence — every route should resolve a non-empty <title> (design §11).
|
|
312
761
|
* A dynamic title (`{data.title}`) is the most common correct pattern and must
|
|
313
762
|
* never be flagged as missing; it surfaces as value 'dynamic' (design §4).
|
|
314
763
|
*/
|
|
315
764
|
export declare const seoTitlePresence: Rule;
|
|
316
|
-
//#endregion
|
|
317
|
-
//#region src/rules/seo/description-presence.d.ts
|
|
318
765
|
export declare const seoDescriptionPresence: Rule;
|
|
319
|
-
//#endregion
|
|
320
|
-
//#region src/rules/seo/canonical-url.d.ts
|
|
321
766
|
export declare const seoCanonicalUrl: Rule;
|
|
322
|
-
//#endregion
|
|
323
|
-
//#region src/rules/seo/og-image.d.ts
|
|
324
767
|
export declare const seoOgImage: Rule;
|
|
325
|
-
//#endregion
|
|
326
|
-
//#region src/rules/seo/og-title.d.ts
|
|
327
768
|
export declare const seoOgTitle: Rule;
|
|
328
|
-
//#endregion
|
|
329
|
-
//#region src/rules/seo/json-ld.d.ts
|
|
330
769
|
export declare const seoJsonLd: Rule;
|
|
331
|
-
//#endregion
|
|
332
|
-
//#region src/rules/seo/robots-txt.d.ts
|
|
333
770
|
export declare const seoRobotsTxt: Rule;
|
|
334
|
-
//#endregion
|
|
335
|
-
//#region src/rules/seo/sitemap-xml.d.ts
|
|
336
771
|
export declare const seoSitemapXml: Rule;
|
|
337
|
-
//#endregion
|
|
338
|
-
//#region src/rules/seo/html-lang.d.ts
|
|
339
772
|
export declare const seoHtmlLang: Rule;
|
|
340
|
-
//#endregion
|
|
341
|
-
//#region src/rules/perf/image-dimensions.d.ts
|
|
342
773
|
export declare const performanceImageDimensions: Rule;
|
|
343
|
-
//#endregion
|
|
344
|
-
//#region src/rules/perf/image-loading-hint.d.ts
|
|
345
774
|
export declare const performanceImageLoadingHint: Rule;
|
|
346
|
-
//#endregion
|
|
347
|
-
//#region src/rules/perf/responsive-image.d.ts
|
|
348
775
|
export declare const performanceResponsiveImage: Rule;
|
|
349
|
-
//#endregion
|
|
350
|
-
//#region src/rules/perf/preload-missing-as.d.ts
|
|
351
776
|
export declare const performancePreloadMissingAs: Rule;
|
|
352
|
-
//#endregion
|
|
353
|
-
//#region src/rules/perf/font-preload-crossorigin.d.ts
|
|
354
777
|
export declare const performanceFontPreloadCrossorigin: Rule;
|
|
355
|
-
//#endregion
|
|
356
|
-
//#region src/rules/perf/lcp-image.d.ts
|
|
357
778
|
/**
|
|
358
779
|
* performance/lcp-image — LCP image not lazy-loaded. Lazy-loading the largest contentful paint
|
|
359
780
|
* image delays it. Analysis approximates the LCP as the first <img> in document
|
|
@@ -361,8 +782,6 @@ export declare const performanceFontPreloadCrossorigin: Rule;
|
|
|
361
782
|
* static (CLI) and rendered (vite) mode, since both providers collect <img>.
|
|
362
783
|
*/
|
|
363
784
|
export declare const performanceLcpImage: Rule;
|
|
364
|
-
//#endregion
|
|
365
|
-
//#region src/rules/perf/render-blocking-script.d.ts
|
|
366
785
|
/**
|
|
367
786
|
* performance/render-blocking-script — Render-blocking <script> in <head>. A <script src> without
|
|
368
787
|
* defer/async/type=module blocks the parser. SvelteKit's own scripts are
|
|
@@ -371,8 +790,6 @@ export declare const performanceLcpImage: Rule;
|
|
|
371
790
|
* emits nothing (no signal), like the image rules.
|
|
372
791
|
*/
|
|
373
792
|
export declare const performanceRenderBlockingScript: Rule;
|
|
374
|
-
//#endregion
|
|
375
|
-
//#region src/rules/perf/preconnect.d.ts
|
|
376
793
|
/**
|
|
377
794
|
* performance/preconnect — Preconnect for third-party origins. A resource from a well-known
|
|
378
795
|
* third-party origin (e.g. Google Fonts) without a preconnect/dns-prefetch pays a
|
|
@@ -380,58 +797,26 @@ export declare const performanceRenderBlockingScript: Rule;
|
|
|
380
797
|
* allowlist are checked; routes referencing none emit nothing.
|
|
381
798
|
*/
|
|
382
799
|
export declare const performancePreconnect: Rule;
|
|
383
|
-
//#endregion
|
|
384
|
-
//#region src/rules/seo/indexability.d.ts
|
|
385
800
|
export declare const seoIndexability: Rule;
|
|
386
|
-
//#endregion
|
|
387
|
-
//#region src/rules/seo/twitter-card.d.ts
|
|
388
801
|
export declare const seoTwitterCard: Rule;
|
|
389
|
-
//#endregion
|
|
390
|
-
//#region src/rules/seo/og-description.d.ts
|
|
391
802
|
export declare const seoOgDescription: Rule;
|
|
392
|
-
//#endregion
|
|
393
|
-
//#region src/rules/seo/og-url.d.ts
|
|
394
803
|
export declare const seoOgUrl: Rule;
|
|
395
|
-
//#endregion
|
|
396
|
-
//#region src/rules/seo/viewport.d.ts
|
|
397
804
|
export declare const seoViewport: Rule;
|
|
398
|
-
//#endregion
|
|
399
|
-
//#region src/rules/seo/sitemap-in-robots.d.ts
|
|
400
805
|
export declare const seoSitemapInRobots: Rule;
|
|
401
|
-
//#endregion
|
|
402
|
-
//#region src/rules/seo/json-ld-validity.d.ts
|
|
403
806
|
export declare const seoJsonLdValidity: Rule;
|
|
404
|
-
//#endregion
|
|
405
|
-
//#region src/rules/seo/json-ld-deprecated-type.d.ts
|
|
406
807
|
export declare const seoJsonLdDeprecatedType: Rule;
|
|
407
|
-
//#endregion
|
|
408
|
-
//#region src/rules/seo/json-ld-relative-url.d.ts
|
|
409
808
|
export declare const seoJsonLdRelativeUrl: Rule;
|
|
410
|
-
//#endregion
|
|
411
|
-
//#region src/rules/seo/json-ld-date-format.d.ts
|
|
412
809
|
export declare const seoJsonLdDateFormat: Rule;
|
|
413
|
-
//#endregion
|
|
414
|
-
//#region src/rules/seo/json-ld-placeholder.d.ts
|
|
415
810
|
export declare const seoJsonLdPlaceholder: Rule;
|
|
416
|
-
//#endregion
|
|
417
|
-
//#region src/rules/seo/json-ld-required-props.d.ts
|
|
418
811
|
export declare const seoJsonLdRequiredProps: Rule;
|
|
419
|
-
//#endregion
|
|
420
|
-
//#region src/rules/seo/title-length.d.ts
|
|
421
812
|
export declare const seoTitleLength: Rule;
|
|
422
|
-
//#endregion
|
|
423
|
-
//#region src/rules/seo/description-length.d.ts
|
|
424
813
|
export declare const seoDescriptionLength: Rule;
|
|
425
|
-
//#endregion
|
|
426
|
-
//#region src/rules/seo/charset.d.ts
|
|
427
814
|
/**
|
|
428
815
|
* seo/charset — Character encoding. The charset meta lives in `src/app.html`, so it is
|
|
429
816
|
* only visible to rendered analysis (`appliesTo: rendered`), exactly like seo/viewport
|
|
430
817
|
* (viewport). Static route analysis emits nothing instead of false-flagging it.
|
|
431
818
|
*/
|
|
432
819
|
export declare const seoCharset: Rule;
|
|
433
|
-
//#endregion
|
|
434
|
-
//#region src/rules/seo/image-alt.d.ts
|
|
435
820
|
/**
|
|
436
821
|
* seo/image-alt — Image alt text. Reuses the <img> collection from both providers — the
|
|
437
822
|
* static (CLI) source parser and the rendered (vite) HTML parser — like performance/image-dimensions, performance/image-loading-hint.
|
|
@@ -439,8 +824,6 @@ export declare const seoCharset: Rule;
|
|
|
439
824
|
* passes; a spread `{...rest}` may supply alt, so it is not flagged.
|
|
440
825
|
*/
|
|
441
826
|
export declare const seoImageAlt: Rule;
|
|
442
|
-
//#endregion
|
|
443
|
-
//#region src/rules/seo/hreflang.d.ts
|
|
444
827
|
/**
|
|
445
828
|
* seo/hreflang — hreflang / x-default validity. Opt-in: a route with no
|
|
446
829
|
* `<link rel="alternate" hreflang>` emits nothing (monolingual sites are never
|
|
@@ -448,17 +831,9 @@ export declare const seoImageAlt: Rule;
|
|
|
448
831
|
* two or more must declare an x-default. Works in both modes.
|
|
449
832
|
*/
|
|
450
833
|
export declare const seoHreflang: Rule;
|
|
451
|
-
//#endregion
|
|
452
|
-
//#region src/rules/seo/single-h1.d.ts
|
|
453
834
|
export declare const seoSingleH1: Rule;
|
|
454
|
-
//#endregion
|
|
455
|
-
//#region src/rules/seo/duplicate-title.d.ts
|
|
456
835
|
export declare const seoDuplicateTitle: Rule;
|
|
457
|
-
//#endregion
|
|
458
|
-
//#region src/rules/seo/duplicate-description.d.ts
|
|
459
836
|
export declare const seoDuplicateDescription: Rule;
|
|
460
|
-
//#endregion
|
|
461
|
-
//#region src/rules/seo/heading-level-skip.d.ts
|
|
462
837
|
/**
|
|
463
838
|
* seo/heading-level-skip — Skipped heading level. Walking a route's body headings in
|
|
464
839
|
* document order, a level that jumps more than +1 over the previous heading (e.g.
|
|
@@ -466,26 +841,12 @@ export declare const seoDuplicateDescription: Rule;
|
|
|
466
841
|
* <h1> stays seo/single-h1's concern). A route with no headings emits nothing.
|
|
467
842
|
*/
|
|
468
843
|
export declare const seoHeadingLevelSkip: Rule;
|
|
469
|
-
//#endregion
|
|
470
|
-
//#region src/rules/seo/ssr-disabled.d.ts
|
|
471
844
|
export declare const seoSsrDisabled: Rule;
|
|
472
|
-
//#endregion
|
|
473
|
-
//#region src/rules/correctness/each-key.d.ts
|
|
474
845
|
export declare const correctnessEachKey: Rule;
|
|
475
|
-
//#endregion
|
|
476
|
-
//#region src/rules/correctness/each-index-key.d.ts
|
|
477
846
|
export declare const correctnessEachIndexKey: Rule;
|
|
478
|
-
//#endregion
|
|
479
|
-
//#region src/rules/correctness/effect-as-derived.d.ts
|
|
480
847
|
export declare const correctnessEffectAsDerived: Rule;
|
|
481
|
-
//#endregion
|
|
482
|
-
//#region src/rules/correctness/effect-as-onmount.d.ts
|
|
483
848
|
export declare const correctnessEffectAsOnMount: Rule;
|
|
484
|
-
//#endregion
|
|
485
|
-
//#region src/rules/correctness/unmutated-state.d.ts
|
|
486
849
|
export declare const correctnessUnmutatedState: Rule;
|
|
487
|
-
//#endregion
|
|
488
|
-
//#region src/rules/correctness/prop-mutation.d.ts
|
|
489
850
|
/**
|
|
490
851
|
* correctness/prop-mutation — mutating a prop directly is a silent bug in both Svelte modes,
|
|
491
852
|
* for different reasons: in runes mode, a non-$bindable prop mutation doesn't propagate to the
|
|
@@ -495,8 +856,6 @@ export declare const correctnessUnmutatedState: Rule;
|
|
|
495
856
|
* exactly one or the other — see `legacy` on `ComponentFacts.mutatedProps` (component-parse.ts).
|
|
496
857
|
*/
|
|
497
858
|
export declare const correctnessPropMutation: Rule;
|
|
498
|
-
//#endregion
|
|
499
|
-
//#region src/rules/correctness/stale-prop-derivation.d.ts
|
|
500
859
|
/**
|
|
501
860
|
* correctness/stale-prop-derivation — a value computed from a prop without $derived (runes
|
|
502
861
|
* mode) or $: (legacy mode) is evaluated once, at init, and silently stops tracking the
|
|
@@ -505,8 +864,6 @@ export declare const correctnessPropMutation: Rule;
|
|
|
505
864
|
* `legacy` on `ComponentFacts.stalePropDerivations` (component-parse.ts).
|
|
506
865
|
*/
|
|
507
866
|
export declare const correctnessStalePropDerivation: Rule;
|
|
508
|
-
//#endregion
|
|
509
|
-
//#region src/rules/correctness/nonreactive-builtin-state.d.ts
|
|
510
867
|
/**
|
|
511
868
|
* correctness/nonreactive-builtin-state — $state's deep proxy covers plain
|
|
512
869
|
* objects and arrays only. A plain Map/Set/Date/URL/URLSearchParams in $state
|
|
@@ -515,8 +872,6 @@ export declare const correctnessStalePropDerivation: Rule;
|
|
|
515
872
|
* drop-in reactive equivalents for exactly this.
|
|
516
873
|
*/
|
|
517
874
|
export declare const correctnessNonreactiveBuiltinState: Rule;
|
|
518
|
-
//#endregion
|
|
519
|
-
//#region src/rules/correctness/checkable-bind-value.d.ts
|
|
520
875
|
/**
|
|
521
876
|
* correctness/checkable-bind-value — bind:value binds the DOM value property. A
|
|
522
877
|
* checkbox/radio's user interaction toggles checkedness, which bind:value never observes. A
|
|
@@ -526,8 +881,6 @@ export declare const correctnessNonreactiveBuiltinState: Rule;
|
|
|
526
881
|
* bindings.
|
|
527
882
|
*/
|
|
528
883
|
export declare const correctnessCheckableBindValue: Rule;
|
|
529
|
-
//#endregion
|
|
530
|
-
//#region src/rules/correctness/autoplay-muted.d.ts
|
|
531
884
|
/**
|
|
532
885
|
* correctness/autoplay-muted — Chrome and Safari block autoplay with audio, and a blocked
|
|
533
886
|
* `<video autoplay>` does not error: it silently never starts. The author sees it work in dev
|
|
@@ -537,11 +890,7 @@ export declare const correctnessCheckableBindValue: Rule;
|
|
|
537
890
|
* and only a literal `autoplay` counts.
|
|
538
891
|
*/
|
|
539
892
|
export declare const correctnessAutoplayMuted: Rule;
|
|
540
|
-
//#endregion
|
|
541
|
-
//#region src/rules/correctness/orphan-effect.d.ts
|
|
542
893
|
export declare const correctnessOrphanEffect: Rule;
|
|
543
|
-
//#endregion
|
|
544
|
-
//#region src/rules/correctness/orphan-lifecycle.d.ts
|
|
545
894
|
/**
|
|
546
895
|
* correctness/orphan-lifecycle — svelte lifecycle/context calls guaranteed to run outside component
|
|
547
896
|
* initialisation: module scope in runes modules / `<script module>`, the constructor of
|
|
@@ -549,8 +898,6 @@ export declare const correctnessOrphanEffect: Rule;
|
|
|
549
898
|
* because the facts live on BOTH the component channel and the Kit-module channel.
|
|
550
899
|
*/
|
|
551
900
|
export declare const correctnessOrphanLifecycle: Rule;
|
|
552
|
-
//#endregion
|
|
553
|
-
//#region src/rules/correctness/base-path-navigation.d.ts
|
|
554
901
|
/**
|
|
555
902
|
* correctness/base-path-navigation — root-relative navigation literals in a project that sets
|
|
556
903
|
* `kit.paths.base`. A custom check because it is gated on a PROJECT fact and its own facts live
|
|
@@ -558,8 +905,6 @@ export declare const correctnessOrphanLifecycle: Rule;
|
|
|
558
905
|
* With no base path configured the rule emits nothing at all — the gate is the whole point.
|
|
559
906
|
*/
|
|
560
907
|
export declare const correctnessBasePathNavigation: Rule;
|
|
561
|
-
//#endregion
|
|
562
|
-
//#region src/rules/correctness/server-browser-global.d.ts
|
|
563
908
|
/**
|
|
564
909
|
* correctness/server-browser-global — browser globals read in server-executed MODULE code: module scope of
|
|
565
910
|
* runes modules / `<script module>`, and Kit route/hooks files (top level, handler
|
|
@@ -568,32 +913,14 @@ export declare const correctnessBasePathNavigation: Rule;
|
|
|
568
913
|
* (warning) territory. A custom check because the facts live on both channels.
|
|
569
914
|
*/
|
|
570
915
|
export declare const correctnessServerBrowserGlobal: Rule;
|
|
571
|
-
//#endregion
|
|
572
|
-
//#region src/rules/correctness/instance-browser-global.d.ts
|
|
573
916
|
export declare const correctnessInstanceBrowserGlobal: Rule;
|
|
574
|
-
//#endregion
|
|
575
|
-
//#region src/rules/security/raw-html.d.ts
|
|
576
917
|
export declare const securityRawHtml: Rule;
|
|
577
|
-
//#endregion
|
|
578
|
-
//#region src/rules/security/javascript-url.d.ts
|
|
579
918
|
export declare const securityJavascriptUrl: Rule;
|
|
580
|
-
//#endregion
|
|
581
|
-
//#region src/rules/security/handler-state-write.d.ts
|
|
582
919
|
export declare const securityHandlerStateWrite: Rule;
|
|
583
|
-
//#endregion
|
|
584
|
-
//#region src/rules/security/server-module-state.d.ts
|
|
585
920
|
export declare const securityServerModuleState: Rule;
|
|
586
|
-
//#endregion
|
|
587
|
-
//#region src/rules/security/shared-state-import.d.ts
|
|
588
921
|
export declare const securitySharedStateImport: Rule;
|
|
589
|
-
//#endregion
|
|
590
|
-
//#region src/rules/architecture/component-size.d.ts
|
|
591
922
|
export declare const architectureComponentSize: Rule;
|
|
592
|
-
//#endregion
|
|
593
|
-
//#region src/rules/architecture/prop-count.d.ts
|
|
594
923
|
export declare const architecturePropCount: Rule;
|
|
595
|
-
//#endregion
|
|
596
|
-
//#region src/rules/architecture/private-scope-import.d.ts
|
|
597
924
|
/**
|
|
598
925
|
* architecture/private-scope-import — a unit inside a declared private scope must not be
|
|
599
926
|
* imported from outside that scope (design 2026-07-28). L3: the scopes are declared by the
|
|
@@ -603,8 +930,6 @@ export declare const architecturePropCount: Rule;
|
|
|
603
930
|
* results to the files that changed, and the author of the violation edited the importer.
|
|
604
931
|
*/
|
|
605
932
|
export declare const architecturePrivateScopeImport: Rule;
|
|
606
|
-
//#endregion
|
|
607
|
-
//#region src/rules/architecture/unit-entry-file.d.ts
|
|
608
933
|
/**
|
|
609
934
|
* architecture/unit-entry-file — a directory declared to be a unit must contain a file named
|
|
610
935
|
* after it (design 2026-07-28). L3: the declarations come from the project's own `units`,
|
|
@@ -615,8 +940,6 @@ export declare const architecturePrivateScopeImport: Rule;
|
|
|
615
940
|
* the directory, because `filterToChangedFiles` keeps only locations git lists as changed.
|
|
616
941
|
*/
|
|
617
942
|
export declare const architectureUnitEntryFile: Rule;
|
|
618
|
-
//#endregion
|
|
619
|
-
//#region src/rules/architecture/directory-naming.d.ts
|
|
620
943
|
/**
|
|
621
944
|
* architecture/directory-naming — a directory must be named in the casing its location declares
|
|
622
945
|
* (design 2026-07-29). L3: the declarations come from the project's own `directories` and `exclude`
|
|
@@ -632,8 +955,6 @@ export declare const architectureUnitEntryFile: Rule;
|
|
|
632
955
|
* hundreds of 100s from one `'src/routes/**'` declaration and dilute every real finding.
|
|
633
956
|
*/
|
|
634
957
|
export declare const architectureDirectoryNaming: Rule;
|
|
635
|
-
//#endregion
|
|
636
|
-
//#region src/rules/architecture/reserved-directory-names.d.ts
|
|
637
958
|
/**
|
|
638
959
|
* architecture/reserved-directory-names — a directory's immediate subdirectories may only take names
|
|
639
960
|
* the project declared for that position (design 2026-07-29, extended 2026-08-08 for lowercase units —
|
|
@@ -655,8 +976,6 @@ export declare const architectureDirectoryNaming: Rule;
|
|
|
655
976
|
* hundreds of 100s from one broad declaration and dilute every real finding.
|
|
656
977
|
*/
|
|
657
978
|
export declare const architectureReservedDirectoryNames: Rule;
|
|
658
|
-
//#endregion
|
|
659
|
-
//#region src/rules/architecture/reserved-name-placement.d.ts
|
|
660
979
|
/**
|
|
661
980
|
* architecture/reserved-name-placement — a reserved directory name may appear only in the places
|
|
662
981
|
* declared for it (design 2026-08-06). L3: inert until a placement is declared.
|
|
@@ -674,20 +993,10 @@ export declare const architectureReservedDirectoryNames: Rule;
|
|
|
674
993
|
* `route` at 100 and averages, and a directory has no pre-existing score key.
|
|
675
994
|
*/
|
|
676
995
|
export declare const architectureReservedNamePlacement: Rule;
|
|
677
|
-
//#endregion
|
|
678
|
-
//#region src/rules/architecture/route-component-import.d.ts
|
|
679
996
|
export declare const architectureRouteComponentImport: Rule;
|
|
680
|
-
//#endregion
|
|
681
|
-
//#region src/rules/architecture/doc-link-target.d.ts
|
|
682
997
|
export declare const architectureDocLinkTarget: Rule;
|
|
683
|
-
//#endregion
|
|
684
|
-
//#region src/rules/perf/heavy-import.d.ts
|
|
685
998
|
export declare const performanceHeavyImport: Rule;
|
|
686
|
-
//#endregion
|
|
687
|
-
//#region src/rules/perf/namespace-import.d.ts
|
|
688
999
|
export declare const performanceNamespaceImport: Rule;
|
|
689
|
-
//#endregion
|
|
690
|
-
//#region src/rules/perf/minify-disabled.d.ts
|
|
691
1000
|
/**
|
|
692
1001
|
* performance/minify-disabled — a `build.minify: false` left in vite.config ships unminified JS/CSS
|
|
693
1002
|
* to production. Project-scope: the fact is produced by the CLI's static parse
|
|
@@ -695,25 +1004,19 @@ export declare const performanceNamespaceImport: Rule;
|
|
|
695
1004
|
* (exact). Emits a finding only when the fact is set — no pass result.
|
|
696
1005
|
*/
|
|
697
1006
|
export declare const performanceMinifyDisabled: Rule;
|
|
698
|
-
//#endregion
|
|
699
|
-
//#region src/rules/perf/load-waterfall.d.ts
|
|
700
1007
|
/**
|
|
701
1008
|
* performance/load-waterfall — dependent await chains in universal loads. Server loads are exempt:
|
|
702
1009
|
* a dependent chain cannot be parallelized, and on the server there is no better
|
|
703
|
-
* placement to suggest. csr = false
|
|
704
|
-
* runtime the universal load only runs during SSR.
|
|
1010
|
+
* placement to suggest. Loads on a route with `csr = false` (its own or a layout's) are exempt
|
|
1011
|
+
* too — without a client runtime the universal load only runs during SSR.
|
|
705
1012
|
*/
|
|
706
1013
|
export declare const performanceLoadWaterfall: Rule;
|
|
707
|
-
//#endregion
|
|
708
|
-
//#region src/rules/perf/sequential-awaits.d.ts
|
|
709
1014
|
/**
|
|
710
1015
|
* performance/sequential-awaits — independent sequential awaits in any load. Info severity: static
|
|
711
1016
|
* data flow cannot see side-effect ordering (e.g. a setup call an API relies
|
|
712
1017
|
* on), so the parallelize suggestion stays advisory.
|
|
713
1018
|
*/
|
|
714
1019
|
export declare const performanceSequentialAwaits: Rule;
|
|
715
|
-
//#endregion
|
|
716
|
-
//#region src/rules/perf/state-raw.d.ts
|
|
717
1020
|
/**
|
|
718
1021
|
* performance/state-raw — deep $state proxies every property access; a binding
|
|
719
1022
|
* that is only ever reassigned never uses that machinery. Svelte's guidance:
|
|
@@ -722,46 +1025,20 @@ export declare const performanceSequentialAwaits: Rule;
|
|
|
722
1025
|
* the proxy condition.
|
|
723
1026
|
*/
|
|
724
1027
|
export declare const performanceStateRaw: Rule;
|
|
725
|
-
//#endregion
|
|
726
|
-
//#region src/rules/perf/iframe-loading.d.ts
|
|
727
1028
|
/** Any literal `loading` value passes (the author made a choice); an expression value is
|
|
728
1029
|
* unknowable and passes; a spread could supply `loading` and passes. */
|
|
729
1030
|
export declare const performanceIframeLoading: Rule;
|
|
730
|
-
//#endregion
|
|
731
|
-
//#region src/rules/a11y/invalid-role.d.ts
|
|
732
1031
|
export declare const a11yInvalidRole: Rule;
|
|
733
|
-
//#endregion
|
|
734
|
-
//#region src/rules/a11y/unknown-aria-attribute.d.ts
|
|
735
1032
|
export declare const a11yUnknownAriaAttribute: Rule;
|
|
736
|
-
//#endregion
|
|
737
|
-
//#region src/rules/a11y/required-aria-props.d.ts
|
|
738
1033
|
export declare const a11yRequiredAriaProps: Rule;
|
|
739
|
-
//#endregion
|
|
740
|
-
//#region src/rules/a11y/invalid-aria-value.d.ts
|
|
741
1034
|
export declare const a11yInvalidAriaValue: Rule;
|
|
742
|
-
//#endregion
|
|
743
|
-
//#region src/rules/a11y/interactive-nesting.d.ts
|
|
744
1035
|
export declare const a11yInteractiveNesting: Rule;
|
|
745
|
-
//#endregion
|
|
746
|
-
//#region src/rules/a11y/aria-hidden-focus.d.ts
|
|
747
1036
|
export declare const a11yAriaHiddenFocus: Rule;
|
|
748
|
-
//#endregion
|
|
749
|
-
//#region src/rules/a11y/accessible-name.d.ts
|
|
750
1037
|
export declare const a11yAccessibleName: Rule;
|
|
751
|
-
//#endregion
|
|
752
|
-
//#region src/rules/a11y/label-has-control.d.ts
|
|
753
1038
|
export declare const a11yLabelHasControl: Rule;
|
|
754
|
-
//#endregion
|
|
755
|
-
//#region src/rules/a11y/use-list.d.ts
|
|
756
1039
|
export declare const a11yUseList: Rule;
|
|
757
|
-
//#endregion
|
|
758
|
-
//#region src/rules/a11y/placeholder-label-option.d.ts
|
|
759
1040
|
export declare const a11yPlaceholderLabelOption: Rule;
|
|
760
|
-
//#endregion
|
|
761
|
-
//#region src/rules/a11y/require-datetime.d.ts
|
|
762
1041
|
export declare const a11yRequireDatetime: Rule;
|
|
763
|
-
//#endregion
|
|
764
|
-
//#region src/rules/a11y/positive-tabindex.d.ts
|
|
765
1042
|
/**
|
|
766
1043
|
* Literal values only — an expression-valued `tabindex` is unknowable and passes. The
|
|
767
1044
|
* Number()-based parse deliberately follows the Svelte compiler's a11y_positive_tabindex
|
|
@@ -772,8 +1049,6 @@ export declare const a11yRequireDatetime: Rule;
|
|
|
772
1049
|
* semantics.
|
|
773
1050
|
*/
|
|
774
1051
|
export declare const a11yPositiveTabindex: Rule;
|
|
775
|
-
//#endregion
|
|
776
|
-
//#region src/rules/a11y/no-accesskey.d.ts
|
|
777
1052
|
/**
|
|
778
1053
|
* a11y/no-accesskey — unlike most attribute rules, an expression-valued `accesskey` is reported
|
|
779
1054
|
* too: the attribute's presence is the problem and its value never matters, so there is nothing
|
|
@@ -782,8 +1057,6 @@ export declare const a11yPositiveTabindex: Rule;
|
|
|
782
1057
|
* presence wrong in both namespaces.
|
|
783
1058
|
*/
|
|
784
1059
|
export declare const a11yNoAccesskey: Rule;
|
|
785
|
-
//#endregion
|
|
786
|
-
//#region src/rules/a11y/no-autofocus.d.ts
|
|
787
1060
|
/**
|
|
788
1061
|
* a11y/no-autofocus — only a literal `autofocus` counts (a bare boolean attribute parses to
|
|
789
1062
|
* `value: ''`); an expression value could be `false` and passes as unknowable. The ancestor walk
|
|
@@ -795,37 +1068,19 @@ export declare const a11yNoAccesskey: Rule;
|
|
|
795
1068
|
* page-load focus semantics.
|
|
796
1069
|
*/
|
|
797
1070
|
export declare const a11yNoAutofocus: Rule;
|
|
798
|
-
//#endregion
|
|
799
|
-
//#region src/rules/a11y/no-duplicate-dt.d.ts
|
|
800
1071
|
/**
|
|
801
1072
|
* a11y/no-duplicate-dt — the candidate gathering (direct and div-wrapped `<dt>` children of a
|
|
802
1073
|
* `<dl>`, fully-static names only, whitespace-normalized, case-sensitive) lives in the
|
|
803
1074
|
* collector; see `collectDuplicateDts` in component-parse.ts for the exemption rationale.
|
|
804
1075
|
*/
|
|
805
1076
|
export declare const a11yNoDuplicateDt: Rule;
|
|
806
|
-
//#endregion
|
|
807
|
-
//#region src/rules/a11y/abbr-title.d.ts
|
|
808
1077
|
export declare const a11yAbbrTitle: Rule;
|
|
809
|
-
//#endregion
|
|
810
|
-
//#region src/rules/a11y/pattern-title.d.ts
|
|
811
1078
|
export declare const a11yPatternTitle: Rule;
|
|
812
|
-
//#endregion
|
|
813
|
-
//#region src/rules/a11y/deprecated-element.d.ts
|
|
814
1079
|
export declare const a11yDeprecatedElement: Rule;
|
|
815
|
-
//#endregion
|
|
816
|
-
//#region src/rules/a11y/deprecated-attr.d.ts
|
|
817
1080
|
export declare const a11yDeprecatedAttr: Rule;
|
|
818
|
-
//#endregion
|
|
819
|
-
//#region src/rules/a11y/disallowed-aria-props.d.ts
|
|
820
1081
|
export declare const a11yDisallowedAriaProps: Rule;
|
|
821
|
-
//#endregion
|
|
822
|
-
//#region src/rules/a11y/deprecated-aria.d.ts
|
|
823
1082
|
export declare const a11yDeprecatedAria: Rule;
|
|
824
|
-
//#endregion
|
|
825
|
-
//#region src/rules/a11y/disallowed-element.d.ts
|
|
826
1083
|
export declare const a11yDisallowedElement: Rule;
|
|
827
|
-
//#endregion
|
|
828
|
-
//#region src/rules/a11y/permitted-contents.d.ts
|
|
829
1084
|
/**
|
|
830
1085
|
* Content-model membership over the literal element tree
|
|
831
1086
|
* (design 2026-08-20-permitted-contents-rule-design.md; measured
|
|
@@ -833,8 +1088,6 @@ export declare const a11yDisallowedElement: Rule;
|
|
|
833
1088
|
* structure-bound children) is `warning`; category mismatches are `info`.
|
|
834
1089
|
*/
|
|
835
1090
|
export declare const a11yPermittedContents: Rule;
|
|
836
|
-
//#endregion
|
|
837
|
-
//#region src/rules/a11y/required-element.d.ts
|
|
838
1091
|
/**
|
|
839
1092
|
* a11y/required-element — every route must contain the elements the project declares (design
|
|
840
1093
|
* 2026-08-19-config-driven-element-rules). Judged on the composed route: the layout chain, the page,
|
|
@@ -847,11 +1100,7 @@ export declare const a11yPermittedContents: Rule;
|
|
|
847
1100
|
* declared tag with the world open emits nothing.
|
|
848
1101
|
*/
|
|
849
1102
|
export declare const a11yRequiredElement: Rule;
|
|
850
|
-
//#endregion
|
|
851
|
-
//#region src/rules/a11y/doctype.d.ts
|
|
852
1103
|
export declare const a11yDoctype: Rule;
|
|
853
|
-
//#endregion
|
|
854
|
-
//#region src/rules/a11y/duplicate-landmark.d.ts
|
|
855
1104
|
/**
|
|
856
1105
|
* a11y/duplicate-landmark — a composed route (layout chain + page) yields more than one
|
|
857
1106
|
* `main` / `banner` / `contentinfo` landmark. `ctx.a11y[].landmarks` already holds the
|
|
@@ -859,23 +1108,17 @@ export declare const a11yDoctype: Rule;
|
|
|
859
1108
|
* fixed KINDS order (it decides emission order and the PASS anchor).
|
|
860
1109
|
*/
|
|
861
1110
|
export declare const a11yDuplicateLandmark: Rule;
|
|
862
|
-
//#endregion
|
|
863
|
-
//#region src/rules/a11y/top-level-landmark.d.ts
|
|
864
1111
|
/**
|
|
865
1112
|
* a11y/top-level-landmark — a landmark (`main`/`banner`/`complementary`/`contentinfo`) that
|
|
866
1113
|
* composition places inside another landmark. `ctx.a11y[].nestedLandmarks` already carries one
|
|
867
1114
|
* entry per nested occurrence, so this rule only reports them.
|
|
868
1115
|
*/
|
|
869
1116
|
export declare const a11yTopLevelLandmark: Rule;
|
|
870
|
-
//#endregion
|
|
871
|
-
//#region src/rules/a11y/id-duplication.d.ts
|
|
872
1117
|
/**
|
|
873
1118
|
* a11y/id-duplication — a literal id repeated within a composed route. `ctx.a11y[].ids`
|
|
874
1119
|
* already holds the branch-aware-folded representatives per id, so this rule only counts them.
|
|
875
1120
|
*/
|
|
876
1121
|
export declare const a11yIdDuplication: Rule;
|
|
877
|
-
//#endregion
|
|
878
|
-
//#region src/rules/a11y/no-missing-id-ref.d.ts
|
|
879
1122
|
/**
|
|
880
1123
|
* a11y/no-missing-id-ref — an id-reference attribute (`IDREF_ATTRS`: HTML's `for`/`list`/`headers`/
|
|
881
1124
|
* `form`/the popover and command targets, and every ARIA id-reference property) or a same-page
|
|
@@ -883,11 +1126,7 @@ export declare const a11yIdDuplication: Rule;
|
|
|
883
1126
|
* runs only on routes `ctx.a11y[].fullyResolved` marks fully resolved — see the rule docs.
|
|
884
1127
|
*/
|
|
885
1128
|
export declare const a11yNoMissingIdRef: Rule;
|
|
886
|
-
//#endregion
|
|
887
|
-
//#region src/rules/a11y/unverified-id-ref.d.ts
|
|
888
1129
|
export declare const a11yUnverifiedIdRef: Rule;
|
|
889
|
-
//#endregion
|
|
890
|
-
//#region src/rules/index.d.ts
|
|
891
1130
|
export declare const allRules: Rule[];
|
|
892
1131
|
/** One configurable option of a rule, flattened for `svelte-vitals explain`'s output. */
|
|
893
1132
|
export interface RuleOptionInfo {
|
|
@@ -917,8 +1156,6 @@ export interface RuleInfo {
|
|
|
917
1156
|
}
|
|
918
1157
|
/** Look up a rule's static metadata, as `svelte-vitals explain` renders it (issue #24). Rule ids are matched exactly (case-sensitive, e.g. "seo/ssr-disabled"). */
|
|
919
1158
|
export declare function explainRule(id: string): RuleInfo | undefined;
|
|
920
|
-
//#endregion
|
|
921
|
-
//#region src/reporter/palette.d.ts
|
|
922
1159
|
/** String decorators for the console reporter. Injected so core stays pure/dep-free. */
|
|
923
1160
|
interface Palette {
|
|
924
1161
|
bold: (s: string) => string;
|
|
@@ -932,8 +1169,6 @@ interface Palette {
|
|
|
932
1169
|
export declare const noColorPalette: Palette;
|
|
933
1170
|
/** Green ≥ 90, yellow ≥ 70, red otherwise — for a 0–100 score. */
|
|
934
1171
|
export declare function scoreColor(p: Palette, score: number): (s: string) => string;
|
|
935
|
-
//#endregion
|
|
936
|
-
//#region src/reporter/console.d.ts
|
|
937
1172
|
interface ConsoleReportOptions {
|
|
938
1173
|
byRoute?: boolean;
|
|
939
1174
|
/** Mode label shown in the header (default 'static mode'). */
|
|
@@ -951,8 +1186,6 @@ interface ConsoleReportOptions {
|
|
|
951
1186
|
* set, adds a per-route score tree.
|
|
952
1187
|
*/
|
|
953
1188
|
export declare function formatConsoleReport(results: Result[], config: Config, options?: ConsoleReportOptions): string;
|
|
954
|
-
//#endregion
|
|
955
|
-
//#region src/reporter/sanitize.d.ts
|
|
956
1189
|
/**
|
|
957
1190
|
* Strip ANSI/OSC escape sequences and C0/C1 control characters (except `\n`/`\t`) from a
|
|
958
1191
|
* string before it reaches a terminal. POSIX file/route names can contain almost any
|
|
@@ -972,18 +1205,12 @@ export declare function formatConsoleReport(results: Result[], config: Config, o
|
|
|
972
1205
|
* concrete non-CSI/OSC sequence turns out to matter.
|
|
973
1206
|
*/
|
|
974
1207
|
export declare function terminalSafe(text: string): string;
|
|
975
|
-
//#endregion
|
|
976
|
-
//#region src/reporter/agent.d.ts
|
|
977
1208
|
/** Render failing findings as an agent-actionable Markdown remediation document (issue #18). */
|
|
978
1209
|
export declare function formatAgentReport(results: Result[], config: Config): string;
|
|
979
|
-
//#endregion
|
|
980
|
-
//#region src/reporter/sarif.d.ts
|
|
981
1210
|
/** Render penalized findings as a SARIF 2.1.0 log string (issue #18, design slice 5). */
|
|
982
1211
|
export declare function formatSarifReport(results: Result[], config: Config, meta: {
|
|
983
1212
|
version: string;
|
|
984
1213
|
}): string;
|
|
985
|
-
//#endregion
|
|
986
|
-
//#region src/reporter/app-shell.d.ts
|
|
987
1214
|
export declare function escapeHtml(s: string): string;
|
|
988
1215
|
/**
|
|
989
1216
|
* Return the URL only when it uses a safe http/https scheme, else null.
|
|
@@ -1036,5 +1263,4 @@ export declare function formatHtmlReport(results: Result[], config: Config, meta
|
|
|
1036
1263
|
version: string;
|
|
1037
1264
|
coreVersion?: string;
|
|
1038
1265
|
}): string;
|
|
1039
|
-
|
|
1040
|
-
export { type A11yOccurrenceInfo, type A11ySkipCause, ANCESTRY_DEPENDENT_TAGS, ASIDE_DEMOTING_TAGS, type AppSnapshot, type BranchStep, type Classification, type CompiledOverride, type ComponentFacts, type ConsoleReportOptions, type DirectiveIndex, type EachBlockFact, type EffectFact, type FailedRule, type HeadTag, type HeadingInfo, type HealthResult, IDREF_ATTRS, type ImageInfo, type KitAlias, type KitModuleFacts, type LandmarkInput, NAMING_ATTRS, type OrphanEffectFact, type Palette, type Project, type ResolvedA11y, type ResolvedHead, type ResolvedHeadings, type ResolvedImages, type RouteBadge, type Rule, type RuleContext, type RuleOptionSpec, type RuleOptionsSpec, type Runtime, SEARCH_RESULT_RULES, SECTIONING_TAGS, type Scope, type ScoreOptions, type ScoreResult, type SourceSpan, type SuppressionDirective, type WorkspacePackage, buildJsonReport, classify, collectComponentFacts, compileOverrides, computeHealth, computeScore, decodeFragmentId, defaultConfig, defaultProject, docsUrlFor, effectiveSeverity, emptyComponentFacts, foldOccurrences, formatFailedRuleWarning, formatGithubReport, formatJsonReport, formatMarkdownReport, hasFailureAtOrAbove, isClassicScriptType, isPenalized, isPlainObject, isSvgSrc, isTopFragment, resolveLandmark, resolveRuleOptions, routeNeverSsr, selectRules, settingSeverity, shouldSkipRangeCheck, skippedFileWarnings, splitTokens, stripTextDirective, summarize, validateRuleSetting, withFailedRulesOff, withIndexableOff, withReadLimit };
|
|
1266
|
+
export { type A11yOccurrenceInfo, type A11ySkipCause, ANCESTRY_DEPENDENT_TAGS, ASIDE_DEMOTING_TAGS, type AppSnapshot, type BranchStep, type Classification, type CompiledOverride, type ComponentFacts, type ConsoleReportOptions, type DirectiveIndex, type EachBlockFact, type EffectFact, type FailedRule, type HeadTag, type HeadingInfo, type HealthResult, IDREF_ATTRS, type ImageInfo, type KitAlias, type KitModuleFacts, type LandmarkInput, NAMING_ATTRS, type OrphanEffectFact, type Palette, type Project, type ResolvedA11y, type ResolvedHead, type ResolvedHeadings, type ResolvedImages, type RouteBadge, type Rule, type RuleContext, type RuleOptionSpec, type RuleOptionsSpec, type Runtime, SEARCH_RESULT_RULES, SECTIONING_TAGS, type Scope, type ScoreOptions, type ScoreResult, type SourceSpan, type SuppressionDirective, type WorkspacePackage, buildJsonReport, classify, collectComponentFacts, compileOverrides, computeHealth, computeScore, decodeFragmentId, defaultConfig, defaultProject, docsUrlFor, effectiveSeverity, emptyComponentFacts, foldOccurrences, formatFailedRuleWarning, formatGithubReport, formatJsonReport, formatJsonReportChunks, formatMarkdownReport, hasFailureAtOrAbove, hasRel, isClassicScriptType, isPenalized, isPlainObject, isSvgSrc, isTopFragment, layoutNeverRenders, pageRendersOnlyWhenBuilding, resolveLandmark, resolveRuleOptions, routeNeverSsr, selectRules, settingSeverity, shouldSkipRangeCheck, skippedFileWarnings, splitTokens, stripTextDirective, summarize, validateRuleSetting, withFailedRulesOff, withIndexableOff, withReadLimit };
|