2026-10-29 23:21:56 +08:00
|
|
|
import type { KnipConfig } from "knip";
|
|
|
|
|
|
|
|
|
|
const config: KnipConfig = {
|
|
|
|
|
// Entries come from the Vite (index.html), Vitest, Playwright and package.json script plugins.
|
2026-10-30 01:39:31 +02:00
|
|
|
project: [
|
|
|
|
|
"src/**/*.{ts,tsx,css}",
|
|
|
|
|
"!src/editor/core/cm/angular/parser.terms.ts",
|
|
|
|
|
"scripts/**/*.ts",
|
|
|
|
|
"perf/**/*.ts",
|
|
|
|
|
"e2e/**/*.ts",
|
|
|
|
|
],
|
2026-10-29 23:21:56 +08:00
|
|
|
ignoreExportsUsedInFile: true,
|
|
|
|
|
// lint-staged formats Rust files with the toolchain's rustfmt.
|
|
|
|
|
ignoreBinaries: ["rustfmt"],
|
|
|
|
|
compilers: {
|
|
|
|
|
// Fonts come in through `@import` in global.css.
|
|
|
|
|
css: (text: string) => [...text.matchAll(/(?<=@)import[^;]+/g)].join("\n"),
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default config;
|