knip 5.88.0 → 5.88.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/dist/IssueFixer.js
CHANGED
|
@@ -12,10 +12,11 @@ export const fix = async (issues, counters, options) => {
|
|
|
12
12
|
const group = issues[type];
|
|
13
13
|
if (group instanceof Set)
|
|
14
14
|
continue;
|
|
15
|
+
const counterType = (type === '_files' ? 'files' : type);
|
|
15
16
|
for (const filePath in group)
|
|
16
17
|
for (const key in group[filePath])
|
|
17
18
|
if (group[filePath][key].isFixed)
|
|
18
|
-
counters[
|
|
19
|
+
counters[counterType]--;
|
|
19
20
|
}
|
|
20
21
|
if (options.isFormat) {
|
|
21
22
|
const report = await formatly(Array.from(touchedFiles));
|
|
@@ -16,7 +16,7 @@ import getScriptVisitors from "./visitors/scripts/index.js";
|
|
|
16
16
|
const isInTopLevelScope = (node, sourceFile) => {
|
|
17
17
|
let current = node.parent;
|
|
18
18
|
while (current && current !== sourceFile) {
|
|
19
|
-
if (ts.isFunctionLike(current) || ts.isClassLike(current))
|
|
19
|
+
if (ts.isFunctionLike(current) || ts.isClassLike(current) || ts.isModuleDeclaration(current))
|
|
20
20
|
return false;
|
|
21
21
|
current = current.parent;
|
|
22
22
|
}
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "5.88.
|
|
1
|
+
export declare const version = "5.88.1";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '5.88.
|
|
1
|
+
export const version = '5.88.1';
|