diff --git a/frontend/lint-staged.js b/frontend/lint-staged.js index 491fc1de..824d4423 100644 --- a/frontend/lint-staged.js +++ b/frontend/lint-staged.js @@ -1,8 +1,18 @@ // lint-staged.js const { execSync } = require("child_process"); -const files = process.argv - .slice(2) - .filter((f) => /^src\/.*\.(js|jsx|ts|tsx)$/.test(f)); +const allFilesMode = process.argv.includes("--all-files"); +let files; + +if (allFilesMode) { + // Lint all frontend files + files = ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx"]; +} else { + // Only lint staged files + files = process.argv + .slice(2) + .filter((f) => /^src\/.*\.(js|jsx|ts|tsx)$/.test(f)); +} + if (files.length) { execSync(`yarn eslint ${files.join(" ")}`, { stdio: "inherit" }); } diff --git a/noxfile.py b/noxfile.py index 86a243eb..cbdc158d 100644 --- a/noxfile.py +++ b/noxfile.py @@ -3,12 +3,9 @@ Run with `nox -s ` from the project root. """ -import os - import nox from nox_poetry import Session - python_versions = ["3.13"] @@ -40,9 +37,6 @@ def precommit(session: Session) -> None: "pyupgrade", ) session.run("pre-commit", *args) - # Run frontend lint using yarn lint - os.chdir("frontend") - session.run("yarn", "lint", external=True) backend_sessions = [