build: add lint-staged

This commit is contained in:
2026-03-23 16:18:21 +02:00
parent 4a79961ae5
commit 9cdea1c5ea
4 changed files with 1641 additions and 678 deletions

1
.husky/pre-commit Normal file
View File

@@ -0,0 +1 @@
pnpm lint-staged

View File

@@ -1,8 +1,9 @@
{
"semi": false,
"singleQuote": false,
"trailingComma": "all",
"printWidth": 120,
"tabWidth": 2,
"printWidth": 100,
"overrides": [
{
"files": "*.md",

View File

@@ -37,7 +37,20 @@
"docs:build": "cd docs && pnpm build",
"docs:watch": "cd docs && pnpm start",
"audit-fix": "pnpm audit --fix",
"ci": "pnpm install --frozen-lockfile"
"ci": "pnpm install --frozen-lockfile",
"lint": "eslint src/ tests/",
"format": "prettier --write .",
"lint-staged": "lint-staged",
"prepare": "husky"
},
"lint-staged": {
"*.{ts,mts,js,mjs}": [
"eslint --fix",
"prettier --write"
],
"*.{json,md,yml,yaml,css}": [
"prettier --write"
]
},
"dependencies": {
"@inquirer/input": "^5.0.10",
@@ -51,7 +64,10 @@
"@eslint/js": "^10.0.1",
"@types/node": "^25.5.0",
"@vitest/coverage-v8": "^4.1.0",
"husky": "^9.1.7",
"lint-staged": "^16.4.0",
"mock-fs": "^5.5.0",
"prettier": "^3.8.1",
"rimraf": "^6.1.3",
"typescript": "^5.9.3",
"typescript-eslint": "^8.57.1",

2191
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff