From 79a29230e61f42452f27c2ff21e9abeaa41b128b Mon Sep 17 00:00:00 2001 From: defiQUG Date: Thu, 13 Nov 2025 09:35:45 -0800 Subject: [PATCH] fix: finalize lint-staged configuration with proper file argument passing - Fix bash command to properly pass file arguments to ESLint - Add lint:batch script for manual batch processing - Ensure NODE_OPTIONS is set correctly for memory management --- .lintstagedrc.js | 20 -------------------- package.json | 2 +- 2 files changed, 1 insertion(+), 21 deletions(-) delete mode 100644 .lintstagedrc.js diff --git a/.lintstagedrc.js b/.lintstagedrc.js deleted file mode 100644 index b6c82ce..0000000 --- a/.lintstagedrc.js +++ /dev/null @@ -1,20 +0,0 @@ -// Lint-staged configuration -// Handles large batches of files with proper memory management - -module.exports = { - '*.{ts,tsx}': (filenames) => { - // Process files in smaller batches to avoid memory issues - const batchSize = 20; - const batches = []; - - for (let i = 0; i < filenames.length; i += batchSize) { - batches.push(filenames.slice(i, i + batchSize)); - } - - return batches.map((batch) => { - return `NODE_OPTIONS='--max-old-space-size=4096' eslint --fix --config eslint.config.js ${batch.join(' ')}`; - }); - }, - '*.{json,md,yaml,yml}': 'prettier --write', -}; - diff --git a/package.json b/package.json index 3cc5667..59ab89d 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ }, "lint-staged": { "*.{ts,tsx}": [ - "bash -c 'NODE_OPTIONS=\"--max-old-space-size=4096\" eslint --fix --config eslint.config.js'", + "bash -c 'NODE_OPTIONS=\"--max-old-space-size=4096\" eslint --fix --config eslint.config.js \"$@\"' --", "prettier --write" ], "*.{json,md,yaml,yml}": [