mirror of
https://github.com/hknsh/project-knedita.git
synced 2024-11-28 17:41:15 +00:00
feat: added commitlint and husky for linting commit messages
This commit is contained in:
parent
119ab37daf
commit
e31b7d083e
6 changed files with 2570 additions and 3 deletions
4
.husky/commit-msg
Normal file
4
.husky/commit-msg
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
. "$(dirname -- "$0")/_/husky.sh"
|
||||||
|
|
||||||
|
npx --no -- commitlint --edit
|
3
commitlint.config.js
Normal file
3
commitlint.config.js
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
module.exports = {
|
||||||
|
extends: ['@commitlint/config-conventional'],
|
||||||
|
}
|
2554
package-lock.json
generated
2554
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -13,6 +13,7 @@
|
||||||
"migrate:dev": "prisma migrate dev",
|
"migrate:dev": "prisma migrate dev",
|
||||||
"migrate:dev:create": "prisma migrate dev --create-only",
|
"migrate:dev:create": "prisma migrate dev --create-only",
|
||||||
"migrate:reset": "prisma migrate reset",
|
"migrate:reset": "prisma migrate reset",
|
||||||
|
"prepare": "husky install",
|
||||||
"prisma:generate": "npx prisma generate",
|
"prisma:generate": "npx prisma generate",
|
||||||
"prisma:seed": "prisma db seed",
|
"prisma:seed": "prisma db seed",
|
||||||
"prisma:studio": "npx prisma studio",
|
"prisma:studio": "npx prisma studio",
|
||||||
|
@ -28,6 +29,8 @@
|
||||||
"author": "Cookie",
|
"author": "Cookie",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@commitlint/cli": "^17.7.2",
|
||||||
|
"@commitlint/config-conventional": "^17.7.0",
|
||||||
"@faker-js/faker": "^8.0.2",
|
"@faker-js/faker": "^8.0.2",
|
||||||
"@swc/cli": "^0.1.62",
|
"@swc/cli": "^0.1.62",
|
||||||
"@swc/core": "^1.3.66",
|
"@swc/core": "^1.3.66",
|
||||||
|
@ -51,6 +54,7 @@
|
||||||
"eslint-plugin-n": "^16.0.1",
|
"eslint-plugin-n": "^16.0.1",
|
||||||
"eslint-plugin-prettier": "^5.0.0",
|
"eslint-plugin-prettier": "^5.0.0",
|
||||||
"eslint-plugin-promise": "^6.1.1",
|
"eslint-plugin-promise": "^6.1.1",
|
||||||
|
"husky": "^8.0.3",
|
||||||
"nodemon": "^3.0.1",
|
"nodemon": "^3.0.1",
|
||||||
"pm2": "^4.2.3",
|
"pm2": "^4.2.3",
|
||||||
"prettier": "^3.0.0",
|
"prettier": "^3.0.0",
|
||||||
|
|
|
@ -17,6 +17,7 @@ async function postFetchInfoService(
|
||||||
select: {
|
select: {
|
||||||
displayName: true,
|
displayName: true,
|
||||||
username: true,
|
username: true,
|
||||||
|
profileImage: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -15,6 +15,13 @@ async function userFetchPostsService(
|
||||||
content: true,
|
content: true,
|
||||||
createdAt: true,
|
createdAt: true,
|
||||||
updatedAt: true,
|
updatedAt: true,
|
||||||
|
author: {
|
||||||
|
select: {
|
||||||
|
displayName: true,
|
||||||
|
username: true,
|
||||||
|
profileImage: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
return posts
|
return posts
|
||||||
|
|
Loading…
Reference in a new issue