chore: add ESLint, Prettier, EditorConfig (permissive first pass)#73
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
eslint.config.jstypescript-eslintrules, plus a Node-context override for build/config scripts so globals likeprocess/__dirnamedon't false-positive..prettierrc.jsonall..prettierignoredist/,examples/dist/,node_modules/, lockfile, excludedcatalog/..editorconfigdevDependencies added
eslint,@eslint/js,typescript-eslint,prettier,globalsScripts added
npm run lint→eslint .npm run format:check→prettier --check .npm run format:write→prettier --write .Posture (intentionally permissive on this first pass)
@typescript-eslint/no-explicit-anyanyis widespread; surface but don't block@typescript-eslint/ban-ts-commentno-useless-escapeno-case-declarations@typescript-eslint/prefer-as-const@typescript-eslint/no-unused-vars_-prefix escape hatch)noUnusedLocals; this mirrors as warnVerification
npm run lintnpm run format:checknpm run buildWhat's deliberately NOT in this PR
prettier --writeacross the codebase produces a ~116-file diff that's a separate, much larger PR to review.npm run lintto 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
globalspackage 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