Replace ESLint with oxlint and add code quality tooling

- Replace ESLint/typescript-eslint with oxlint (faster, zero-config TypeScript linting)
- Add oxlint config with complexity thresholds, max-lines, and TypeScript rules
- Add jscpd for duplicate code detection
- Add knip for dead code and unused dependency detection
- Add scripts/scan-todos.mjs for tech debt marker scanning
- Add Husky pre-commit hook running oxlint on staged files
- Fix unnecessary array spreads flagged by oxlint
This commit is contained in:
morluto
2026-07-12 10:14:37 +08:00
parent ff0cbf9ee2
commit 8a62075a8e
10 changed files with 1625 additions and 1217 deletions
+13 -5
View File
@@ -41,7 +41,11 @@
"check": "npm run typecheck && npm run lint && npm run format:check && npm test",
"format": "prettier --write .",
"format:check": "prettier --check .",
"lint": "eslint 'src/**/*.ts' 'tests/**/*.ts' vitest.config.ts",
"lint": "oxlint",
"lint:fix": "oxlint --fix",
"knip": "knip",
"jscpd": "jscpd src/ tests/",
"scan:todos": "node scripts/scan-todos.mjs",
"start": "node dist/main.js",
"pretest": "npm run build",
"test": "vitest run",
@@ -50,7 +54,9 @@
"verify:hopper": "npm run build && node scripts/verify-real-hopper.mjs",
"verify:package": "npm run build && node scripts/verify-package.mjs",
"config:print": "node scripts/print-mcp-config.mjs",
"prepack": "npm run build"
"docs:generate": "typedoc",
"prepack": "npm run build",
"prepare": "husky"
},
"dependencies": {
"@modelcontextprotocol/server": "2.0.0-beta.3",
@@ -58,13 +64,15 @@
"zod": "4.4.3"
},
"devDependencies": {
"@eslint/js": "9.39.2",
"@modelcontextprotocol/client": "2.0.0-beta.3",
"@types/node": "24.10.1",
"eslint": "9.39.2",
"husky": "9.1.7",
"jscpd": "5.0.12",
"knip": "6.26.0",
"oxlint": "1.73.0",
"prettier": "3.6.2",
"typedoc": "0.28.20",
"typescript": "5.9.3",
"typescript-eslint": "8.48.1",
"vitest": "4.1.10"
}
}