🧑💻 husky
This commit is contained in:
parent
4363c69032
commit
b554a65fe0
7 changed files with 40 additions and 13 deletions
2
.eslintignore
Normal file
2
.eslintignore
Normal file
|
@ -0,0 +1,2 @@
|
|||
node_modules
|
||||
dist
|
15
.eslintrc
Normal file
15
.eslintrc
Normal file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"root": true,
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"plugins": ["@typescript-eslint", "no-loops", "prettier"],
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/eslint-recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"prettier"
|
||||
],
|
||||
"rules": {
|
||||
"no-console": 1,
|
||||
"no-loops/no-loops": 2
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"root": true,
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"plugins": ["@typescript-eslint", "prettier"],
|
||||
"plugins": ["@typescript-eslint", "no-loops", "prettier"],
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/eslint-recommended",
|
||||
|
@ -9,10 +9,7 @@
|
|||
"prettier"
|
||||
],
|
||||
"rules": {
|
||||
"@typescript-eslint/ban-ts-comment": 0,
|
||||
"@typescript-eslint/no-var-requires": 0,
|
||||
"@typescript-eslint/no-explicit-any": 0,
|
||||
"no-async-promise-executor": 0,
|
||||
"prettier/prettier": "error"
|
||||
"no-console": 1,
|
||||
"no-loops/no-loops": 2
|
||||
}
|
||||
}
|
||||
|
|
1
.husky/.gitignore
vendored
Normal file
1
.husky/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
_
|
4
.husky/pre-commit
Normal file
4
.husky/pre-commit
Normal file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
npx lint-staged
|
14
package.json
14
package.json
|
@ -4,8 +4,11 @@
|
|||
"description": "Earn credits while chatting! And more",
|
||||
"main": "src/index.ts",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"start": "nodemon | pino-pretty -i pid,hostname -t yyyy-mm-dd HH:MM:s"
|
||||
"test": "jest",
|
||||
"start": "nodemon | pino-pretty -i pid,hostname -t yyyy-mm-dd HH:MM:s",
|
||||
"prettier-format": "prettier \"src/**/*.ts\" --write",
|
||||
"lint": "eslint . --ext .ts",
|
||||
"prepare": "husky install"
|
||||
},
|
||||
"keywords": [
|
||||
"zyner",
|
||||
|
@ -61,7 +64,14 @@
|
|||
"eslint-config-airbnb-base": "15.0.0",
|
||||
"eslint-config-prettier": "8.5.0",
|
||||
"eslint-plugin-import": "2.26.0",
|
||||
"eslint-plugin-no-loops": "^0.3.0",
|
||||
"eslint-plugin-prettier": "^4.0.0",
|
||||
"husky": "^7.0.4",
|
||||
"jest": "^27.5.1",
|
||||
"lint-staged": "^12.3.7",
|
||||
"prettier": "^2.6.0"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.ts": "eslint --cache --fix"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "es2019",
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"target": "ES6",
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"esModuleInterop": true,
|
||||
|
@ -9,8 +8,7 @@
|
|||
"strict": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"module": "commonjs",
|
||||
"resolveJsonModule": true,
|
||||
"moduleResolution": "node",
|
||||
"isolatedModules": true,
|
||||
"outDir": "./build",
|
||||
"baseUrl": "./src",
|
||||
|
@ -31,4 +29,4 @@
|
|||
},
|
||||
"include": ["./src"],
|
||||
"exclude": ["./node_modules", "./test"]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue