Installation
npm install --save @types/stylelint
Summary
This package contains type definitions for stylelint (https://github.com/stylelint/stylelint).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stylelint/v7.
export type FormatterType = "json" | "string" | "verbose";
export type SyntaxType = "scss" | "sass" | "less" | "sugarss";
export interface LinterOptions {
code?: string | undefined;
codeFilename?: string | undefined;
config?: JSON | undefined;
configBasedir?: string | undefined;
configFile?: string | undefined;
configOverrides?: JSON | undefined;
cache?: boolean | undefined;
cacheLocation?: string | undefined;
files?: string | string[] | undefined;
fix?: boolean | undefined;
formatter?: FormatterType | undefined;
ignoreDisables?: boolean | undefined;
reportNeedlessDisables?: boolean | undefined;
ignorePath?: boolean | undefined;
syntax?: SyntaxType | undefined;
customSyntax?: string | undefined;
}
export interface LinterResult {
errored: boolean;
output: string;
postcssResults: any[];
results: LintResult[];
}
export interface LintResult {
source: string;
errored: boolean | undefined;
ignored: boolean | undefined;
warnings: string[];
deprecations: string[];
invalidOptionWarnings: any[];
}
export namespace formatters {
function json(results: LintResult[]): string;
function string(results: LintResult[]): string;
function verbose(results: LintResult[]): string;
}
export function lint(options?: LinterOptions): Promise<LinterResult>;
Additional Details
- Last updated: Fri, 02 Jul 2021 22:33:07 GMT
- Dependencies: none
- Global values: none
Credits
These definitions were written by Alan Agius.