mirror of
https://github.com/zadam/trilium.git
synced 2026-09-12 19:50:20 +05:00
fix(lint): stop ESLint running out of memory on build artifacts
`cap sync` copies the whole standalone bundle into the native mobile
projects, and those copies are gitignored but sit outside a `dist`, so
the ignore lists missed them. They accounted for 187 MB of the 204 MB
that `dev:format-check` was parsing — including three copies each of
Spreadsheet (5.6 MB), typescript (3.5 MB) and pdf.worker (2.4 MB).
Feeding minified single-line bundles to @stylistic/indent and max-len
exhausted the default heap, so the run only ever died once you had built
for mobile. Nothing tracked under apps/mobile/{android,ios} is lintable,
so excluding them costs no coverage.
Peak RSS drops from 2.0 GB to 634 MB and the run finishes in 26 s.
Also excludes vendored third-party code from the format config, which is
a hazard rather than just noise: `dev:format-fix` would have reformatted
the pdf.js viewer, breaking both vendored_viewer.spec.ts and the patch
matching in update-viewer.ts.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
a072f1a4d3
commit
72182bc25f
@ -117,6 +117,17 @@ export default defineConfig(
|
|||||||
"apps/edit-docs/demo/*",
|
"apps/edit-docs/demo/*",
|
||||||
"docs/*",
|
"docs/*",
|
||||||
"apps/web-clipper/lib/*",
|
"apps/web-clipper/lib/*",
|
||||||
|
// Build output that is gitignored but sits outside a `dist`, so it would otherwise be
|
||||||
|
// linted. `cap sync` copies the whole standalone bundle into the native projects, which
|
||||||
|
// adds ~165 MB of minified JS and makes ESLint run out of memory.
|
||||||
|
"apps/mobile/android/**",
|
||||||
|
"apps/mobile/ios/**",
|
||||||
|
"apps/*/out/**",
|
||||||
|
"apps/web-clipper/.output/**",
|
||||||
|
"site/**",
|
||||||
|
"**/test-output/**",
|
||||||
|
// A worktree here is a full second copy of the repository.
|
||||||
|
".claude/worktrees/**",
|
||||||
// TODO: check if we want to format packages here as well - for now skipping it
|
// TODO: check if we want to format packages here as well - for now skipping it
|
||||||
"packages/*",
|
"packages/*",
|
||||||
]),
|
]),
|
||||||
|
|||||||
@ -30,7 +30,24 @@ export default defineConfig(
|
|||||||
"**/out-tsc",
|
"**/out-tsc",
|
||||||
"apps/edit-docs/demo/*",
|
"apps/edit-docs/demo/*",
|
||||||
"docs/*",
|
"docs/*",
|
||||||
"apps/web-clipper/lib/*"
|
"apps/web-clipper/lib/*",
|
||||||
|
// Build output that is gitignored but sits outside a `dist`, so it would otherwise be
|
||||||
|
// linted. `cap sync` copies the whole standalone bundle into the native projects, which
|
||||||
|
// adds ~165 MB of minified JS and makes ESLint run out of memory.
|
||||||
|
"apps/mobile/android/**",
|
||||||
|
"apps/mobile/ios/**",
|
||||||
|
"apps/*/out/**",
|
||||||
|
"apps/web-clipper/.output/**",
|
||||||
|
"site/**",
|
||||||
|
"**/test-output/**",
|
||||||
|
"apps/web-clipper/.wxt/**",
|
||||||
|
// Vendored third-party code. `--fix` must never touch these: the pdf.js viewer is
|
||||||
|
// re-vendored verbatim from an upstream release, and `update-viewer.ts` locates our
|
||||||
|
// patches by matching upstream markup.
|
||||||
|
"packages/pdfjs-viewer/viewer/**",
|
||||||
|
"packages/splitjs/test/lib/**",
|
||||||
|
// A worktree here is a full second copy of the repository.
|
||||||
|
".claude/worktrees/**"
|
||||||
]),
|
]),
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user