@empline/preflight 1.1.36 → 1.1.37

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.
File without changes
package/dist/bin/audit.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/dist/bin/watch.js CHANGED
File without changes
File without changes
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Section Header Spacing Preflight
3
+ *
4
+ * Ensures proper spacing around section headers (h2, h3) and their
5
+ * accompanying descriptive text. Without proper spacing, sections
6
+ * look cramped and unprofessional.
7
+ *
8
+ * RULES:
9
+ * 1. Container pattern check: When a div contains only heading (h2/h3) + paragraph,
10
+ * it MUST have flex/gap or mb-* spacing classes
11
+ * 2. Section header margin: Header containers should have bottom margin (mb-*)
12
+ * before grid/content follows
13
+ *
14
+ * Usage:
15
+ * pnpm preflight:ui-spacing:section-headers
16
+ */
17
+ export declare const id = "ui/section-header-spacing";
18
+ export declare const name = "Section Header Spacing";
19
+ export declare const category = "ui";
20
+ export declare const blocking = true;
21
+ export declare const description = "Ensures proper spacing around section headers";
22
+ export declare const tags: string[];
23
+ export declare function run(): Promise<void>;
24
+ //# sourceMappingURL=section-header-spacing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"section-header-spacing.d.ts","sourceRoot":"","sources":["../../../src/checks/ui/section-header-spacing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAQH,eAAO,MAAM,EAAE,8BAA8B,CAAC;AAC9C,eAAO,MAAM,IAAI,2BAA2B,CAAC;AAC7C,eAAO,MAAM,QAAQ,OAAO,CAAC;AAC7B,eAAO,MAAM,QAAQ,OAAO,CAAC;AAC7B,eAAO,MAAM,WAAW,kDAAkD,CAAC;AAC3E,eAAO,MAAM,IAAI,UAAoB,CAAC;AA8BtC,wBAAsB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAsLzC"}
@@ -0,0 +1,231 @@
1
+ "use strict";
2
+ /**
3
+ * Section Header Spacing Preflight
4
+ *
5
+ * Ensures proper spacing around section headers (h2, h3) and their
6
+ * accompanying descriptive text. Without proper spacing, sections
7
+ * look cramped and unprofessional.
8
+ *
9
+ * RULES:
10
+ * 1. Container pattern check: When a div contains only heading (h2/h3) + paragraph,
11
+ * it MUST have flex/gap or mb-* spacing classes
12
+ * 2. Section header margin: Header containers should have bottom margin (mb-*)
13
+ * before grid/content follows
14
+ *
15
+ * Usage:
16
+ * pnpm preflight:ui-spacing:section-headers
17
+ */
18
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
19
+ if (k2 === undefined) k2 = k;
20
+ var desc = Object.getOwnPropertyDescriptor(m, k);
21
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
22
+ desc = { enumerable: true, get: function() { return m[k]; } };
23
+ }
24
+ Object.defineProperty(o, k2, desc);
25
+ }) : (function(o, m, k, k2) {
26
+ if (k2 === undefined) k2 = k;
27
+ o[k2] = m[k];
28
+ }));
29
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
30
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
31
+ }) : function(o, v) {
32
+ o["default"] = v;
33
+ });
34
+ var __importStar = (this && this.__importStar) || (function () {
35
+ var ownKeys = function(o) {
36
+ ownKeys = Object.getOwnPropertyNames || function (o) {
37
+ var ar = [];
38
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
39
+ return ar;
40
+ };
41
+ return ownKeys(o);
42
+ };
43
+ return function (mod) {
44
+ if (mod && mod.__esModule) return mod;
45
+ var result = {};
46
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
47
+ __setModuleDefault(result, mod);
48
+ return result;
49
+ };
50
+ })();
51
+ Object.defineProperty(exports, "__esModule", { value: true });
52
+ exports.tags = exports.description = exports.blocking = exports.category = exports.name = exports.id = void 0;
53
+ exports.run = run;
54
+ const fs = __importStar(require("fs"));
55
+ const file_cache_1 = require("../../shared/file-cache");
56
+ const glob_patterns_1 = require("../../shared/glob-patterns");
57
+ const console_chars_1 = require("../../utils/console-chars");
58
+ // Check metadata
59
+ exports.id = "ui/section-header-spacing";
60
+ exports.name = "Section Header Spacing";
61
+ exports.category = "ui";
62
+ exports.blocking = true;
63
+ exports.description = "Ensures proper spacing around section headers";
64
+ exports.tags = ["ui", "spacing"];
65
+ const EXCLUDED = (0, glob_patterns_1.extendExcludes)(glob_patterns_1.STANDARD_EXCLUDES_WITH_TESTS, [
66
+ "**/scripts/**",
67
+ "**/test-results/**",
68
+ "**/packages/**",
69
+ ]);
70
+ // Pattern 1: Div containing h2/h3 followed by p without gap class
71
+ // This catches: <div className="text-center"><h3>...</h3><p>...</p></div>
72
+ // with no gap-* or flex in the className
73
+ const HEADER_CONTAINER_PATTERN = /<div\s+(?:style=\{[^}]*\}\s+)?className="([^"]*)">\s*\n?\s*<h[23][^>]*>[\s\S]*?<\/h[23]>\s*\n?\s*<p[^>]*>/g;
74
+ // Pattern 2: Header containers that transition directly to grids without margin
75
+ // This catches content like: </div>\n\n<div className="grid"
76
+ const HEADER_TO_GRID_PATTERN = /<\/div>\s*\n?\s*(?:\{\/\*[^*]*\*\/\})?\s*\n?\s*<div\s+className="(?!.*mb-)([^"]*(?:grid|flex)[^"]*)"/g;
77
+ async function run() {
78
+ console.log(`\n${console_chars_1.emoji.search} Section Header Spacing Check\n`);
79
+ console.log("Rules:");
80
+ console.log(` ${console_chars_1.emoji.error} Section header containers (div with h2/h3 + p) must have gap-* or flex gap`);
81
+ console.log(` ${console_chars_1.emoji.error} Section header containers before grids must have mb-* for separation`);
82
+ console.log("");
83
+ const allFiles = await file_cache_1.fileCache.getAllTsTsx();
84
+ // Filter for component files
85
+ const files = allFiles.filter((file) => {
86
+ const normalizedPath = file.replace(/\\/g, "/");
87
+ return (!normalizedPath.includes("/scripts/") &&
88
+ !normalizedPath.includes("/tests/") &&
89
+ !normalizedPath.includes("/packages/") &&
90
+ !normalizedPath.includes("/test-results/") &&
91
+ (normalizedPath.includes("/components/") || normalizedPath.includes("/app/")));
92
+ });
93
+ const issues = [];
94
+ for (const file of files) {
95
+ const content = fs.readFileSync(file, "utf8");
96
+ const lines = content.split("\n");
97
+ // Skip files with preflight-ignore at file level
98
+ if (content.includes("// preflight-file-ignore: section-header-spacing"))
99
+ continue;
100
+ // Check Pattern 1: Header container without gap
101
+ // Look for multi-line patterns with div > h2/h3 > p
102
+ for (let i = 0; i < lines.length - 3; i++) {
103
+ const line = lines[i];
104
+ // Skip if line has preflight-ignore
105
+ if (line.includes("preflight-ignore"))
106
+ continue;
107
+ // Look for opening div with className (but not containing gap- or flex)
108
+ const divMatch = line.match(/<div\s+className="([^"]*)"\s*>/);
109
+ if (divMatch) {
110
+ const className = divMatch[1];
111
+ // Skip if it already has gap-* or flex with gap
112
+ if (className.includes("gap-") || (className.includes("flex") && className.includes("gap")))
113
+ continue;
114
+ // Check next few lines for h2/h3 followed by p (section header pattern)
115
+ const nextLines = lines.slice(i, i + 6).join("\n");
116
+ const isHeaderPattern = /<h[23][^>]*>[\s\S]*?<\/h[23]>\s*\n?\s*<p[^>]*>[\s\S]*?<\/p>/.test(nextLines);
117
+ if (isHeaderPattern) {
118
+ // Check if container has mb-* for spacing below
119
+ const hasBottomMargin = className.match(/\bmb-\d+\b/);
120
+ // Check if it has flex flex-col gap-*
121
+ const hasFlexGap = (className.includes("flex") || className.includes("flex-col")) &&
122
+ className.includes("gap-");
123
+ if (!hasBottomMargin && !hasFlexGap) {
124
+ issues.push({
125
+ file,
126
+ line: i + 1,
127
+ column: line.indexOf("className") + 1,
128
+ type: "error",
129
+ rule: "section-header-container-spacing",
130
+ message: 'Section header container (div with h2/h3 + p) lacks spacing. Add "flex flex-col gap-2" for internal spacing and "mb-6" for separation from following content.',
131
+ snippet: line.trim(),
132
+ suggestion: 'Add className="mb-6 flex flex-col items-center gap-2 text-center" for proper spacing',
133
+ });
134
+ }
135
+ }
136
+ }
137
+ }
138
+ // Check Pattern 2: Header block followed by grid without margin
139
+ // Look for lines where a closing tag is followed by a grid without mb-*
140
+ for (let i = 0; i < lines.length - 2; i++) {
141
+ const line = lines[i];
142
+ const nextLine = lines[i + 1] || "";
143
+ const nextNextLine = lines[i + 2] || "";
144
+ // Skip if commented
145
+ if (line.trim().startsWith("//") || line.trim().startsWith("/*"))
146
+ continue;
147
+ // Check for: </div> on one line, followed by a line with {/* Comment */} or blank,
148
+ // then a grid div without mb-*
149
+ if (line.includes("</div>")) {
150
+ // Check next 2-3 lines for a grid
151
+ const upcoming = [nextLine, nextNextLine].join("\n");
152
+ const gridMatch = upcoming.match(/<div\s+className="([^"]*\bgrid\b[^"]*)"/);
153
+ if (gridMatch) {
154
+ // Check if the previous line's container had mb-* (look back for the header container)
155
+ const prevLines = lines.slice(Math.max(0, i - 10), i).join("\n");
156
+ const isAfterHeader = prevLines.includes("<h2") || prevLines.includes("<h3");
157
+ if (isAfterHeader) {
158
+ // Check if the header container had mb-*
159
+ const headerContainerMatch = prevLines.match(/<div\s+className="([^"]*)"\s*>/);
160
+ if (headerContainerMatch) {
161
+ const containerClass = headerContainerMatch[1];
162
+ if (!containerClass.includes("mb-")) {
163
+ issues.push({
164
+ file,
165
+ line: i + 1,
166
+ column: 1,
167
+ type: "warning",
168
+ rule: "section-header-margin-before-grid",
169
+ message: "Section header container before grid lacks bottom margin. Content may appear cramped.",
170
+ snippet: lines.slice(Math.max(0, i - 2), i + 2).join("\n").trim(),
171
+ suggestion: 'Add "mb-6" to the header container for proper separation',
172
+ });
173
+ }
174
+ }
175
+ }
176
+ }
177
+ }
178
+ }
179
+ }
180
+ // Deduplicate issues by file+line
181
+ const uniqueIssues = issues.filter((issue, index, self) => index === self.findIndex((i) => i.file === issue.file && i.line === issue.line));
182
+ // Report results
183
+ const errors = uniqueIssues.filter((i) => i.type === "error");
184
+ const warnings = uniqueIssues.filter((i) => i.type === "warning");
185
+ if (errors.length > 0) {
186
+ console.log(`\n${console_chars_1.emoji.error} BLOCKING ERRORS (${errors.length}):\n`);
187
+ errors.slice(0, 20).forEach((issue) => {
188
+ console.log(` ${issue.file}:${issue.line}:${issue.column}`);
189
+ console.log(` Rule: ${issue.rule}`);
190
+ console.log(` ${issue.message}`);
191
+ if (issue.suggestion) {
192
+ console.log(` ${console_chars_1.emoji.hint} ${issue.suggestion}`);
193
+ }
194
+ console.log("");
195
+ });
196
+ if (errors.length > 20) {
197
+ console.log(` ... and ${errors.length - 20} more errors\n`);
198
+ }
199
+ }
200
+ if (warnings.length > 0) {
201
+ console.log(`\n${console_chars_1.emoji.warning} WARNINGS (${warnings.length}):\n`);
202
+ warnings.slice(0, 10).forEach((issue) => {
203
+ console.log(` ${issue.file}:${issue.line} - ${issue.message}`);
204
+ });
205
+ if (warnings.length > 10) {
206
+ console.log(` ... and ${warnings.length - 10} more warnings`);
207
+ }
208
+ }
209
+ // Summary
210
+ console.log("\n" + (0, console_chars_1.createDivider)(60, "light"));
211
+ console.log(`${console_chars_1.emoji.chart} Summary: ${errors.length} errors, ${warnings.length} warnings`);
212
+ if (errors.length > 0) {
213
+ console.log(`\n${console_chars_1.emoji.warning} ADVISORY: Found ${errors.length} section header spacing issues`);
214
+ console.log("\nFix guide:");
215
+ console.log(` ${console_chars_1.chars.bullet} Header containers with h2/h3 + p need gap-2 for internal spacing`);
216
+ console.log(` ${console_chars_1.chars.bullet} Header containers before grids need mb-6 for separation`);
217
+ console.log(` ${console_chars_1.chars.bullet} Standard pattern: className="mb-6 flex flex-col items-center gap-2 text-center"`);
218
+ console.log(`\n${console_chars_1.emoji.hint} This check is advisory. Pre-existing issues won't block the build.`);
219
+ }
220
+ else if (warnings.length > 0) {
221
+ console.log(`\n${console_chars_1.emoji.warning} Section header spacing check passed with ${warnings.length} advisory warnings.`);
222
+ }
223
+ else {
224
+ console.log(`\n${console_chars_1.emoji.success} Section header spacing check passed!`);
225
+ }
226
+ }
227
+ // Allow direct execution
228
+ if (require.main === module) {
229
+ run().catch(console.error);
230
+ }
231
+ //# sourceMappingURL=section-header-spacing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"section-header-spacing.js","sourceRoot":"","sources":["../../../src/checks/ui/section-header-spacing.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CH,kBAsLC;AA/ND,uCAAyB;AACzB,wDAAoD;AACpD,8DAA0F;AAC1F,6DAAwE;AAExE,iBAAiB;AACJ,QAAA,EAAE,GAAG,2BAA2B,CAAC;AACjC,QAAA,IAAI,GAAG,wBAAwB,CAAC;AAChC,QAAA,QAAQ,GAAG,IAAI,CAAC;AAChB,QAAA,QAAQ,GAAG,IAAI,CAAC;AAChB,QAAA,WAAW,GAAG,+CAA+C,CAAC;AAC9D,QAAA,IAAI,GAAG,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AAatC,MAAM,QAAQ,GAAG,IAAA,8BAAc,EAAC,4CAA4B,EAAE;IAC5D,eAAe;IACf,oBAAoB;IACpB,gBAAgB;CACjB,CAAC,CAAC;AAEH,kEAAkE;AAClE,0EAA0E;AAC1E,yCAAyC;AACzC,MAAM,wBAAwB,GAC5B,4GAA4G,CAAC;AAE/G,gFAAgF;AAChF,6DAA6D;AAC7D,MAAM,sBAAsB,GAC1B,uGAAuG,CAAC;AAEnG,KAAK,UAAU,GAAG;IACvB,OAAO,CAAC,GAAG,CAAC,KAAK,qBAAK,CAAC,MAAM,iCAAiC,CAAC,CAAC;IAChE,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACtB,OAAO,CAAC,GAAG,CACT,KAAK,qBAAK,CAAC,KAAK,6EAA6E,CAC9F,CAAC;IACF,OAAO,CAAC,GAAG,CACT,KAAK,qBAAK,CAAC,KAAK,uEAAuE,CACxF,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAEhB,MAAM,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AC,IAAI,KAAK,MAAM,EAAE,CAAC;IAC5B,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC7B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empline/preflight",
3
- "version": "1.1.36",
3
+ "version": "1.1.37",
4
4
  "description": "Distributable preflight validation system with app-specific plugin support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -17,23 +17,6 @@
