Skip to content

chore(lint): adopt eslint-config-codex 2.x - #674

Open
Reversean wants to merge 2 commits into
masterfrom
chore/eslint-indent
Open

chore(lint): adopt eslint-config-codex 2.x#674
Reversean wants to merge 2 commits into
masterfrom
chore/eslint-indent

Conversation

@Reversean

@Reversean Reversean commented Aug 3, 2026

Copy link
Copy Markdown
Member

eslint-config-codex 1.x carries one indentation rule — ESLint's base indent,
which cannot see TypeScript syntax. Indentation inside TS constructs was never
checked, which is how a four-space class body in src/integrations/vercel-ai
survived unnoticed. 2.x replaces it with @stylistic/indent.

What this drags along

2.x ships flat config only, so .eslintrc.js becomes eslint.config.mjs, and
eslint and typescript move up to the highest versions the new constraints
allow. tsconfig.json drops baseUrl, which TypeScript 7 removes; paths gains
the leading ./ it then requires.

tsc --noEmit is clean and yarn build passes on TypeScript 6.

Three eslint-plugin-n rules are disabled by hand: one resolves imports the way
Node does and reports existing .ts files as missing, two demand
require('process') over the global. Together they accounted for 361 of 366
n/* reports.

No fixes are applied

src/ is untouched — this PR only swaps the configuration, so the reformatting
diff can be reviewed separately. Running the linter today gives:

2847 problems (2527 errors), 1024 auto-fixable
1207 jsdoc/*
1206 @typescript-eslint/*
88 @stylistic/indent — the rule this started over

That gap is the thing to decide on. Adopting the org config surfaces a large
amount of pre-existing debt that has nothing to do with indentation, and CI
turns red until it is dealt with. Splitting it — autofix first, then the rest by
rule family — is the obvious follow-up, but it is real work, not a formality.

@Reversean
Reversean marked this pull request as draft August 3, 2026 07:56
1.x checks indentation with ESLint's base `indent` rule, which cannot
see TypeScript syntax. Indentation inside TS constructs was therefore
never checked at all. 2.x uses @stylistic/indent, which reads it.

2.x ships flat config only, so .eslintrc.js becomes eslint.config.mjs,
and eslint and typescript move up to satisfy it. tsconfig drops
baseUrl on the way, since TypeScript 7 removes it.

eslint-plugin-n rules are disabled where they resolve imports as Node
does and report existing .ts files as missing.

Applying the fixes is left for a separate commit; src/ is untouched.
@Reversean
Reversean force-pushed the chore/eslint-indent branch from ec7e6fb to 92eda13 Compare August 3, 2026 10:18
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Thanks for adding a description — the PR is now marked as Ready for Review.

@github-actions
github-actions Bot marked this pull request as ready for review August 3, 2026 10:18
@Reversean Reversean changed the title chore(lint): check indentation in TypeScript-only syntax chore(lint): adopt eslint-config-codex 2.x Aug 3, 2026
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