///
/**
* @param {string|undefined} key
* @param {Options} options
* @returns {Linter}
*/
export default function getStylelint(
key: string | undefined,
{ threads, ...options }: Options
): Linter;
export type Stylelint = import('postcss').PluginCreator<
import('stylelint').PostcssPluginOptions
> & {
lint: (
options: import('stylelint').LinterOptions
) => Promise;
rules: {
[k: string]: import('stylelint').Rule;
};
formatters: {
[k: string]: import('stylelint').Formatter;
};
createPlugin: (
ruleName: string,
plugin: import('stylelint').Plugin
) => {
ruleName: string;
rule: import('stylelint').Rule;
};
createLinter: (
options: import('stylelint').LinterOptions
) => import('stylelint').InternalApi;
utils: {
report: (problem: import('stylelint').Problem) => void;
ruleMessages: <
T extends import('stylelint').RuleMessages,
R extends { [K in keyof T]: T[K] }
>(
ruleName: string,
messages: T
) => R;
validateOptions: (
result: import('stylelint').PostcssResult,
ruleName: string,
...optionDescriptions: import('stylelint').RuleOptions[]
) => boolean;
checkAgainstRule: (
options: {
ruleName: string;
ruleSettings: import('stylelint').ConfigRuleSettings;
root: import('postcss').Root;
},
callback: (warning: import('postcss').Warning) => void
) => void;
};
};
export type LintResult = import('stylelint').LintResult;
export type Options = import('./options').Options;
export type AsyncTask = () => Promise;
export type LintTask = (files: string | string[]) => Promise;
export type Worker = JestWorker & {
lintFiles: LintTask;
};
export type Linter = {
stylelint: Stylelint;
lintFiles: LintTask;
cleanup: AsyncTask;
threads: number;
};
import { Worker as JestWorker } from 'jest-worker';