chore: remove useless script, can use HUSKY=0
This commit is contained in:
@@ -67,7 +67,7 @@
|
||||
"docker:stop": "docker compose -f packages/plugin-cloud-storage/docker-compose.yml down",
|
||||
"force:build": "pnpm run build:core:force",
|
||||
"lint": "turbo run lint --concurrency 1 --continue",
|
||||
"lint-staged": "node ./scripts/run-lint-staged.js",
|
||||
"lint-staged": "lint-staged",
|
||||
"lint:fix": "turbo run lint:fix --concurrency 1 --continue",
|
||||
"obliterate-playwright-cache-macos": "rm -rf ~/Library/Caches/ms-playwright && find /System/Volumes/Data/private/var/folders -type d -name 'playwright*' -exec rm -rf {} +",
|
||||
"prepare": "husky",
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
// run-lint-staged.js
|
||||
|
||||
;(async () => {
|
||||
// Check if DISABLE_HUSKY environment variable is set to "true"
|
||||
if (process.env.DISABLE_HUSKY === 'true') {
|
||||
console.log('Husky is disabled, skipping lint-staged.')
|
||||
process.exit(0)
|
||||
}
|
||||
|
||||
try {
|
||||
// Dynamically import execa to handle compatibility with ESM
|
||||
const execa = await import('execa')
|
||||
console.log('Running lint-staged...')
|
||||
|
||||
// Run lint-staged with quiet mode
|
||||
await execa.default('lint-staged', ['--quiet'], { stdio: 'inherit' })
|
||||
} catch (error) {
|
||||
console.error('Failed to run lint-staged:', error)
|
||||
process.exit(1)
|
||||
}
|
||||
})()
|
||||
Reference in New Issue
Block a user