17
17
  "preflight-review-drift": "dist/bin/review-drift.js",
18
18
  "preflight-sync-check": "dist/bin/sync-check.js"
19
19
  },
20
- "scripts": {
21
- "build": "tsc",
22
- "prebuild": "npx ai-manager cleanup -q -r . && npm run check:hygiene && npm run check:metadata && npm run check:broken",
23
- "dev": "tsc --watch",
24
- "preflight": "tsx src/bin/preflight.ts",
25
- "check:system": "tsx src/bin/preflight.ts --category system",
26
- "check:security": "tsx src/bin/preflight.ts --category security",
27
- "check:business": "tsx src/bin/preflight.ts --category business",
28
- "check:hygiene": "tsx scripts/maintenance/module-boundary-validator.ts",
29
- "check:metadata": "tsx src/checks/system/preflight-metadata-validator.ts",
30
- "check:broken": "tsx src/checks/system/broken-preflight-detection.ts",
31
- "check:hygiene:all": "tsx scripts/maintenance/module-boundary-validator.ts && tsx scripts/maintenance/workflow-composition-validator.ts && tsx scripts/maintenance/canonical-import-enforcer.ts",
32
- "lint": "eslint src/",
33
- "test": "vitest",
34
- "preinstall": "node dist/bin/preinstall.js",
35
- "prepublishOnly": "node -e \"const pkg = require('./package.json'); if (pkg.publishConfig?.access !== 'restricted') { console.error('ERROR: publishConfig.access must be restricted'); process.exit(1); }\" && npm run build"
36
- },
37
20
  "exports": {
38
21
  ".": {
39
22
  "types": "./dist/index.d.ts",
@@ -86,5 +69,21 @@
86
69
  },
87
70
  "engines": {
88
71
  "node": ">=18.0.0"
72
+ },
73
+ "scripts": {
74
+ "build": "tsc",
75
+ "prebuild": "npx ai-manager cleanup -q -r . && npm run check:hygiene && npm run check:metadata && npm run check:broken",
76
+ "dev": "tsc --watch",
77
+ "preflight": "tsx src/bin/preflight.ts",
78
+ "check:system": "tsx src/bin/preflight.ts --category system",
79
+ "check:security": "tsx src/bin/preflight.ts --category security",
80
+ "check:business": "tsx src/bin/preflight.ts --category business",
81
+ "check:hygiene": "tsx scripts/maintenance/module-boundary-validator.ts",
82
+ "check:metadata": "tsx src/checks/system/preflight-metadata-validator.ts",
83
+ "check:broken": "tsx src/checks/system/broken-preflight-detection.ts",
84
+ "check:hygiene:all": "tsx scripts/maintenance/module-boundary-validator.ts && tsx scripts/maintenance/workflow-composition-validator.ts && tsx scripts/maintenance/canonical-import-enforcer.ts",
85
+ "lint": "eslint src/",
86
+ "test": "vitest",
87
+ "preinstall": "node dist/bin/preinstall.js"
89
88
  }
90
- }
89
+ }