diff --git a/.husky/pre-commit b/.husky/pre-commit index 8bab5729a7..481b701881 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,7 +1,5 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" -pnpm run lintUi -pnpm run formatUi +npx lint-staged pnpm run lintPython -pnpm run formatPython diff --git a/lint-staged.config.js b/lint-staged.config.js new file mode 100644 index 0000000000..548cc2feb6 --- /dev/null +++ b/lint-staged.config.js @@ -0,0 +1,6 @@ +// eslint-disable-next-line no-undef +module.exports = { + "**/*.{js,jsx,ts,tsx}": ["npx prettier --write", "npx eslint --fix"], + "**/*.{ts,tsx}": [() => "tsc --skipLibCheck --noEmit"], + "**/*.py": ["black", "isort --profile=black"], +};