Skip to content

perf: speed up monorepo linting and formatting - #792

Closed
aXenDeveloper wants to merge 1 commit into
canaryfrom
codex/fast-lint-formatting
Closed

perf: speed up monorepo linting and formatting#792
aXenDeveloper wants to merge 1 commit into
canaryfrom
codex/fast-lint-formatting

Conversation

@aXenDeveloper

Copy link
Copy Markdown
Owner

Summary

  • stop running Prettier through eslint-plugin-prettier in every ESLint process
  • keep eslint-config-prettier/flat so ESLint rules do not conflict with Prettier
  • cache ESLint results per workspace using content hashing and enable ESLint worker concurrency
  • cache Prettier's explicit formatting commands
  • cache only the read-only lint Turbo task; leave lint:fix uncached because it mutates source files
  • apply the same scripts and Turbo configuration to the VitNode app generator

Validation

  • verified the updated Turbo configuration and package manifests parse as JSON
  • ran pnpm --filter api lint: the updated ESLint command starts and loads the shared config; it then reports 5 existing type-aware errors in apps/api/src/index.ts
  • ran pnpm format:check: the repository already has existing Prettier differences, so it is not yet suitable as a CI gate

The new root format / format:check commands are explicit; lint:fix remains lint-only and no longer triggers a repository-wide formatting rewrite.

@vercel

vercel Bot commented Sep 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
vitnode-prod Ready Ready Preview Sep 6, 2026 4:28pm UTC

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3db9d3376c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +72 to +73
format: "prettier . --write --cache --cache-location .cache/prettier",
"format:check": "prettier . --check --cache --cache-location .cache/prettier",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add formatting commands to standalone scaffolds

When singleApp or onlyApi is generated without --monorepo, createPackageJSON never uses rootScripts; it writes singleAppScripts or apiScripts, which only receive the new ESLint-only scripts. Because the shared ESLint configuration no longer invokes Prettier, these generated projects now have neither a formatting command nor a formatting check, and their former lint:fix workflow no longer formats files. Add the explicit Prettier scripts to the standalone script sets as well.

Useful? React with 👍 / 👎.

Comment thread .gitignore
Comment on lines +36 to +37
# Tool caches
.cache

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Ignore tool caches in generated projects

Mirror this ignore in the scaffold templates. The checked root, api, and monorepo .gitignore_template files contain no .cache pattern, while the newly generated lint and format scripts write under .cache/eslint and .cache/prettier (ESLint's --help defines --cache-location as the cache file or directory path). Consequently, running either command in a newly scaffolded project immediately leaves generated cache artifacts in git status.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🚀 Performerce Improves performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant