mirror of
https://github.com/go-gitea/gitea.git
synced 2026-01-30 07:50:49 +01:00
This adds [knip](https://github.com/webpro-nl/knip), a tool to find unused files, dependencies and exports in JS. Fixed all discovered issues. 1. knip apparently has some issue resolving imports from `d.ts` to `.ts` so I worked around it by moving the two affected types to where they are used. 2. I don't know why `modules/fomantic/dropdown.ts` had a new typescript error, but I fixed it. 3. Use named export for `EsbuildPlugin`, I think this was added recently.
19 lines
354 B
TypeScript
19 lines
354 B
TypeScript
import type {KnipConfig} from 'knip';
|
|
|
|
export default {
|
|
entry: [
|
|
'*.ts',
|
|
'tools/**/*.ts',
|
|
'tests/e2e/**/*.ts',
|
|
],
|
|
ignoreDependencies: [
|
|
// dependencies used in Makefile or tools
|
|
'@primer/octicons',
|
|
'markdownlint-cli',
|
|
'nolyfill',
|
|
'spectral-cli-bundle',
|
|
'vue-tsc',
|
|
'webpack-cli',
|
|
],
|
|
} satisfies KnipConfig;
|