Skip to content

Commit

Permalink
chore(core): perform code formatting before commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tericcabrel committed Jun 20, 2022
1 parent 794a66c commit c72a54a
Show file tree
Hide file tree
Showing 4 changed files with 263 additions and 10 deletions.
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
1 change: 0 additions & 1 deletion apps/core/src/configs/authentication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@ export const getAuthenticatedUser = (context: AppContext): string => {
if (!userId) {
throw new AppError(errors.NOT_AUTHENTICATED, 'NOT_AUTHENTICATED');
}

return userId;
};
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,16 @@
"apps/web",
"functions/kyubi"
],
"lint-staged": {
"apps/**/*.{ts,tsx}": [
"prettier --write",
"eslint --fix"
]
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"pre-commit": "lint-staged"
}
},
"dependencies": {},
Expand Down
Loading

0 comments on commit c72a54a

Please sign in to comment.