// lint-staged.js const { execSync } = require("child_process"); const files = process.argv .slice(2) .filter((f) => /^src\/.*\.(js|jsx|ts|tsx)$/.test(f)); if (files.length) { execSync(`yarn eslint ${files.join(" ")}`, { stdio: "inherit" }); }