Files
DefinitelyTyped/types/stylelint/stylelint-tests.ts
Ryan Cavanaugh dfd2111973 Merge pull request #15749 from alan-agius4/feature/stylelint-7.10.X
feat(stylelint): update typyings to match new API
2017-04-17 11:10:18 -07:00

25 lines
679 B
TypeScript

import { LinterOptions, FormatterType, SyntaxType, lint, LintResult, LinterResult } from "stylelint";
const options: LinterOptions = {
code: "div { color: red }",
files: ["**/**.scss"],
formatter: "json",
cache: true,
cacheLocation: "./stylelint.cache.json",
ignoreDisables: true,
reportNeedlessDisables: true,
ignorePath: true,
syntax: "scss"
};
lint(options).then((x: LinterResult) => {
const err: boolean = x.errored;
const output: string = x.output;
const postcssResults: any[] = x.postcssResults;
const results: LintResult[] = x.results;
});
const formatter: FormatterType = "json";
const syntax: SyntaxType = "scss";