From 2e7b67af34b38a79ab78c48d009f0e7b0bc2a7bb Mon Sep 17 00:00:00 2001 From: Lars Kappert Date: Tue, 11 Oct 2022 18:51:04 +0200 Subject: [PATCH] Knip unused exports --- src/types.ts | 4 ++-- src/util/ignore.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/types.ts b/src/types.ts index dc1c3eef3..7cda8a406 100644 --- a/src/types.ts +++ b/src/types.ts @@ -19,7 +19,7 @@ export type Issues = { duplicates: UnusedExportIssues; }; -export type IssueType = keyof Issues; +type IssueType = keyof Issues; export type ProjectIssueType = Extract; export type SymbolIssueType = Exclude; @@ -34,7 +34,7 @@ export type IssueGroup = | 'nsTypes' | 'duplicates'; -export type BaseLocalConfiguration = { +type BaseLocalConfiguration = { entryFiles: string[]; projectFiles: string[]; }; diff --git a/src/util/ignore.ts b/src/util/ignore.ts index b3cd3506f..cbcdfb80d 100644 --- a/src/util/ignore.ts +++ b/src/util/ignore.ts @@ -5,7 +5,7 @@ import { addWorkingDirToPattern } from './path'; export const convertPattern = (pattern: string) => (pattern.startsWith('!') ? pattern.substring(1) : `!${pattern}`); -export const readIgnoreFile = async (filePath: string) => { +const readIgnoreFile = async (filePath: string) => { let contents = ''; try { contents = (await fs.readFile(filePath)).toString(); @@ -15,7 +15,7 @@ export const readIgnoreFile = async (filePath: string) => { return contents.split(/\r?\n/).filter(line => line && !line.startsWith('#')); }; -export const traverseDirs = async (rootDir: string, currentDir: string, patterns: string[] = []): Promise => { +const traverseDirs = async (rootDir: string, currentDir: string, patterns: string[] = []): Promise => { const gitIgnorePath = path.join(currentDir, '.gitignore'); const parentDir = path.resolve(currentDir, '..'); if (await isFile(gitIgnorePath)) {