Files
openidea/knip.ts
T
l0ng-ai a2dd7e3939 fix(ci): ignore the Django parser terms in knip and fix two flaky tests (#2835)
knip now ignores the generated Django parser terms like the other template parsers'. The progress-replacement test started its barrier task while the released search could still be measuring indexing, so it sometimes saw Indexing; the barrier now starts after the search. The local download test passes '/'-separated remote paths, as the local file system lists them on Windows.
2026-11-12 08:58:45 +08:00

30 lines
1.0 KiB
TypeScript

import type { KnipConfig } from "knip";
const config: KnipConfig = {
// Entries come from the Vite (index.html), Vitest, Playwright and package.json script plugins;
// standalone browser fixtures are loaded by their own HTML pages.
entry: ["e2e/*.fixture.{ts,tsx}"],
project: [
"src/**/*.{ts,tsx,css}",
"!src/editor/core/cm/angular/parser.terms.ts",
"!src/editor/core/cm/jsp/parser.terms.ts",
"!src/editor/core/cm/astro/parser.terms.ts",
"!src/editor/core/cm/django/parser.terms.ts",
"scripts/**/*.ts",
"perf/**/*.ts",
"e2e/**/*.ts",
"smoke/**/*.ts",
],
// Plugins' web pages are projects of their own (own package.json, checked by plugins/build.sh and CI).
ignore: ["plugins/**/web-src/**"],
ignoreExportsUsedInFile: true,
// System tools used by formatting and language smoke fixtures.
ignoreBinaries: ["rustfmt", "composer", "make"],
compilers: {
// Fonts come in through `@import` in global.css.
css: (text: string) => [...text.matchAll(/(?<=@)import[^;]+/g)].join("\n"),
},
};
export default config;