Updated format

This commit is contained in:
Sambo Chea 2021-09-16 18:18:04 +07:00
parent d011f4547e
commit e26ee50faf
Signed by: sombochea
GPG Key ID: 3C7CF22A05D95490
9 changed files with 16 additions and 15 deletions

View File

@ -7,4 +7,4 @@ steps:
commands: commands:
- npm config set registry https://r.ctdn.net - npm config set registry https://r.ctdn.net
- npm install - npm install
- npm run build - npm run build

View File

@ -153,4 +153,4 @@ module.exports = {
"use-isnan": "error", "use-isnan": "error",
"valid-typeof": "off", "valid-typeof": "off",
}, },
} }

View File

@ -1,10 +1,11 @@
# TS Project (Template for TypeScript) # TS Project (Template for TypeScript)
- TypeScript - TypeScript
- TS Node Dev - TS Node Dev
- Husky - Husky
- Prettier - Prettier
- ESLint - ESLint
### Contributors ### Contributors
- Sambo Chea <sombochea@cubetiqs.com>
- Sambo Chea <sombochea@cubetiqs.com>

View File

@ -36,4 +36,4 @@ export const millisToSeconds = (millis: number) => {
export const randomThenGetOne = (data: any[]): any => { export const randomThenGetOne = (data: any[]): any => {
const randomIndex = Math.floor(Math.random() * data.length) const randomIndex = Math.floor(Math.random() * data.length)
return data[randomIndex] return data[randomIndex]
} }

View File

@ -13,4 +13,4 @@
// parse2Int, // parse2Int,
// parse2IntOrNull, // parse2IntOrNull,
// parseToBoolean, // parseToBoolean,
// } // }

View File

@ -41,4 +41,4 @@ export const info = (message?: any, ...args: any[]) => {
export const success = (message?: any, ...args: any[]) => { export const success = (message?: any, ...args: any[]) => {
const msg = prefixColor("SUCCESS", message) const msg = prefixColor("SUCCESS", message)
args.length === 0 ? logger.info(msg) : logger.info(msg, ...args) args.length === 0 ? logger.info(msg) : logger.info(msg, ...args)
} }

View File

@ -52,4 +52,4 @@ class Logger {
} }
} }
export default Logger export default Logger

View File

@ -18,4 +18,4 @@ export const parseToBoolean = (
): boolean => { ): boolean => {
if (!val) return defaultValue if (!val) return defaultValue
return val === true || val.toLowerCase() === "true" return val === true || val.toLowerCase() === "true"
} }

View File

@ -12,7 +12,7 @@
"lib": ["ES2015"], "lib": ["ES2015"],
"skipLibCheck": true, "skipLibCheck": true,
"allowJs": true, "allowJs": true,
"declaration": true, "declaration": true
}, },
"include": ["src/**/*"] "include": ["src/**/*"]
} }