diff --git a/.markdownlint.jsonc b/.markdownlint.jsonc index 6aa71e823..51839ac9e 100644 --- a/.markdownlint.jsonc +++ b/.markdownlint.jsonc @@ -233,7 +233,7 @@ // MD048/code-fence-style - Code fence style "MD048": { - // Code fence syle + // Code fence style "style": "consistent" } } diff --git a/build/tasks/format/format-yaml.mts b/build/tasks/format/format-yaml.mts index ca20dee19..9ab7cc43c 100644 --- a/build/tasks/format/format-yaml.mts +++ b/build/tasks/format/format-yaml.mts @@ -12,6 +12,8 @@ const yamlFiles = await glob([ '**/*.yaml', '!_site/', '!node_modules/', + // Written by pnpm, not by hand. + '!pnpm-lock.yaml', ]); let exitCode = 0; diff --git a/build/tasks/verify/verify-spelling.mts b/build/tasks/verify/verify-spelling.mts index 1d510d0ef..1af811ee0 100644 --- a/build/tasks/verify/verify-spelling.mts +++ b/build/tasks/verify/verify-spelling.mts @@ -10,8 +10,14 @@ import { exec, glob, matched, quote } from '@openinf/portal/build/utils'; // Comments and template prose are read as often as the documentation is, and // cspell's `en` dictionary is the American one, so this is also what holds the // project to American spelling: a British variant is an unknown word to it. +// Named once rather than written twice. The glob and the complaint about it +// matching nothing were separate copies of this string, and they had already +// drifted apart by an extension. +const SPELLCHECKED = + '**/*.{md,html,liquid,scss,mts,mjs,json,json5,jsonc,yml,yaml,sh}'; + const files = await glob([ - '**/*.{md,html,liquid,scss,mts,mjs,json,yml,yaml,sh}', + SPELLCHECKED, '!node_modules/', '!_site/', '!.pnpm-store/', @@ -30,9 +36,6 @@ const files = await glob([ '!collections/_pages/vision.md', ]); -process.exitCode = matched( - files, - '**/*.{md,html,liquid,scss,mts,mjs,json,yml,yaml,sh}' -) +process.exitCode = matched(files, SPELLCHECKED) ? await exec(`cspell lint ${quote(files)}`) : 1; diff --git a/build/tasks/verify/verify-yaml.mts b/build/tasks/verify/verify-yaml.mts index 2f766fa57..1006cc492 100644 --- a/build/tasks/verify/verify-yaml.mts +++ b/build/tasks/verify/verify-yaml.mts @@ -12,6 +12,8 @@ const yamlFiles = await glob([ '**/*.yaml', '!_site/', '!node_modules/', + // Written by pnpm, not by hand. + '!pnpm-lock.yaml', ]); let exitCode = 0;