@jay-framework/jay-stack-cli 0.24.0 → 0.24.2
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/agent-kit-template/designer/validation-guide.md +32 -1
- package/dist/index-CatrpDqC.js +1594 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1512 -214
- package/package.json +12 -10
|
@@ -22,12 +22,17 @@ The validator processes each `.jay-html` file with:
|
|
|
22
22
|
|
|
23
23
|
So a warning about an `<img>` might come from a headfull component's template, not your page template. A CSS warning might come from a linked stylesheet.
|
|
24
24
|
|
|
25
|
+
## Errors vs Warnings
|
|
26
|
+
|
|
27
|
+
- **Errors** block the build. They must be fixed — there is no way to suppress them.
|
|
28
|
+
- **Warnings** must be either fixed or explicitly suppressed. Do not ignore warnings — each one has a clear resolution path (add the missing attribute, or suppress via `<script type="application/jay-validations">`).
|
|
29
|
+
|
|
25
30
|
## How to Read Warnings
|
|
26
31
|
|
|
27
32
|
Each warning has:
|
|
28
33
|
|
|
29
34
|
- **Message** — what was found and why it matters
|
|
30
|
-
- **Suggestion** — how to fix it
|
|
35
|
+
- **Suggestion** — how to fix it, and how to suppress it if the warning is intentional
|
|
31
36
|
- **Element** — which HTML element triggered it (some include the full tag with attributes)
|
|
32
37
|
|
|
33
38
|
### Acting on Warnings
|
|
@@ -74,6 +79,32 @@ For design-system token warnings, add `/* design-system: allow */` as a comment
|
|
|
74
79
|
padding: 96px 0; /* design-system: allow */
|
|
75
80
|
```
|
|
76
81
|
|
|
82
|
+
### Page-level validation overrides
|
|
83
|
+
|
|
84
|
+
For page-level warnings that can't be fixed by adding an attribute (e.g., "no LCP image" on a text-first page), use a `<script type="application/jay-validations">` tag in the `<head>`:
|
|
85
|
+
|
|
86
|
+
```html
|
|
87
|
+
<head>
|
|
88
|
+
<script type="application/jay-validations">
|
|
89
|
+
seo:
|
|
90
|
+
no-lcp-image: true
|
|
91
|
+
</script>
|
|
92
|
+
</head>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
The YAML body is keyed by plugin name. Each plugin defines its own suppressible rules. This tag is a build-time directive — it's parsed during validation and never rendered in the page output.
|
|
96
|
+
|
|
97
|
+
Multiple plugins can be configured in one tag:
|
|
98
|
+
|
|
99
|
+
```html
|
|
100
|
+
<script type="application/jay-validations">
|
|
101
|
+
seo:
|
|
102
|
+
no-lcp-image: true
|
|
103
|
+
design-system:
|
|
104
|
+
allow-undefined-vars: true
|
|
105
|
+
</script>
|
|
106
|
+
```
|
|
107
|
+
|
|
77
108
|
### When you can't suppress
|
|
78
109
|
|
|
79
110
|
If a warning comes from dynamic content (`{post.content}`) or a generated file, you can't suppress it in the template. This is a validator limitation — the warning is a false positive. Don't loop trying to fix it.
|