chore(web): add knip and remove unused npm dependencies
Drops highlight.js, lunr, autoprefixer, and @types/markdown-it — all verified unreferenced (markdown-it ships its own types). Adds knip.json configured for the templ/htmx architecture: main.ts and reader/reader.ts entries, vitest tests as entry points, and an ignore list for the ten modules whose exports are bound by templ Alpine attributes — string bindings that static analysis cannot see.
This commit is contained in:
1 parent
a716b386a1
commit
dc0e3573a6
2 files changed
+27
-4
No files matched your search
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"$schema": "./node_modules/knip/schema.json",
|
||||
"entry": [
|
||||
"web/src/**/*.test.ts"
|
||||
],
|
||||
"project": [
|
||||
"web/src/**/*.ts"
|
||||
],
|
||||
"ignoreDependencies": [
|
||||
"vite",
|
||||
"vitest",
|
||||
"htmx.org"
|
||||
],
|
||||
"ignore": [
|
||||
"web/src/dashboard.ts",
|
||||
"web/src/stats.ts",
|
||||
"web/src/header.ts",
|
||||
"web/src/index.ts",
|
||||
"web/src/login.ts",
|
||||
"web/src/profile-modal.ts",
|
||||
"web/src/profile.ts",
|
||||
"web/src/bookshelf.ts",
|
||||
"web/src/collections.ts",
|
||||
"web/src/toast-error.ts"
|
||||
]
|
||||
}
|
||||
+1
-4
@@ -18,9 +18,7 @@
|
||||
"chart.js": "^4.5.1",
|
||||
"dompurify": "^3.4.16",
|
||||
"fflate": "^0.8.3",
|
||||
"highlight.js": "^11.11.1",
|
||||
"htmx.org": "^2.0.8",
|
||||
"lunr": "^2.3.9",
|
||||
"markdown-it": "^15.0.2",
|
||||
"markdown-it-footnote": "^4.0.0",
|
||||
"turndown": "^7.2.4",
|
||||
@@ -29,10 +27,9 @@
|
||||
"devDependencies": {
|
||||
"@tailwindcss/forms": "^0.5.11",
|
||||
"@tailwindcss/typography": "^0.5.19",
|
||||
"@types/markdown-it": "^14.2.0",
|
||||
"@types/turndown": "^5.0.6",
|
||||
"autoprefixer": "^10.4.27",
|
||||
"jsdom": "^30.1.3",
|
||||
"knip": "^6.43.0",
|
||||
"playwright": "^1.64.1",
|
||||
"tailwindcss": "^3.4.19",
|
||||
"typescript": "^5.9.3",
|
||||
|
||||
Reference in new issue
Block a user