Skip to content

Commit

Permalink
set up knip
Browse files Browse the repository at this point in the history
  • Loading branch information
danvk committed Sep 22, 2024
1 parent a53d309 commit 84871ba
Show file tree
Hide file tree
Showing 4 changed files with 479 additions and 39 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,15 @@ jobs:
- name: Log Versions
run: yarn tsc --version && yarn mocha --version

- name: Prettier
run: yarn format:check

- name: Type Check
run: yarn tsc

# knip runs after tsc so that files can reference the `dist` dir.
- name: Knip
run: yarn knip

- name: Unit tests
run: yarn test
18 changes: 18 additions & 0 deletions knip.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "https://unpkg.com/knip@5/schema.json",
"entry": [
"localturk.ts!",
"classify-images.ts!",
"test/**/*.ts"
],
"ignore": [],
"ignoreBinaries": [],
"ignoreDependencies": [
"@types/mocha"
],
"ignoreExportsUsedInFile": true,
"project": [
"*.ts!",
"test/**/*.ts"
]
}
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"classify-images": "dist/classify-images.js"
},
"dependencies": {
"@commander-js/extra-typings": "^12.1.0",
"commander": "^12.1.0",
"csv-parse": "^5.5.6",
"csv-stringify": "^6.5.1",
Expand All @@ -22,10 +21,11 @@
"lodash": "^4.17.4",
"open": "8",
"reservoir": "^0.1.2",
"serve-static": "^1.16.2",
"temp": "^0.8.3"
},
"devDependencies": {
"@types/chai": "^4.0.7",
"@types/chai": "^4.3.19",
"@types/errorhandler": "^0.0.32",
"@types/escape-html": "^1.0.4",
"@types/express": "^4.0.39",
Expand All @@ -35,7 +35,8 @@
"@types/node": "18",
"@types/reservoir": "^0.1.6",
"@types/temp": "^0.8.31",
"chai": "^4.1.2",
"chai": "^5.1.1",
"knip": "^5.30.4",
"mocha": "^4.0.1",
"prettier": "^3.3.3",
"ts-node": "^10.9.2",
Expand Down
Loading

0 comments on commit 84871ba

Please sign in to comment.