Refactor store_message function and add Simple Git Hooks (#1827)

This pull request adds Simple Git Hooks for better code quality and
consistency. It also updates the pre-commit-config.yaml and Makefile,
and refactors the pre-commit installation in the Makefile. Additionally,
the update_poetry.sh script is refactored to not install pipx anymore.
This commit is contained in:
Cristhian Zanforlin Lousa 2024-05-02 18:35:08 -03:00 • committed by GitHub
commit 0ce2853f4c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 134 additions and 87 deletions

View file

@ -99,6 +99,7 @@
"prettier-plugin-organize-imports": "^3.2.3",
"prettier-plugin-tailwindcss": "^0.3.0",
"pretty-quick": "^3.1.3",
"simple-git-hooks": "^2.11.1",
"tailwindcss": "^3.3.3",
"tailwindcss-dotted-background": "^1.1.0",
"typescript": "^5.2.2",
@ -11917,6 +11918,16 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/simple-git-hooks": {
"version": "2.11.1",
"resolved": "https://registry.npmjs.org/simple-git-hooks/-/simple-git-hooks-2.11.1.tgz",
"integrity": "sha512-tgqwPUMDcNDhuf1Xf6KTUsyeqGdgKMhzaH4PAZZuzguOgTl5uuyeYe/8mWgAr6IBxB5V06uqEf6Dy37gIWDtDg==",
"dev": true,
"hasInstallScript": true,
"bin": {
"simple-git-hooks": "cli.js"
}
},
"node_modules/sisteransi": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz",

View file

@ -78,6 +78,9 @@
"format": "npx prettier --write \"./**/*.{js,jsx,ts,tsx,json,md}\" --ignore-path .prettierignore",
"type-check": "tsc --noEmit --pretty --project tsconfig.json && vite"
},
"simple-git-hooks": {
"pre-commit": "npx pretty-quick --staged"
},
"eslintConfig": {
"extends": [
"react-app",
@ -121,10 +124,11 @@
"prettier-plugin-organize-imports": "^3.2.3",
"prettier-plugin-tailwindcss": "^0.3.0",
"pretty-quick": "^3.1.3",
"simple-git-hooks": "^2.11.1",
"tailwindcss": "^3.3.3",
"tailwindcss-dotted-background": "^1.1.0",
"typescript": "^5.2.2",
"ua-parser-js": "^1.0.37",
"vite": "^4.5.2"
}
}
}