added husky

This commit is contained in:
12inchpenguin 2025-04-07 13:03:45 +03:00
parent e00280aea9
commit d39b3c7003
5 changed files with 735 additions and 1 deletions

4
.husky/pre-commit Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
npx lint-staged

10
.lintstagedrc Normal file
View File

@ -0,0 +1,10 @@
{
"*.{js,ts}": [
"prettier --write",
"eslint --fix",
"npm run build"
],
"*.{json,md}": [
"prettier --write"
]
}

8
.prettierrc Normal file
View File

@ -0,0 +1,8 @@
{
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"printWidth": 100,
"tabWidth": 2,
"endOfLine": "auto"
}

View File

@ -16,7 +16,9 @@
"clean": "rimraf dist",
"prepublishOnly": "npm run clean && npm run build",
"prepare": "husky",
"lint": "npx eslint src"
"lint": "npx eslint src",
"format": "prettier --write \"**/*.{ts,js,json,md}\"",
"lint:fix": "npx eslint src --fix"
},
"keywords": [
"ipfs",
@ -58,10 +60,16 @@
},
"devDependencies": {
"@constl/orbit-db-types": "^2.0.6",
"@eslint/js": "^9.24.0",
"@orbitdb/core-types": "^1.0.14",
"@types/express": "^5.0.1",
"@types/node": "^22.13.10",
"@types/node-forge": "^1.3.11",
"@typescript-eslint/eslint-plugin": "^8.29.0",
"@typescript-eslint/parser": "^8.29.0",
"eslint": "^9.24.0",
"eslint-config-prettier": "^10.1.1",
"eslint-plugin-prettier": "^5.2.6",
"husky": "^8.0.3",
"lint-staged": "^15.5.0",
"prettier": "^3.5.3",

704
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff