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
Some checks failed
Open PR on Staging / audit_and_check (pull_request) Failing after 28s
This commit is contained in:
parent
9906b5c2e6
commit
ebd392421e
@ -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 "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."
|
echo "If so, commit with -n to bypass the pre-commit hook."
|
||||||
exit 1
|
exit 1
|
||||||
else
|
|
||||||
npm run lint-staged
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
npm run lint-staged
|
||||||
|
@ -9,8 +9,10 @@
|
|||||||
"build": "tsc && vite build",
|
"build": "tsc && vite build",
|
||||||
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
"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: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: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:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,html,css,sass,less,yml,md,graphql}\"",
|
||||||
|
"formatter:staged": "prettier --write --ignore-unknown",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"preinstall": "git config core.hooksPath .git-hooks",
|
"preinstall": "git config core.hooksPath .git-hooks",
|
||||||
"license-checker": "node licenseChecker.cjs",
|
"license-checker": "node licenseChecker.cjs",
|
||||||
@ -74,8 +76,8 @@
|
|||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.{js,jsx,ts,tsx}": [
|
"*.{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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user