Cross-language coding standard (K22-CODE-01..26) adopted from Kingsrook's QQQ CODE_STYLE.md, with profiles for C#/.NET, Java, TypeScript, Python, Rust, Go, Swift, Shell/PowerShell, and Terraform, and the files each IDE and tool imports: IntelliJ scheme, copyright profile and live templates, Checkstyle, Eclipse formatter, .editorconfig, Directory.Build.props, ESLint Stylistic, ruff, rustfmt/clippy/cargo-deny, golangci-lint, swift-format/SwiftLint, ShellCheck, PSScriptAnalyzer, TFLint, sqlfluff, VS Code. Kingsrook files keep their Apache-2.0 notice (NOTICE). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: James Maes <james@kof22.com>
TypeScript / JavaScript
Implements the TypeScript profile.
| File | Copy to | Purpose |
|---|---|---|
eslint.config.mjs |
repository root | ESLint flat config: typescript-eslint strictTypeChecked + ESLint Stylistic for the Kingsrook layout (3-space indent, Allman braces, if() |
tsconfig.json |
tsconfig.k22.json, extended by the project's tsconfig.json |
Strict compiler baseline |
Install
npm i -D eslint @eslint/js typescript-eslint @stylistic/eslint-plugin typescript
TypeScript resolves to the newest version typescript-eslint supports (6.x in October 2026; TypeScript 7 once typescript-eslint adds support).
Use
| Where | Command |
|---|---|
| Fix layout and lint | npx eslint . --fix |
| CI | npx eslint . --max-warnings 0 and npx tsc --noEmit |
Add "lint": "eslint . --max-warnings 0" and "typecheck": "tsc --noEmit" to
package.json scripts.
IDEs
- VS Code: ESLint extension as the formatter; see
../vscode. - WebStorm / IntelliJ: Settings → Languages & Frameworks → JavaScript → Code
Quality Tools → ESLint → Automatic ESLint configuration and Run eslint --fix on
save. The Kingsrook IntelliJ scheme (
../intellij) already sets TypeScript and JavaScript to 3-space indentation and next-line braces. - Do not use Prettier: it cannot produce next-line braces and would fight ESLint.
Verified
ESLint 10.12.0, typescript-eslint 8.71.1, @stylistic/eslint-plugin 5.10.0, TypeScript
6.0.3: a Kingsrook-style class passes; a file with same-line braces, 4-space indentation,
if (, missing semicolons, ==, console.log, and no return type fails on each.