1 | import { HTMLDataV1 } from "vscode-html-languageservice";
|
2 | import { LitDiagnosticSeverity } from "./types/lit-diagnostic.js";
|
3 | export type LitAnalyzerRuleSeverity = "on" | "off" | "warn" | "warning" | "error" | 0 | 1 | 2 | true | false;
|
4 | export type LitAnalyzerRuleId = "no-unknown-tag-name" | "no-missing-import" | "no-unclosed-tag" | "no-unknown-attribute" | "no-unknown-property" | "no-unknown-event" | "no-unknown-slot" | "no-unintended-mixed-binding" | "no-invalid-boolean-binding" | "no-expressionless-property-binding" | "no-noncallable-event-binding" | "no-boolean-in-attribute-binding" | "no-complex-attribute-binding" | "no-nullable-attribute-binding" | "no-incompatible-type-binding" | "no-invalid-directive-binding" | "no-incompatible-property-type" | "no-invalid-attribute-name" | "no-invalid-tag-name" | "no-invalid-css" | "no-property-visibility-mismatch" | "no-legacy-attribute" | "no-missing-element-type-definition";
|
5 | export type LitAnalyzerRules = Partial<Record<LitAnalyzerRuleId, LitAnalyzerRuleSeverity | [LitAnalyzerRuleSeverity]>>;
|
6 | export declare const ALL_RULE_IDS: LitAnalyzerRuleId[];
|
7 | export declare const RULE_ID_CODE_MAP: Record<LitAnalyzerRuleId, number>;
|
8 | export declare function ruleIdCode(ruleId: LitAnalyzerRuleId): number;
|
9 | export declare function ruleSeverity(rules: LitAnalyzerConfig | LitAnalyzerRules, ruleId: LitAnalyzerRuleId): LitAnalyzerRuleSeverity;
|
10 | export declare function isRuleDisabled(config: LitAnalyzerConfig, ruleId: LitAnalyzerRuleId): boolean;
|
11 | export declare function isRuleEnabled(config: LitAnalyzerConfig, ruleId: LitAnalyzerRuleId): boolean;
|
12 | export declare function litDiagnosticRuleSeverity(config: LitAnalyzerConfig, ruleId: LitAnalyzerRuleId): LitDiagnosticSeverity;
|
13 | export type LitAnalyzerLogging = "off" | "error" | "warn" | "debug" | "verbose";
|
14 | export type LitSecuritySystem = "off" | "ClosureSafeTypes";
|
15 | export interface LitAnalyzerConfig {
|
16 | strict: boolean;
|
17 | rules: LitAnalyzerRules;
|
18 | securitySystem: LitSecuritySystem;
|
19 | disable: boolean;
|
20 | logging: LitAnalyzerLogging;
|
21 | cwd: string;
|
22 | format: {
|
23 | disable: boolean;
|
24 | };
|
25 | dontShowSuggestions: boolean;
|
26 | dontSuggestConfigChanges: boolean;
|
27 | maxNodeModuleImportDepth: number;
|
28 | maxProjectImportDepth: number;
|
29 | htmlTemplateTags: string[];
|
30 | cssTemplateTags: string[];
|
31 | globalTags: string[];
|
32 | globalAttributes: string[];
|
33 | globalEvents: string[];
|
34 | customHtmlData: (string | HTMLDataV1)[] | string | HTMLDataV1;
|
35 | }
|
36 |
|
37 |
|
38 |
|
39 |
|
40 | export declare function makeConfig(userOptions?: Partial<LitAnalyzerConfig>): LitAnalyzerConfig;
|
41 | export declare function makeRules(userOptions: Partial<LitAnalyzerConfig>): LitAnalyzerRules;
|
42 |
|
\ | No newline at end of file |