Skip to content

chore: ESLint 10 flat config and Prettier 3 - #60

Open
jrhender wants to merge 2 commits into
chore/ts5-nestjs11-jest30from
chore/eslint9-prettier3
Open

chore: ESLint 10 flat config and Prettier 3#60
jrhender wants to merge 2 commits into
chore/ts5-nestjs11-jest30from
chore/eslint9-prettier3

Conversation

@jrhender

@jrhender jrhender commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Third of five stacked PRs for #57 (stacked on #59).

  • Replaces the four legacy .eslintrc.js files (extending the unmaintained @energyweb/eslint-config, last published 2024) with a single root eslint.config.mjs flat config: @eslint/js recommended + typescript-eslint v8 recommended + eslint-config-prettier + eslint-plugin-no-only-tests, node/jest globals, projectService for type-aware rules. ESLint 10 directly (typescript-eslint v8 supports it) instead of stopping at v9.
  • Linting is centralized: pnpm run lint at the root lints the whole repo; per-package lint scripts and lint devDependencies are removed.
  • Rule parity: @typescript-eslint/no-floating-promises stays an error; no-explicit-any stays a warning (v8 recommended escalated it — the ~20 existing usages are unchanged and can be typed later).
  • Fixes the real findings the new setup surfaced: unused imports/params, a dead test helper, and the OpenAPI script's unhandled top-level promise.
  • Prettier 2 → 3 with the @energyweb/prettier-config settings inlined (singleQuote, proseWrap: never) plus the existing overrides; trailingComma: 'none' is now explicit (Prettier 3 default changed to all). pretty-quick 4 for the pre-commit hook; .prettierignore rewritten for the post-Rush layout.
  • The mechanical reformat is an isolated second commit for reviewability (6 files, whitespace-level).

Verification

  • pnpm run lint: 0 errors (21 deliberate any warnings); build and tests pass after the reformat

Part of #57

🤖 Generated with Claude Code

@jrhender
jrhender force-pushed the chore/ts5-nestjs11-jest30 branch from a7d0da9 to 5d25207 Compare July 3, 2026 13:18
@jrhender
jrhender force-pushed the chore/eslint9-prettier3 branch from 3b567c3 to e8fcf8a Compare July 3, 2026 13:18
jrhender and others added 2 commits July 3, 2026 09:38
- Replace the four legacy .eslintrc.js files (which extended the
  unmaintained @energyweb/eslint-config) with a single root
  eslint.config.mjs flat config: @eslint/js recommended +
  typescript-eslint v8 recommended + eslint-config-prettier +
  eslint-plugin-no-only-tests, node/jest globals, projectService for
  type-aware rules. Linting is centralized: 'pnpm run lint' at the root
  lints the whole repo (per-package lint scripts removed).
- Rule parity kept: @typescript-eslint/no-floating-promises stays an
  error; no-explicit-any stays a warning (v8 recommended escalated it
  to an error - existing usages are unchanged and can be typed later).
- Fix the real findings the new setup surfaced: unused imports/params
  and a dead test helper; the OpenAPI script's top-level promise is now
  explicitly void.
- Prettier 2 -> 3 with settings inlined from @energyweb/prettier-config
  (singleQuote, proseWrap: never) plus the existing repo overrides;
  trailingComma: 'none' is now explicit since Prettier 3 changed the
  default to 'all'. pretty-quick 4 for the pre-commit hook.
- .prettierignore rewritten for the post-Rush layout.

The code reformat from Prettier 3 lands in the next commit to keep
this one reviewable.

Part of #57

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: John Henderson <jrhender@users.noreply.github.com>
Mechanical output of 'prettier --write .' with the settings carried
over from Prettier 2 - no functional changes.

Part of #57

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: John Henderson <jrhender@users.noreply.github.com>
@jrhender
jrhender force-pushed the chore/eslint9-prettier3 branch from e8fcf8a to fe6237b Compare July 3, 2026 13:39
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