Skip to content

Build your personal knowledge base with Trilium Notes

fix(lint): stop ESLint running out of memory on build artifacts

Elian Doran72182bc25f9b
diff --git a/eslint.config.mjs b/eslint.config.mjs
index a2f5cc84e6..4b6230b487 100644
--- a/eslint.config.mjs
+++ b/eslint.config.mjs
@@ -117,6 +117,17 @@ export default defineConfig(
"apps/edit-docs/demo/*",
"docs/*",
"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
"packages/*",
]),
diff --git a/eslint.format.config.mjs b/eslint.format.config.mjs
index b9591c3d37..0c95e71aff 100644
--- a/eslint.format.config.mjs
+++ b/eslint.format.config.mjs
@@ -30,7 +30,24 @@ export default defineConfig(
"**/out-tsc",
"apps/edit-docs/demo/*",
"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/**"
]),
{