lwc-linter
Version:
A comprehensive CLI tool for linting Lightning Web Components v8.0.0+ with modern LWC patterns, decorators, lifecycle hooks, and Salesforce platform integration
62 lines • 1.66 kB
TypeScript
export type SeverityLevel = 'info' | 'warn' | 'error';
export type RuleLevel = 'off' | 'info' | 'warn' | 'error';
export interface RuleConfig {
[ruleName: string]: RuleLevel | [RuleLevel, any];
}
export interface LinterConfig {
extends?: string[];
rules: RuleConfig;
severity?: SeverityLevel;
fix?: boolean;
exclude?: string[];
include?: string[];
accessibility?: {
enabled: boolean;
level: 'A' | 'AA' | 'AAA';
};
performance?: {
enabled: boolean;
maxBundleSize?: number;
maxDomNodes?: number;
};
security?: {
enabled: boolean;
allowInnerHTML?: boolean;
};
eslintIntegration?: {
enabled: boolean;
configPath?: string;
ignorePatterns?: string[];
};
prettierIntegration?: {
enabled: boolean;
configPath?: string;
printWidth?: number;
tabWidth?: number;
useTabs?: boolean;
};
}
export interface LintIssue {
rule: string;
message: string;
severity: SeverityLevel;
line?: number;
column?: number;
fixable?: boolean;
category: 'code-quality' | 'accessibility' | 'performance' | 'security';
}
export interface LintResult {
filePath: string;
issues: LintIssue[];
fixedCount?: number;
}
export interface RuleDefinition {
name: string;
description: string;
category: LintIssue['category'];
severity: SeverityLevel;
fixable: boolean;
check: (fileContent: string, filePath: string, config: LinterConfig) => LintIssue[];
fix?: (fileContent: string, issues: LintIssue[]) => string;
}
//# sourceMappingURL=config.d.ts.map