Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -317,11 +317,13 @@ lint-backend-fix: lint-go-fix lint-go-gitea-vet lint-editorconfig ## lint backen
lint-js: node_modules ## lint js files
$(NODE_VARS) pnpm exec eslint --color --max-warnings=0 $(ESLINT_FILES)
$(NODE_VARS) pnpm exec vue-tsc
$(NODE_VARS) pnpm exec knip --no-progress --cache

.PHONY: lint-js-fix
lint-js-fix: node_modules ## lint js files and fix issues
$(NODE_VARS) pnpm exec eslint --color --max-warnings=0 $(ESLINT_FILES) --fix
$(NODE_VARS) pnpm exec vue-tsc
$(NODE_VARS) pnpm exec knip --no-progress --cache --fix
Comment thread
ChristopherHX marked this conversation as resolved.

.PHONY: lint-css
lint-css: node_modules ## lint css files
Expand Down
15 changes: 15 additions & 0 deletions knip.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type {KnipConfig} from 'knip';

export default {
entry: [
'web_src/js/index.ts',
'web_src/js/features/eventsource.sharedworker.ts',
'web_src/js/standalone/devtest.ts',
'web_src/js/standalone/external-render-iframe.ts',
'web_src/js/standalone/swagger.ts',
],
project: ['web_src/**/*.{ts,vue}'],
ignore: ['updates.config.ts'],
exclude: ['dependencies', 'devDependencies'],
webpack: false, // avoid error "EsbuildPlugin is not a constructor", likely a bug in knip
} satisfies KnipConfig;
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
"globals": "17.0.0",
"happy-dom": "20.3.0",
"jiti": "2.6.1",
"knip": "5.82.1",
"markdownlint-cli": "0.47.0",
"material-icon-theme": "5.31.0",
"nolyfill": "1.0.44",
Expand Down
Loading
Loading