Skip to content

Commit d81c19f

Browse files
Add prettier commit hook (#2199)
<!-- Ensure the title clearly reflects what was changed. Provide a clear and concise description of the changes made. The PR should only contain the changes related to the issue, and no other unrelated changes. --> Fixes OPS-4067 --------- Co-authored-by: Marcelo Gonçalves <marcelo@openops.com>
1 parent dea9454 commit d81c19f

4 files changed

Lines changed: 14 additions & 8 deletions

File tree

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx lint-staged --verbose

.lintstagedrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"*.{ts,tsx,js,jsx,json,css,scss,md,html,yaml,yml}": "prettier --write"
3+
}

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
"version": "0.100.0",
44
"rcVersion": "0.100.0",
55
"scripts": {
6-
"prepare": "[ ! -e .env ] && cp -v .env.template .env || :",
6+
"setup:husky": "husky || true",
7+
"setup:env": "[ ! -e .env ] && cp -v .env.template .env || :",
8+
"prepare": "npm run setup:env && npm run setup:husky",
79
"serve:frontend": "nx serve react-ui",
810
"build:frontend": "nx build react-ui",
911
"serve:backend": "nx run server-api:serve:development",
@@ -391,7 +393,7 @@
391393
"eslint-plugin-testing-library": "6.2.2",
392394
"eslint-plugin-vitest": "0.5.4",
393395
"generate-license-file": "4.1.0",
394-
"husky": "8.0.3",
396+
"husky": "9.1.7",
395397
"i18next-parser": "9.0.2",
396398
"inquirer": "8.2.6",
397399
"jest": "29.7.0",

0 commit comments

Comments
 (0)