From 3eacdb6400e166901cf9bfe928d41dbc6d71e0bf Mon Sep 17 00:00:00 2001 From: Kat Suricata Date: Sun, 13 Sep 2026 23:53:14 -0400 Subject: [PATCH] comment streamlining --- eslint.config.js | 4 ++-- src/lib/palette.ts | 12 ++++++------ src/lib/styles/spec.css | 2 +- src/lib/theme/digital-rust-theme.ts | 6 +++--- src/routes/playground/+page.svelte | 4 ++-- static/ports/DigitalRustfish.theme | 6 +++--- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index ed35999..b9080cd 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -18,8 +18,8 @@ export default defineConfig( { languageOptions: { globals: { ...globals.browser, ...globals.node } }, rules: { - // typescript-eslint strongly recommend that you do not use the no-undef lint rule on TypeScript projects. - // see: https://typescript-eslint.io/troubleshooting/faqs/eslint/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors + // typescript-eslint strongly recommends that you do not use the no-undef lint rule on TypeScript projects. + // See: https://typescript-eslint.io/troubleshooting/faqs/eslint/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors 'no-undef': 'off' } }, diff --git a/src/lib/palette.ts b/src/lib/palette.ts index 89738e6..79122f7 100644 --- a/src/lib/palette.ts +++ b/src/lib/palette.ts @@ -61,7 +61,7 @@ export const internalHex = { surfaceActive: '#5a1810' } as const; -// Raw Amber Alert fails WCAG AA for text on base/elevated surfaces; this variant passes. +// Raw Amber Alert fails WCAG AA for text on base and elevated surfaces. This variant passes. export const amberAlertText: DrColor = { id: 'amber-alert-text', name: 'Amber Alert (text)', @@ -70,9 +70,9 @@ export const amberAlertText: DrColor = { }; export interface DrAccentFamily { - /** Family display name, e.g. "Memory Leek". */ + /** Family display name, for example "Memory Leek". */ name: string; - /** ANSI slot the base colour fills, e.g. "Green". */ + /** ANSI slot the base colour fills, for example "Green". */ ansi: string; base: DrColor; dim: DrColor; @@ -195,7 +195,7 @@ export function bestTextColor(bgHex: string): DrColor { return contrastRatio(bgHex, light.hex) >= contrastRatio(bgHex, dark.hex) ? light : dark; } -/** Appends an 8-bit alpha channel to a palette hex, e.g. withAlpha('dark-packet', 0.7) → '#691b0fb3'. */ +/** Appends an 8-bit alpha channel to a palette hex. For example, withAlpha('dark-packet', 0.7) returns '#691b0fb3'. */ export function withAlpha(id: string, alpha: number): string { const byte = Math.round(alpha * 255) .toString(16) @@ -239,7 +239,7 @@ ${emitNamedColors()} /* Semantic action tokens */ --dr-accent: var(--digital-rust); - --dr-accent-hover: var(--firewall-breach); /* Ghost Pixel on this passes AA (4.66:1); raw Amber Alert does not */ + --dr-accent-hover: var(--firewall-breach); /* Ghost Pixel on this passes AA (4.66:1). Raw Amber Alert does not. */ /* Semantic feedback tokens */ --dr-success: var(--memory-leek); @@ -256,7 +256,7 @@ ${emitNamedColors()} /* Border tokens */ --dr-border: 2px solid var(--dark-packet); - --dr-border-thick: 4px solid var(--dark-packet); /* page/site chrome only (headers, section rules); never on components */ + --dr-border-thick: 4px solid var(--dark-packet); /* page and site chrome only (headers, section rules). Never on components. */ --dr-border-subtle: 1px solid var(--bad-sector); --dr-border-focus: 2px solid var(--stack-overglow); diff --git a/src/lib/styles/spec.css b/src/lib/styles/spec.css index 522e463..4c867ce 100644 --- a/src/lib/styles/spec.css +++ b/src/lib/styles/spec.css @@ -496,7 +496,7 @@ body:has(.site-shell) { flex-direction: column; } - /* Basis applies to height in column direction; items size to content. */ + /* Basis applies to height in column direction. Items size to content. */ .spec-meta__item { flex: none; } diff --git a/src/lib/theme/digital-rust-theme.ts b/src/lib/theme/digital-rust-theme.ts index de12af5..fe11bd3 100644 --- a/src/lib/theme/digital-rust-theme.ts +++ b/src/lib/theme/digital-rust-theme.ts @@ -3,8 +3,8 @@ import { color, withAlpha } from '#lib/palette.js'; const c = (id: string) => color(id).hex; -// Scope → colour assignments are design decisions from the syntax spec; the -// hex values come from palette.ts so the theme can never drift from the site. +// Scope → colour assignments are design decisions from the syntax spec. The +// hex values come from palette.ts, so the theme can never drift from the site. export const digitalRustTheme: ThemeRegistration = { name: 'digital-rust', type: 'dark', @@ -207,7 +207,7 @@ export const digitalRustTheme: ThemeRegistration = { }, // ─── Errors ─── - // Raw Amber Alert fails AA on dark surfaces; the text variant passes. + // Raw Amber Alert fails AA on dark surfaces. The text variant passes. { name: 'Errors', scope: ['invalid', 'invalid.illegal', 'invalid.deprecated'], diff --git a/src/routes/playground/+page.svelte b/src/routes/playground/+page.svelte index a0deb39..4d6f9ba 100644 --- a/src/routes/playground/+page.svelte +++ b/src/routes/playground/+page.svelte @@ -185,7 +185,7 @@