fix(ci): run lint-staged always, fix lint-stage commands
Some checks failed
Open PR on Staging / audit_and_check (pull_request) Failing after 28s

This commit is contained in:
enes 2024-08-06 17:17:39 +02:00
parent 9906b5c2e6
commit ebd392421e
2 changed files with 6 additions and 4 deletions

View File

@ -8,6 +8,6 @@ if [[ "$BRANCH" =~ $REGEX ]]; then
echo "You are on branch $BRANCH. Are you sure you want to commit to this branch?"
echo "If so, commit with -n to bypass the pre-commit hook."
exit 1
else
npm run lint-staged
fi
npm run lint-staged

View File

@ -9,8 +9,10 @@
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"lint:fix": "eslint . --fix --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"lint:staged": "eslint --fix --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"formatter:check": "prettier --check \"src/**/*.{ts,tsx,js,jsx,html,css,sass,less,yml,md,graphql}\"",
"formatter:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,html,css,sass,less,yml,md,graphql}\"",
"formatter:staged": "prettier --write --ignore-unknown",
"preview": "vite preview",
"preinstall": "git config core.hooksPath .git-hooks",
"license-checker": "node licenseChecker.cjs",
@ -74,8 +76,8 @@
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
"eslint . --ext ts,tsx --report-unused-disable-directives --quiet --max-warnings 0 --fix"
"npm run lint:staged"
],
"**/*": "prettier . --write --ignore-unknown"
"*.{ts,tsx,js,jsx,html,css,sass,less,yml,md,graphql}": "npm run formatter:staged"
}
}