@syntopica/quality-config 0.12.0 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -6
- package/src/knip-framework.ts +7 -6
- package/src/knip.ts +7 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syntopica/quality-config",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Shared configuration for cross-file quality gates: knip, dependency-cruiser, type-coverage, jscpd, lefthook",
|
|
@@ -72,13 +72,13 @@
|
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@arethetypeswrong/cli": "^0.18.5",
|
|
75
|
-
"@syntopica/eslint-config": "0.
|
|
76
|
-
"@types/node": "^26.6.
|
|
75
|
+
"@syntopica/eslint-config": "0.9.0",
|
|
76
|
+
"@types/node": "^26.6.4",
|
|
77
77
|
"dependency-cruiser": "^18.5.0",
|
|
78
|
-
"eslint": "^10.
|
|
78
|
+
"eslint": "^10.12.0",
|
|
79
79
|
"eslint-plugin-regexp": "^3.3.1",
|
|
80
|
-
"knip": "^6.
|
|
81
|
-
"publint": "^0.3.
|
|
80
|
+
"knip": "^6.40.0",
|
|
81
|
+
"publint": "^0.3.25",
|
|
82
82
|
"typescript": "npm:@typescript/typescript6@^6.0.2"
|
|
83
83
|
},
|
|
84
84
|
"scripts": {
|
package/src/knip-framework.ts
CHANGED
|
@@ -46,14 +46,13 @@ export const FRAMEWORK_ENTRIES: Record<
|
|
|
46
46
|
// Every file convention belongs in the one brace alternation rather than in a
|
|
47
47
|
// pattern of its own, including the metadata routes (`sitemap`, `robots`,
|
|
48
48
|
// `manifest`, the image generators): a pattern matching nothing is a hint, and
|
|
49
|
-
// no project uses all of them. `middleware` and `proxy`
|
|
50
|
-
//
|
|
51
|
-
//
|
|
49
|
+
// no project uses all of them. `middleware` and `proxy` are left to knip's
|
|
50
|
+
// Next.js plugin, which registers both: listing them here only produced a
|
|
51
|
+
// "Refine entry pattern (no matches)" hint in a project that has neither.
|
|
52
52
|
nextjs: {
|
|
53
53
|
entry: [
|
|
54
54
|
'{,src/}app/**/{page,layout,loading,error,global-error,not-found,route,template,default,sitemap,robots,manifest,icon,apple-icon,opengraph-image,twitter-image}.{ts,tsx}',
|
|
55
55
|
'next.config.*',
|
|
56
|
-
'{,src/}{middleware,proxy}.ts',
|
|
57
56
|
],
|
|
58
57
|
project: ['{,src/}app/**/*.{ts,tsx}', 'src/**/*.{ts,tsx}'],
|
|
59
58
|
includeEntryExports: false,
|
|
@@ -92,13 +91,15 @@ export const FRAMEWORK_ENTRIES: Record<
|
|
|
92
91
|
project: ['src/**/*.ts'],
|
|
93
92
|
includeEntryExports: true,
|
|
94
93
|
},
|
|
94
|
+
// `src/main.*` is reached through index.html's module script; listing it as
|
|
95
|
+
// well was a "Remove redundant entry pattern" hint in both Vite templates.
|
|
95
96
|
'vite-react': {
|
|
96
|
-
entry: ['
|
|
97
|
+
entry: ['index.html', 'vite.config.*'],
|
|
97
98
|
project: ['src/**/*.{ts,tsx}'],
|
|
98
99
|
includeEntryExports: false,
|
|
99
100
|
},
|
|
100
101
|
'vite-vue': {
|
|
101
|
-
entry: ['
|
|
102
|
+
entry: ['index.html', 'vite.config.*'],
|
|
102
103
|
project: ['src/**/*.{ts,vue}'],
|
|
103
104
|
includeEntryExports: false,
|
|
104
105
|
},
|
package/src/knip.ts
CHANGED
|
@@ -70,9 +70,12 @@ const ESLINT_PEER_DEPENDENCIES = [
|
|
|
70
70
|
export const createKnipConfig = (options: {
|
|
71
71
|
framework: KnipFramework
|
|
72
72
|
/**
|
|
73
|
-
* Binaries knip cannot resolve
|
|
74
|
-
*
|
|
75
|
-
*
|
|
73
|
+
* Binaries knip cannot resolve, merged with `gitleaks`. That one is ignored
|
|
74
|
+
* by default because the baseline itself writes `gitleaks detect` into every
|
|
75
|
+
* project's `secrets:check`, and it is a system binary no package provides,
|
|
76
|
+
* so every template reported it as unlisted. Nothing else is: an entry for a
|
|
77
|
+
* binary knip *can* resolve becomes a permanent `Remove from ignoreBinaries`
|
|
78
|
+
* hint the consumer has no way to silence.
|
|
76
79
|
*/
|
|
77
80
|
ignoreBinaries?: string[]
|
|
78
81
|
/** Merged with the built-in lists, never replacing them. */
|
|
@@ -144,7 +147,7 @@ export const createKnipConfig = (options: {
|
|
|
144
147
|
// boolean. It only hides an export that its own file already uses: an
|
|
145
148
|
// export nothing references at all still fails the gate.
|
|
146
149
|
ignoreExportsUsedInFile: true,
|
|
147
|
-
ignoreBinaries: options.ignoreBinaries ?? [],
|
|
150
|
+
ignoreBinaries: ['gitleaks', ...(options.ignoreBinaries ?? [])],
|
|
148
151
|
ignoreDependencies: [
|
|
149
152
|
...BASELINE_RUNNER_DEPENDENCIES,
|
|
150
153
|
...ESLINT_PEER_DEPENDENCIES,
|