stylelint-webpack-plugin 3.0.1 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +146 -26
- package/dist/StylelintError.js +1 -7
- package/dist/getStylelint.js +31 -24
- package/dist/index.js +48 -34
- package/dist/linter.js +32 -23
- package/dist/options.js +14 -16
- package/dist/utils.js +19 -19
- package/package.json +31 -31
- package/types/StylelintError.d.ts +8 -0
- package/types/getStylelint.d.ts +91 -0
- package/{declarations → types}/index.d.ts +13 -10
- package/types/linter.d.ts +109 -0
- package/{declarations → types}/options.d.ts +79 -24
- package/{declarations → types}/utils.d.ts +5 -0
- package/types/worker.d.ts +58 -0
- package/declarations/StylelintError.d.ts +0 -2
- package/declarations/cjs.d.ts +0 -3
- package/declarations/getStylelint.d.ts +0 -24
- package/declarations/linter.d.ts +0 -34
- package/declarations/worker.d.ts +0 -3
- package/dist/cjs.js +0 -5
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @param {string|undefined} key
|
|
3
|
-
* @param {Options} options
|
|
4
|
-
* @returns {Linter}
|
|
5
|
-
*/
|
|
6
|
-
export default function getStylelint(
|
|
7
|
-
key: string | undefined,
|
|
8
|
-
{ threads, ...options }: Options
|
|
9
|
-
): Linter;
|
|
10
|
-
export type Stylelint = typeof import('stylelint');
|
|
11
|
-
export type LintResult = import('stylelint').LintResult;
|
|
12
|
-
export type Options = import('./options').Options;
|
|
13
|
-
export type AsyncTask = () => Promise<void>;
|
|
14
|
-
export type LintTask = (files: string | string[]) => Promise<LintResult[]>;
|
|
15
|
-
export type Worker = JestWorker & {
|
|
16
|
-
lintFiles: LintTask;
|
|
17
|
-
};
|
|
18
|
-
export type Linter = {
|
|
19
|
-
stylelint: Stylelint;
|
|
20
|
-
lintFiles: LintTask;
|
|
21
|
-
cleanup: AsyncTask;
|
|
22
|
-
threads: number;
|
|
23
|
-
};
|
|
24
|
-
import { Worker as JestWorker } from 'jest-worker';
|
package/declarations/linter.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @param {string|undefined} key
|
|
3
|
-
* @param {Options} options
|
|
4
|
-
* @param {Compilation} compilation
|
|
5
|
-
* @returns {{lint: Linter, report: Reporter, threads: number}}
|
|
6
|
-
*/
|
|
7
|
-
export default function linter(
|
|
8
|
-
key: string | undefined,
|
|
9
|
-
options: Options,
|
|
10
|
-
compilation: Compilation
|
|
11
|
-
): {
|
|
12
|
-
lint: Linter;
|
|
13
|
-
report: Reporter;
|
|
14
|
-
threads: number;
|
|
15
|
-
};
|
|
16
|
-
export type Stylelint = typeof import('stylelint');
|
|
17
|
-
export type LintResult = import('stylelint').LintResult;
|
|
18
|
-
export type Compiler = import('webpack').Compiler;
|
|
19
|
-
export type Compilation = import('webpack').Compilation;
|
|
20
|
-
export type Options = import('./options').Options;
|
|
21
|
-
export type FormatterType = import('./options').FormatterType;
|
|
22
|
-
export type FormatterFunction = (results: LintResult[]) => string;
|
|
23
|
-
export type GenerateReport = (compilation: Compilation) => Promise<void>;
|
|
24
|
-
export type Report = {
|
|
25
|
-
errors?: StylelintError;
|
|
26
|
-
warnings?: StylelintError;
|
|
27
|
-
generateReportAsset?: GenerateReport;
|
|
28
|
-
};
|
|
29
|
-
export type Reporter = () => Promise<Report>;
|
|
30
|
-
export type Linter = (files: string | string[]) => void;
|
|
31
|
-
export type LintResultMap = {
|
|
32
|
-
[files: string]: import('stylelint').LintResult;
|
|
33
|
-
};
|
|
34
|
-
import StylelintError from './StylelintError';
|
package/declarations/worker.d.ts
DELETED