@cyber-dash-tech/revela 0.7.6 → 0.7.7
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/lib/qa/checks.ts +5 -3
- package/lib/qa/compliance.ts +2 -2
- package/package.json +1 -1
package/lib/qa/checks.ts
CHANGED
|
@@ -618,7 +618,7 @@ function formatComplianceReport(report: QAReport): string {
|
|
|
618
618
|
`## Static Design Compliance Report`,
|
|
619
619
|
``,
|
|
620
620
|
`**File:** \`${report.file}\``,
|
|
621
|
-
`**Result:**
|
|
621
|
+
`**Result:** FAILED — ${report.summary}`,
|
|
622
622
|
``,
|
|
623
623
|
]
|
|
624
624
|
|
|
@@ -634,7 +634,8 @@ function formatComplianceReport(report: QAReport): string {
|
|
|
634
634
|
lines.push(
|
|
635
635
|
`### Action Required`,
|
|
636
636
|
``,
|
|
637
|
-
`
|
|
637
|
+
`You must fix the design vocabulary errors above before continuing. These are static class-name checks, not layout QA failures.`,
|
|
638
|
+
`Do not leave unknown classes or custom class selectors in deck HTML.`,
|
|
638
639
|
`- For **unknown HTML classes**, remove ad-hoc/test classes or replace them with classes from the active design's Layout Index or Component Index.`,
|
|
639
640
|
`- For **novel CSS rules**, remove custom class selectors from \`<style>\`; use existing design components, or inline \`style=""\` for minor one-off positioning/sizing tweaks.`,
|
|
640
641
|
`- If you need the correct class names, call \`revela-designs\` to read the relevant layout/component details.`,
|
|
@@ -652,7 +653,8 @@ function formatComplianceIssue(issue: LayoutIssue): string {
|
|
|
652
653
|
const classAttr = typeof data.classAttr === "string" ? data.classAttr : ""
|
|
653
654
|
const tag = typeof data.tag === "string" ? data.tag : ""
|
|
654
655
|
const label = issue.sub ? `compliance/${issue.sub}` : "compliance"
|
|
655
|
-
const
|
|
656
|
+
const icon = issue.severity === "error" ? "🔴" : "🟡"
|
|
657
|
+
const lines = [`- ${icon} **${label}**: \`${cls}\``]
|
|
656
658
|
|
|
657
659
|
lines.push(` - Location: ${location}${line ? `, line ${line}` : ""}`)
|
|
658
660
|
if (tag || classAttr) {
|
package/lib/qa/compliance.ts
CHANGED
|
@@ -157,7 +157,7 @@ export function runComplianceQA(htmlFilePath: string, vocabulary?: DesignClassVo
|
|
|
157
157
|
issues.push({
|
|
158
158
|
type: "compliance",
|
|
159
159
|
sub: "unknown_class",
|
|
160
|
-
severity: "
|
|
160
|
+
severity: "error",
|
|
161
161
|
detail: `HTML uses CSS class \`${use.className}\` which is not defined in the active design. Replace it with a class from the Component Index or Layout Index.`,
|
|
162
162
|
data: {
|
|
163
163
|
class: use.className,
|
|
@@ -187,7 +187,7 @@ export function runComplianceQA(htmlFilePath: string, vocabulary?: DesignClassVo
|
|
|
187
187
|
first.issues.push({
|
|
188
188
|
type: "compliance",
|
|
189
189
|
sub: "novel_css_rule",
|
|
190
|
-
severity: "
|
|
190
|
+
severity: "error",
|
|
191
191
|
detail: `<style> defines CSS class \`.${use.className}\` which is not part of the active design. Remove this custom rule and use the design's existing component styles. For minor adjustments, use inline \`style=""\` instead.`,
|
|
192
192
|
data: {
|
|
193
193
|
class: use.className,
|