stablekit.ts 0.6.1 → 0.6.3
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/dist/chunk-MCKGQKYU.js +15 -0
- package/dist/eslint.js +2 -0
- package/dist/index.js +2 -0
- package/dist/stylelint.cjs +5929 -4
- package/dist/stylelint.d.cts +21 -1
- package/dist/stylelint.d.ts +21 -1
- package/dist/stylelint.js +5927 -1
- package/package.json +1 -1
package/dist/stylelint.d.cts
CHANGED
|
@@ -40,6 +40,11 @@ interface StyleLintOptions {
|
|
|
40
40
|
* e.g. ["--color-status-", "--color-danger"]
|
|
41
41
|
* Any var() referencing these inside @utility is a lint error. */
|
|
42
42
|
functionalTokens?: string[];
|
|
43
|
+
/** Custom property prefixes set at runtime (JS, Radix, inline styles)
|
|
44
|
+
* that should not be flagged as undefined.
|
|
45
|
+
* e.g. ["--radix-", "--bar-"]
|
|
46
|
+
* @default [] */
|
|
47
|
+
runtimeTokens?: string[];
|
|
43
48
|
/** Glob patterns for files to lint.
|
|
44
49
|
* @default ["src/**\/*.css"] */
|
|
45
50
|
files?: string[];
|
|
@@ -49,5 +54,20 @@ declare function createStyleLint(options?: StyleLintOptions): {
|
|
|
49
54
|
plugins: unknown[];
|
|
50
55
|
rules: Record<string, unknown>;
|
|
51
56
|
};
|
|
57
|
+
/**
|
|
58
|
+
* Audit a CSS file for design fragmentation.
|
|
59
|
+
*
|
|
60
|
+
* Groups all rules by pseudo-class / state selector (:hover, :focus,
|
|
61
|
+
* [data-state], [data-status], etc.) and prints the declaration patterns
|
|
62
|
+
* so you can see how many ways you're expressing the same concept.
|
|
63
|
+
*
|
|
64
|
+
* Usage:
|
|
65
|
+
* import { auditCSS } from "stablekit/stylelint";
|
|
66
|
+
* auditCSS("/path/to/index.css");
|
|
67
|
+
*
|
|
68
|
+
* Or from CLI:
|
|
69
|
+
* node -e 'require("stablekit.ts/stylelint").auditCSS("src/index.css")'
|
|
70
|
+
*/
|
|
71
|
+
declare function auditCSS(filePath: string): void;
|
|
52
72
|
|
|
53
|
-
export { type StyleLintOptions, createStyleLint };
|
|
73
|
+
export { type StyleLintOptions, auditCSS, createStyleLint };
|
package/dist/stylelint.d.ts
CHANGED
|
@@ -40,6 +40,11 @@ interface StyleLintOptions {
|
|
|
40
40
|
* e.g. ["--color-status-", "--color-danger"]
|
|
41
41
|
* Any var() referencing these inside @utility is a lint error. */
|
|
42
42
|
functionalTokens?: string[];
|
|
43
|
+
/** Custom property prefixes set at runtime (JS, Radix, inline styles)
|
|
44
|
+
* that should not be flagged as undefined.
|
|
45
|
+
* e.g. ["--radix-", "--bar-"]
|
|
46
|
+
* @default [] */
|
|
47
|
+
runtimeTokens?: string[];
|
|
43
48
|
/** Glob patterns for files to lint.
|
|
44
49
|
* @default ["src/**\/*.css"] */
|
|
45
50
|
files?: string[];
|
|
@@ -49,5 +54,20 @@ declare function createStyleLint(options?: StyleLintOptions): {
|
|
|
49
54
|
plugins: unknown[];
|
|
50
55
|
rules: Record<string, unknown>;
|
|
51
56
|
};
|
|
57
|
+
/**
|
|
58
|
+
* Audit a CSS file for design fragmentation.
|
|
59
|
+
*
|
|
60
|
+
* Groups all rules by pseudo-class / state selector (:hover, :focus,
|
|
61
|
+
* [data-state], [data-status], etc.) and prints the declaration patterns
|
|
62
|
+
* so you can see how many ways you're expressing the same concept.
|
|
63
|
+
*
|
|
64
|
+
* Usage:
|
|
65
|
+
* import { auditCSS } from "stablekit/stylelint";
|
|
66
|
+
* auditCSS("/path/to/index.css");
|
|
67
|
+
*
|
|
68
|
+
* Or from CLI:
|
|
69
|
+
* node -e 'require("stablekit.ts/stylelint").auditCSS("src/index.css")'
|
|
70
|
+
*/
|
|
71
|
+
declare function auditCSS(filePath: string): void;
|
|
52
72
|
|
|
53
|
-
export { type StyleLintOptions, createStyleLint };
|
|
73
|
+
export { type StyleLintOptions, auditCSS, createStyleLint };
|