Build order step 1 (docs/01): scaffold, tokens, base layout, header, footer, SEO component, plus a temporary /type-scale/ proof sheet that step 2 deletes. THE FONTS WERE NEVER ON DISK. global.css declared six @font-face rules pointing at /fonts/*.woff2 and public/fonts/ did not exist, so every face had been silently falling back to Georgia and the system sans. Six cuts committed, 123,804 bytes, SIL OFL 1.1, provenance in docs/reference/fonts-provenance.md. ?v=1 on every URL because the deploy script serves them immutable for a year. ZERO JAVASCRIPT. The reveal was an inline IntersectionObserver in <head>; docs/05 specifies script-src 'self' with no unsafe-inline, so the only script on the site was the one thing the site's own CSP would refuse to execute. Replaced with animation-timeline: view() behind @supports. 0 script tags and 0 .js files in dist. The infinity mark is lifted verbatim from the deployed site's own smlMark loading thumbnail, not redrawn (Q32 asks whether a canonical vector exists). The proof sheet computes its contrast table from tokens.css rather than restating docs/02 — all eleven ratios reproduce the measured table exactly. Register: Canadian Tax Foundation added (§4, R10 widened); Q30 closed — SML Company Ltd is federally incorporated under the CBCA, and the footer publishes neither that nor the place of business; Q31 closed — Plausible, on EU-only data residency (D15 amended). ROLE constants added for "Director of Firm Operations" and "active litigation exposure" so step 3 does not hand-type them. Lighthouse unavailability now stated in six places rather than left as a control that had silently stopped existing (§7, R11). Both review agents ran twice. The second pass found four defects in the first pass's fixes, including the minifier bug written back into its own fix and a colour-alone repair that used the banned gold-on- cream pairing at 2.10:1. Measured in headless Chrome at thirteen widths with a seventh nav item injected: 0 overflow, 0 tap targets under 44x44, 0 focus-order inversions, state indicators at 12.29:1, 755 words of body text with no JavaScript. Opened: Q32-Q37. Closed: Q30, Q31. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012XquaEq4BgWMCwUqLEyNkF
68 lines
2.7 KiB
JavaScript
68 lines
2.7 KiB
JavaScript
// ESLint 10 flat config. Scope is deliberately small: this project targets zero
|
|
// client JavaScript (CLAUDE.md, AGENTS.md §7), so the only JS/TS here is build
|
|
// configuration, site data, and the occasional island. Rules exist to catch
|
|
// mistakes, not to impose style — Prettier owns formatting.
|
|
//
|
|
// `typescript-eslint` is here because .astro frontmatter IS TypeScript, so the
|
|
// plugin cannot parse a single component without it. It runs unconfigured for
|
|
// type-awareness on purpose: `astro check` already does the type checking, and
|
|
// duplicating it here would be slower and would disagree at the edges.
|
|
|
|
import js from '@eslint/js';
|
|
import globals from 'globals';
|
|
import tseslint from 'typescript-eslint';
|
|
import astro from 'eslint-plugin-astro';
|
|
|
|
export default [
|
|
{ ignores: ['dist/**', 'node_modules/**', '.astro/**', 'docs/reference/**'] },
|
|
|
|
js.configs.recommended,
|
|
...tseslint.configs.recommended,
|
|
...astro.configs.recommended,
|
|
...astro.configs['flat/jsx-a11y-recommended'],
|
|
|
|
// `no-undef` off for TYPESCRIPT ONLY, on typescript-eslint's own advice: it
|
|
// has no type information, so every ambient global is a false positive —
|
|
// Astro declares `ImageMetadata`, `astroHTML.JSX` and friends globally, and
|
|
// .astro frontmatter IS TypeScript. tsc catches a real undefined reference,
|
|
// which is what `npm run check` is for.
|
|
//
|
|
// NOT applied to .js/.mjs. `tsconfig.json` sets `allowJs` without `checkJs`,
|
|
// so plain JS is not type-checked by anything — turning the rule off there
|
|
// meant a typo like `procss.env.X` in astro.config.mjs passed lint silently.
|
|
{
|
|
files: ['**/*.ts', '**/*.astro'],
|
|
rules: { 'no-undef': 'off' },
|
|
},
|
|
|
|
{
|
|
files: ['**/*.{js,mjs,ts}', '**/*.astro'],
|
|
languageOptions: {
|
|
ecmaVersion: 2023,
|
|
sourceType: 'module',
|
|
globals: { ...globals.browser, ...globals.node },
|
|
},
|
|
rules: {
|
|
// A stray console.log in a static build is dead weight shipped to nobody.
|
|
'no-console': ['warn', { allow: ['warn', 'error'] }],
|
|
|
|
// `role="list"` on a <ul> is redundant to a spec reader and load-bearing
|
|
// in a browser: Safari drops list semantics from any list styled
|
|
// `list-style: none`, so VoiceOver stops announcing "list, 6 items".
|
|
// src/styles/global.css keys its own reset off `ul[role='list']` for
|
|
// exactly this reason. The rule is right in general; this is the one
|
|
// documented exception, and it is scoped to that single pairing.
|
|
'astro/jsx-a11y/no-redundant-roles': [
|
|
'error',
|
|
{ ul: ['list'], ol: ['list'] },
|
|
],
|
|
eqeqeq: ['error', 'always'],
|
|
'prefer-const': 'error',
|
|
'@typescript-eslint/no-unused-vars': [
|
|
'error',
|
|
{ argsIgnorePattern: '^_' },
|
|
],
|
|
},
|
|
},
|
|
];
|