impeccable 3.3.0 → 3.4.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 +2 -2
- package/README.npm.md +2 -2
- package/README.repo.md +3 -3
- package/cli/bin/commands/skills.mjs +221 -28
- package/cli/engine/browser/injected/index.mjs +27 -4
- package/cli/engine/cli/main.mjs +113 -19
- package/cli/engine/design-system.mjs +62 -0
- package/cli/engine/detect-antipatterns-browser.js +458 -53
- package/cli/engine/engines/regex/detect-text.mjs +44 -8
- package/cli/engine/engines/static-html/css-cascade.mjs +23 -11
- package/cli/engine/engines/static-html/detect-html.mjs +4 -2
- package/cli/engine/findings.mjs +7 -1
- package/cli/engine/node/file-system.mjs +16 -2
- package/cli/engine/registry/antipatterns.mjs +41 -6
- package/cli/engine/rules/checks.mjs +408 -48
- package/cli/engine/shared/constants.mjs +11 -0
- package/cli/lib/impeccable-config.mjs +9 -1
- package/package.json +3 -2
|
@@ -68,6 +68,15 @@ const GENERIC_FONTS = new Set([
|
|
|
68
68
|
const WCAG_LARGE_TEXT_PX = 18 * (96 / 72);
|
|
69
69
|
const WCAG_LARGE_BOLD_TEXT_PX = 14 * (96 / 72);
|
|
70
70
|
|
|
71
|
+
// Em-dash overuse (advisory) thresholds, shared by the regex/static-HTML
|
|
72
|
+
// analyzer and the browser DOM check so both fire on the same saturation
|
|
73
|
+
// pattern. Two gates must hold: an absolute floor of EM_DASH_FLOOR dashes, and
|
|
74
|
+
// a density of at least one dash per EM_DASH_CHARS_PER_DASH characters of body
|
|
75
|
+
// text. A long article that uses a few em-dashes is left alone; a short,
|
|
76
|
+
// dash-per-clause page is not.
|
|
77
|
+
const EM_DASH_FLOOR = 8;
|
|
78
|
+
const EM_DASH_CHARS_PER_DASH = 500;
|
|
79
|
+
|
|
71
80
|
// Serif faces that show up in italic-display heroes. The rule also fires when
|
|
72
81
|
// the primary face is unknown but the stack ends in the generic `serif` token,
|
|
73
82
|
// which catches custom/private faces with a serif fallback.
|
|
@@ -97,5 +106,7 @@ export {
|
|
|
97
106
|
GENERIC_FONTS,
|
|
98
107
|
WCAG_LARGE_TEXT_PX,
|
|
99
108
|
WCAG_LARGE_BOLD_TEXT_PX,
|
|
109
|
+
EM_DASH_FLOOR,
|
|
110
|
+
EM_DASH_CHARS_PER_DASH,
|
|
100
111
|
KNOWN_SERIF_FONTS,
|
|
101
112
|
};
|
|
@@ -43,7 +43,7 @@ function detectorSection(raw) {
|
|
|
43
43
|
return raw && raw.detector && typeof raw.detector === 'object' && !Array.isArray(raw.detector) ? raw.detector : null;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
const DETECTOR_CONFIG_KEYS = new Set(['ignoreRules', 'ignoreFiles', 'ignoreValues', 'designSystem']);
|
|
46
|
+
const DETECTOR_CONFIG_KEYS = new Set(['ignoreRules', 'ignoreFiles', 'ignoreValues', 'designSystem', 'advisoryRules']);
|
|
47
47
|
|
|
48
48
|
const DEFAULT_DETECTION_CONFIG = Object.freeze({
|
|
49
49
|
ignoreRules: [],
|
|
@@ -71,6 +71,11 @@ function cloneRawDetectionConfig() {
|
|
|
71
71
|
|
|
72
72
|
function applyDetectionConfigSource(config, raw) {
|
|
73
73
|
if (!raw || typeof raw !== 'object') return config;
|
|
74
|
+
// Advisory rules are opt-in for the design hook; the CLI carries the setting
|
|
75
|
+
// so config round-trips (e.g. `impeccable hooks ignore-value`) preserve it.
|
|
76
|
+
if (raw.advisoryRules === 'include' || raw.advisoryRules === 'exclude') {
|
|
77
|
+
config.advisoryRules = raw.advisoryRules;
|
|
78
|
+
}
|
|
74
79
|
if (raw.designSystem && typeof raw.designSystem === 'object' && !Array.isArray(raw.designSystem)) {
|
|
75
80
|
config.designSystem = {
|
|
76
81
|
...config.designSystem,
|
|
@@ -151,6 +156,9 @@ function normalizeDetectionConfigForWrite(config) {
|
|
|
151
156
|
out.ignoreFiles = uniqueStrings(config.ignoreFiles.filter(v => typeof v === 'string' && v.trim()).map(v => v.trim()));
|
|
152
157
|
}
|
|
153
158
|
out.ignoreValues = normalizeIgnoreValueEntries(config?.ignoreValues || []);
|
|
159
|
+
if (config?.advisoryRules === 'include' || config?.advisoryRules === 'exclude') {
|
|
160
|
+
out.advisoryRules = config.advisoryRules;
|
|
161
|
+
}
|
|
154
162
|
if (config?.designSystem && typeof config.designSystem === 'object' && !Array.isArray(config.designSystem)) {
|
|
155
163
|
out.designSystem = {
|
|
156
164
|
enabled: config.designSystem.enabled === false ? false : true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "impeccable",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"author": "Paul Bakaus",
|
|
5
5
|
"description": "Design skills, commands, and anti-pattern detection for AI coding agents",
|
|
6
6
|
"keywords": [
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
"test:cli-remote-e2e": "node scripts/run-tests.mjs cli-remote-e2e",
|
|
59
59
|
"test:live-e2e": "node scripts/run-tests.mjs live-e2e",
|
|
60
60
|
"test:live-e2e-accept-cleanup": "node scripts/run-tests.mjs live-e2e-accept-cleanup",
|
|
61
|
+
"test:new-work-e2e": "node scripts/run-tests.mjs new-work-e2e",
|
|
61
62
|
"test:live-e2e-agent": "node scripts/run-tests.mjs live-e2e-agent",
|
|
62
63
|
"test:skill-behavior": "node scripts/run-tests.mjs skill-behavior",
|
|
63
64
|
"test:live-svelte-adapter-deepseek": "node scripts/run-tests.mjs live-svelte-adapter-deepseek",
|
|
@@ -87,7 +88,7 @@
|
|
|
87
88
|
"@ai-sdk/google": "^4.0.8",
|
|
88
89
|
"@ai-sdk/openai": "^4.0.7",
|
|
89
90
|
"@anthropic-ai/claude-agent-sdk": "^0.3.165",
|
|
90
|
-
"@anthropic-ai/sdk": "^0.
|
|
91
|
+
"@anthropic-ai/sdk": "^0.115.0",
|
|
91
92
|
"@babel/parser": "^7.29.3",
|
|
92
93
|
"ai": "^7.0.14",
|
|
93
94
|
"archiver": "^8.0.0",
|