-
-
Notifications
You must be signed in to change notification settings - Fork 6
perf: speed up monorepo linting and formatting #792
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,3 +32,6 @@ yarn-error.log* | |
| .vercel | ||
| # next-agents-md | ||
| .next-docs/ | ||
|
|
||
| # Tool caches | ||
| .cache | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,8 +24,8 @@ const paths = (root: string) => ({ | |
| * Shared blocks | ||
| */ | ||
| const eslintScripts = { | ||
| lint: "eslint .", | ||
| "lint:fix": "eslint . --fix", | ||
| lint: "eslint . --cache --cache-location .cache/eslint --cache-strategy content --concurrency auto", | ||
| "lint:fix": "eslint . --fix --cache --cache-location .cache/eslint --cache-strategy content --concurrency auto", | ||
| }; | ||
| const i18nScripts = { | ||
| "i18n:create": "vitnode i18n:create", | ||
|
|
@@ -69,6 +69,8 @@ export const rootScripts = ( | |
| "i18n:update": "turbo i18n:update", | ||
| "i18n:update:ai": "turbo i18n:update:ai", | ||
| ...withIf(enableEslint, { | ||
| format: "prettier . --write --cache --cache-location .cache/prettier", | ||
| "format:check": "prettier . --check --cache --cache-location .cache/prettier", | ||
|
Comment on lines
+72
to
+73
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When Useful? React with 👍 / 👎. |
||
| lint: "turbo lint", | ||
| "lint:fix": "turbo lint:fix", | ||
| }), | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mirror this ignore in the scaffold templates. The checked
root,api, andmonorepo.gitignore_templatefiles contain no.cachepattern, while the newly generated lint and format scripts write under.cache/eslintand.cache/prettier(ESLint's--helpdefines--cache-locationas the cache file or directory path). Consequently, running either command in a newly scaffolded project immediately leaves generated cache artifacts ingit status.Useful? React with 👍 / 👎.