Skip to content

Commit

Permalink
Merge pull request #86 from readme-experts/husky-config
Browse files Browse the repository at this point in the history
chore: Husky config
  • Loading branch information
akaeyuhi authored Jun 18, 2023
2 parents 85709a1 + 2bb70be commit 6565710
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 8 deletions.
4 changes: 4 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run lint
24 changes: 23 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@
},
"scripts": {
"installDependecies": "npm install && npm install --prefix src/client",
"lint": "eslint ./src/server/ --fix --ext .ts && eslint ./src/client/src --fix",
"build": "npm run --prefix src/client build && nest build",
"start": "npm run --prefix src/client build && nest start",
"start:dev": "nest start --watch"
"start:dev": "nest start --watch",
"prepare": "husky install"
},
"devDependencies": {
"@types/bcrypt": "^5.0.0",
Expand All @@ -45,6 +47,7 @@
"eslint": "^8.31.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-prettier": "^4.2.1",
"husky": "^8.0.3",
"prisma": "^4.8.1"
}
}
1 change: 1 addition & 0 deletions src/client/src/setupProxy.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { createProxyMiddleware } = require('http-proxy-middleware');
import * as dotenv from 'dotenv';
Expand Down
2 changes: 1 addition & 1 deletion src/server/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
/*'plugin:prettier/recommended',*/
],
root: true,
env: {
Expand Down
4 changes: 2 additions & 2 deletions src/server/user/dto/login.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { IsNotEmpty, Length } from 'class-validator';
export class LoginUserDto {
@IsNotEmpty({ message: 'Username should not be empty' })
@Length(6, 15)
username: string;
username: string;
@IsNotEmpty({ message: 'Username should not be empty' })
@Length(6, 15)
password: string;
password: string;
}
6 changes: 3 additions & 3 deletions src/server/user/dto/registration.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import { IsEmail, IsNotEmpty, Length } from 'class-validator';

export class RegisterUserDto {
@IsEmail()
email: string;
email: string;

@IsNotEmpty({ message: 'Username should not be empty' })
@Length(6, 15)
username: string;
username: string;

@IsNotEmpty()
@Length(6, 15)
password: string;
password: string;
passwordHash: string;
}

0 comments on commit 6565710

Please sign in to comment.