Files
authentik/cspell.config.jsonc
Teffen Ellis 065170f2e6 root: switch cspell to typo-only reporting (#24701)
* root: switch cspell to typo-only reporting

cSpell's default mode reports every word it does not recognize, so each
new integration name or identifier needed a dictionary entry. Switch to
unknownWords: report-common-typos, which matches CodeSpell's behavior:
only known misspellings (reported with a suggested fix) and flagWords
fail the check.

Remove the per-topic dictionaries and word-shape ignore regexes this
makes unnecessary, fix the 18 typos the old allowlists were masking,
and document the new workflow.

Claude-Session: https://claude.ai/code/session_014ZuquWGxU5ReaXR5D3NmwW

* web/docs: fix style-loader-plugin path and wording in CSS architecture doc

Claude-Session: https://claude.ai/code/session_014ZuquWGxU5ReaXR5D3NmwW

* website: remove stray blank lines left by ignore-comment removal

Claude-Session: https://claude.ai/code/session_014ZuquWGxU5ReaXR5D3NmwW
2026-08-07 00:55:36 +00:00

257 lines
9.4 KiB
JSON

{
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/refs/heads/main/cspell.schema.json",
"name": "authentik-cspell",
"description": "authentik's monorepo spell checker configuration",
"version": "0.2",
"readonly": true,
"language": "en-US",
// Only report words that are known misspellings (with a suggested fix) or
// explicitly forbidden via `flagWords`. Unknown-but-plausible words — project
// jargon, identifiers, integration names — pass silently, so new terms do not
// require dictionary entries. This mirrors CodeSpell's behavior, which checks
// against a curated list of common misspellings rather than flagging every
// word absent from a dictionary.
"unknownWords": "report-common-typos",
"cache": {
"useCache": true,
"cacheLocation": "./.cspellcache",
"cacheStrategy": "content"
},
"reporters": [
"default",
[
"@cspell/cspell-json-reporter",
{
"outFile": "./cspell-report.json"
}
]
],
// In typo-only mode, a dictionary entry is needed only when a legitimate term
// collides with the common-misspellings list. Record such collisions here
// rather than reviving per-topic dictionary files.
"dictionaryDefinitions": [
{
"name": "en-x-authentik-overrides",
"path": "./locale/en/dictionaries/overrides.txt",
"description": "Legitimate terms that collide with the common-misspellings list",
"addWords": true
}
],
"dictionaries": ["en-x-authentik-overrides"],
// British spellings to reject in favor of American variants. The `->` form
// forbids the left word and offers the right word as the suggested fix.
"flagWords": [
// -our -> -or
"colour->color",
"colours->colors",
"coloured->colored",
"colouring->coloring",
"behaviour->behavior",
"behaviours->behaviors",
"favour->favor",
"favourite->favorite",
"favourites->favorites",
"flavour->flavor",
"flavours->flavors",
"honour->honor",
"labour->labor",
"neighbour->neighbor",
"neighbours->neighbors",
// -ise/-isation -> -ize/-ization
"organise->organize",
"organised->organized",
"organising->organizing",
"organisation->organization",
"initialise->initialize",
"initialised->initialized",
"initialising->initializing",
"initialisation->initialization",
"authorise->authorize",
"authorised->authorized",
"authorisation->authorization",
"customise->customize",
"customised->customized",
"customisation->customization",
"serialise->serialize",
"serialised->serialized",
"deserialise->deserialize",
"deserialised->deserialized",
"normalise->normalize",
"normalised->normalized",
"normalisation->normalization",
"synchronise->synchronize",
"synchronised->synchronized",
"optimise->optimize",
"optimised->optimized",
"optimisation->optimization",
"recognise->recognize",
"recognised->recognized",
"specialise->specialize",
"prioritise->prioritize",
"prioritised->prioritized",
"summarise->summarize",
"summarised->summarized",
"minimise->minimize",
"maximise->maximize",
"utilise->utilize",
"finalise->finalize",
"finalised->finalized",
// -yse -> -yze
"analyse->analyze",
"analysed->analyzed",
"analysing->analyzing",
// -re -> -er
"centre->center",
"centres->centers",
"centred->centered",
// -ce -> -se and misc
"licence->license",
"defence->defense",
"catalogue->catalog",
"dialogue->dialog",
"programme->program",
"grey->gray",
"artefact->artifact",
"artefacts->artifacts"
],
"patterns": [
{
"name": "EncodedURI",
"description": "Encoded URIs, which are common in authentik's codebase and often contain many false positives.",
"pattern": "[a-zA-Z]+%3A%2F%2F.+"
}
],
// Only content-scoping patterns belong here (encoded blobs, upstream
// identifiers spelled the British way) — not word allowlists. Unknown words
// are no longer reported, so shape-of-word escapes are unnecessary.
"ignoreRegExpList": [
// Encoded URIs
"EncodedURI",
// Basic auth header
"Basic [a-zA-Z0-9+/=]+",
// PatternFly's grey label modifier is spelled the British way upstream.
"pf-m-grey",
// lit-analyzer's CLI and its build phase are spelled the British way upstream.
"analyse-phase",
"lit-analyse"
],
"languageSettings": [
{
"languageId": "markdown,mdx",
"ignoreRegExpList": [
// Fenced code blocks
"/^\\s*```[\\s\\S]*?^\\s*```/gm",
// Markdown inline codeblocks
"`[^`\\s]+`",
"`\\w+[^`]*?\\w+`"
]
},
{
"languageId": "typescript,javascript,typescriptreact,javascriptreact,mdx,astro",
"ignoreRegExpList": [
"js-hex-escape",
"js-unicode-escape",
"js-regexp-flags",
"js-hex-number"
]
},
{
"languageId": "python",
"includeRegExpList": ["comments"]
},
{
"languageId": "css,scss",
"ignoreRegExpList": [
// data URIs, which are common in CSS and often contain many false positives.
"data:.+"
]
}
],
"ignorePaths": [
//#region i18n
"{cspell.*,cSpell.*,.cspell.*,cspell.config.*}", // CSpell configuration files
"cspell-report.{json,html,txt}", // CSpell report files
"dictionaries", // Custom dictionary files
"./locale", // Locale files (Django, CSpell)
"web/xliff", // XLIFF translation files
"web/src/locales", // Generated TypeScript locale
//#endregion
//#region Monorepo
"CODEOWNERS", // GitHub code owners file
"LICENSE", // License file
".gitignore", // Git ignore file
".gitattributes", // Git attributes file
"*-lock.{json,yaml}", // Lock files (NPM, Yarn, Pnpm, Pip, Cargo)
"pnpm-workspace.yaml", // PNPM workspace + override config
"CHANGELOG*.md", // Changelog files
".vscode/**", // VSCode configuration
"out", // TypeScript type-checking output
"dist", // Distributed build output
"coverage/**", // Coverage output
".env", // Environment files
"*.tsbuildinfo", // TypeScript build info
"schema.yml", // OpenAPI schema
"./blueprints/schema.json", // Generated blueprint schema
"custom-elements.json", // TypeScript custom element definitions
"./packages/client-go", // Generated API Client
"./packages/client-rust/src", // Generated API Client
"./packages/client-ts/src", // Generated API Client
"./schemas/**", // XML Schemas
"./authentik/sources/**/schemas", // Source schemas
"**vendored**", // Vendored files
"fixtures", // Test fixtures
"tests/e2e/**/*.php", // PHP fixtures
"compose.yml", // Docker Compose files
//#region JavaScript/TypeScript
".eslintignore", // ESLint ignore file
".prettierignore", // Prettier ignore file
".yarn", // Yarn cache and configuration
"node_modules", // Node modules
"playwright-report", // Playwright test output
"package.json", // Package manifest file
"storybook-static", // Storybook build output
"sampleData.{js,ts}", // Storybook sample data files
"*.stories.{ts,tsx}", // Storybook stories
"*.min.{js,css}", // Minified JS and CSS files
"*.min.{js,css}.map", // Source maps for minified files
"./web/src/styles/global/vendor/patternfly-fa-icons.css", // Tokens in comments
//#region Python
"pyproject.toml",
"unittest.xml", // Pytest output
".venv", // Python virtual environment
"venv", // Python virtual environment
"./lifecycle",
"blueprints",
"mds",
//#endregion
//#region Rust
"./target", // Rust compilation artifacts
//#endregion
//#region Docusaurus
"*.api.mdx", // Generated API docs
".docusaurus/**", // Cache
"./{docs,website}/build", // Topic docs build output
"./{docs,website}/**/build", // Workspaces output
"_redirects", // Redirects file
"_headers", // Headers file
//#endregion
//#region Golang
"go.mod", // Go module file
"go.sum", // Go module file
"htmlcov", // Coverage HTML output
"coverage.txt", // Coverage text output
//#endregion
//#region Media/Static
"./data", // Media files
"./media", // Legacy media files
"*.{png,jpg,pdf,svg}", // Binary files
"*dashboard.json" // Dashboards
//#endregion
],
"useGitignore": true,
"features": {
"weighted-suggestions": true
},
"failFast": false
}