Skip to content

chore: add ESLint, Prettier, EditorConfig (permissive first pass)#73

Merged
aka-blackboots merged 1 commit into
mainfrom
chore/add-lint-format-config
May 4, 2026
Merged

chore: add ESLint, Prettier, EditorConfig (permissive first pass)#73
aka-blackboots merged 1 commit into
mainfrom
chore/add-lint-format-config

Conversation

@aka-blackboots
Copy link
Copy Markdown
Contributor

Summary

Adds tooling configuration so contributors can run lint and format locally on demand. No auto-fix run yet, no CI integration yet — those are deliberately separate follow-up PRs to keep this one reviewable.

Files added

File Purpose
eslint.config.js Flat config. Recommended JS + typescript-eslint rules, plus a Node-context override for build/config scripts so globals like process / __dirname don't false-positive.
.prettierrc.json 100-col, semi, single-quote, trailing-comma all.
.prettierignore dist/, examples/dist/, node_modules/, lockfile, excluded catalog/.
.editorconfig 2-space indent, LF line endings, UTF-8, trim trailing whitespace.

devDependencies added

eslint, @eslint/js, typescript-eslint, prettier, globals

Scripts added

  • npm run linteslint .
  • npm run format:checkprettier --check .
  • npm run format:writeprettier --write .

Posture (intentionally permissive on this first pass)

Rule Setting Why
@typescript-eslint/no-explicit-any warn any is widespread; surface but don't block
@typescript-eslint/ban-ts-comment warn Door/Window cluster has 18+ ignores (tracked separately)
no-useless-escape warn Purely stylistic
no-case-declarations warn 3 sites; cleanup later
@typescript-eslint/prefer-as-const warn 2 sites; cleanup later
@typescript-eslint/no-unused-vars warn (with _-prefix escape hatch) TypeScript already enforces unused locals via noUnusedLocals; this mirrors as warn

Verification

Command Result
npm run lint exit 0, 54 warnings, 0 errors
npm run format:check exit 1, 116 files differ — expected; this is the auto-fix follow-up PR's scope
npm run build green

What's deliberately NOT in this PR

  • No auto-fix run. Running prettier --write across the codebase produces a ~116-file diff that's a separate, much larger PR to review.
  • No CI integration of lint/format. Adding npm run lint to CI right now would gate every PR on warnings the team hasn't agreed to enforce. After the auto-fix lands and the rule posture is tightened, lint goes into CI.

Notes

  • globals package was added to feed Node and browser globals into the flat config. It's a well-known peer of typescript-eslint.

🤖 Generated with Claude Code

Adds tooling configuration so contributors can run lint and format
locally on demand. No auto-fix run yet, no CI integration yet — those
are deliberately separate follow-up PRs to keep this one reviewable.

Files added:
- eslint.config.js — flat config; recommended JS + typescript-eslint
  rules, plus a Node-context override for build/config scripts so
  globals like process and __dirname don't false-positive
- .prettierrc.json — 100-col, semi, single-quote, trailing-comma all
- .prettierignore — dist/, examples/dist/, node_modules/, lockfile,
  excluded catalog/
- .editorconfig — 2-space, LF, UTF-8, trim trailing whitespace

devDependencies added: eslint, @eslint/js, typescript-eslint,
prettier, globals.

Scripts added:
- lint        → eslint .
- format:check → prettier --check .
- format:write → prettier --write .

Posture is intentionally permissive on this pass:
- @typescript-eslint/no-explicit-any   → warn (widespread)
- @typescript-eslint/ban-ts-comment    → warn (debt #10 cluster)
- no-useless-escape                    → warn (stylistic)
- no-case-declarations                 → warn (3 sites; cleanup later)
- @typescript-eslint/prefer-as-const   → warn (2 sites; cleanup later)
- @typescript-eslint/no-unused-vars    → warn with _-prefix escape

Result on this commit:
- npm run lint         → exit 0, 54 warnings, 0 errors
- npm run format:check → exit 1, 116 files (auto-fix is a follow-up)
- npm run build        → still green
@aka-blackboots aka-blackboots merged commit 5a59b35 into main May 4, 2026
@aka-blackboots aka-blackboots deleted the chore/add-lint-format-config branch May 4, 2026 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant