forked from prettier/prettier
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathknip.config.js
More file actions
64 lines (60 loc) · 1.72 KB
/
Copy pathknip.config.js
File metadata and controls
64 lines (60 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import { isCI } from "ci-info";
/** @import {KnipConfig} from "knip" */
/** @type {KnipConfig} */
const config = {
workspaces: {
".": {
entry: [
"src/plugins/*",
"scripts/**",
// We use `new Function()` to create `import()` in our `bin` file (bin/prettier.cjs)
// so there is no actual use of the CLI files
"src/cli/index.js",
"src/experimental-cli/index.js",
"packages/plugin-oxc/index.js",
"packages/plugin-hermes/index.js",
],
project: ["src/**", "scripts/**"],
ignore: [
"scripts/build/config.js",
"scripts/build/build-javascript-module.js",
"scripts/tools/**",
"src/experimental-cli/**",
"src/universal/*.browser.js",
],
ignoreDependencies: [
"eslint-formatter-friendly",
"ts-expect",
"buffer",
"deno-path-from-file-url",
],
ignoreBinaries: ["test-coverage"],
},
website: {
entry: [
"playground/**/*.{js,jsx}",
"src/pages/**/*.{js,jsx}",
"static/**/*.{js,mjs}",
],
ignoreDependencies: [
"@docusaurus/faster",
"@docusaurus/plugin-content-docs",
],
},
"scripts/tools/bundle-test": {},
"scripts/tools/eslint-plugin-prettier-internal-rules": {},
"scripts/release": {
entry: ["release.js"],
},
},
};
// Only check workspaces on CI, since they require extra install steps, see https://github.com/prettier/prettier/issues/16913
if (!isCI) {
config.workspaces = Object.fromEntries(
Object.entries(config.workspaces).map(([workspace, settings]) => [
workspace,
workspace === "." ? settings : { ignore: ["**/*"] },
]),
);
}
export default config;