Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 1 addition & 24 deletions declarations/getStylelint.d.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,3 @@
/** @typedef {import('stylelint')} Stylelint */
/** @typedef {import('stylelint').LintResult} LintResult */
/** @typedef {import('./options').Options} Options */
/** @typedef {() => Promise<void>} AsyncTask */
/** @typedef {(files: string|string[]) => Promise<LintResult[]>} LintTask */
/** @typedef {JestWorker & {lintFiles: LintTask}} Worker */
/** @typedef {{stylelint: Stylelint, lintFiles: LintTask, cleanup: AsyncTask, threads: number, }} Linter */
/**
* @param {Options} options
* @returns {Linter}
*/
export function loadStylelint(options: Options): Linter;
/**
* @param {string|undefined} key
* @param {number} poolSize
* @param {Options} options
* @returns {Linter}
*/
export function loadStylelintThreaded(
key: string | undefined,
poolSize: number,
options: Options
): Linter;
/**
* @param {string|undefined} key
* @param {Options} options
Expand All @@ -44,4 +21,4 @@ export type Linter = {
cleanup: AsyncTask;
threads: number;
};
import JestWorker from 'jest-worker';
import { Worker as JestWorker } from 'jest-worker';
3 changes: 2 additions & 1 deletion declarations/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@ declare class StylelintWebpackPlugin {
*/
getContext(compiler: Compiler): string;
/**
* @param {string[]} glob
* @param {Compiler} compiler
* @param {Module} module
* @returns {string[]}
*/
getFiles({ fileTimestamps }: Compiler, { buildInfo }: Module): string[];
getFiles(glob: string[], compiler: Compiler, module: Module): string[];
/**
* @param {Map<string, null | FileSystemInfoEntry | "ignore">} fileTimestamps
* @returns {string[]}
Expand Down
Loading