@hanzo/design 0.5.5 → 0.5.6
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/package.json +1 -1
- package/scripts/lint.mjs +12 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/design",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.6",
|
|
4
4
|
"packageManager": "pnpm@11.17.0",
|
|
5
5
|
"description": "Hanzo Design System \u2014 monochrome, dark-default tokens + components + brand assets, the single source of truth for every Hanzo surface. CSS + typed programmatic tokens.",
|
|
6
6
|
"license": "MIT OR Apache-2.0",
|
package/scripts/lint.mjs
CHANGED
|
@@ -307,8 +307,19 @@ for (const rule of RULES) {
|
|
|
307
307
|
if (hits.length > 20) console.log(` … ${hits.length - 20} more`)
|
|
308
308
|
}
|
|
309
309
|
|
|
310
|
+
// A key that is not a rule allows NOTHING, and the author who wrote it believes
|
|
311
|
+
// they filed an exemption — the same silent failure this whole file exists to
|
|
312
|
+
// end. Keys starting with `_` are prose and are skipped, so the file can explain
|
|
313
|
+
// itself without inventing a second format.
|
|
314
|
+
const unknown = Object.keys(allow).filter((k) => !k.startsWith('_') && !RULES.includes(k))
|
|
315
|
+
if (unknown.length) {
|
|
316
|
+
console.log(`\n ${RATCHET} names ${unknown.length} thing(s) that are not rules: ${unknown.join(', ')}`)
|
|
317
|
+
console.log(` the rules are: ${RULES.join(', ')}`)
|
|
318
|
+
process.exit(1)
|
|
319
|
+
}
|
|
320
|
+
|
|
310
321
|
if (!over.length && !under.length) {
|
|
311
|
-
const owed =
|
|
322
|
+
const owed = RULES.reduce((a, r) => a + (allow[r] ?? 0), 0)
|
|
312
323
|
console.log(`hanzo-design-lint: ${scanned} files, clean${owed ? ` (${owed} allowed by ${RATCHET})` : ''}`)
|
|
313
324
|
process.exit(0)
|
|
314
325
|
}
|