Skip to content

Commit

Permalink
Knip unused exports
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Oct 11, 2022
1 parent b1d10b9 commit 2e7b67a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export type Issues = {
duplicates: UnusedExportIssues;
};

export type IssueType = keyof Issues;
type IssueType = keyof Issues;
export type ProjectIssueType = Extract<IssueType, 'files' | 'dependencies' | 'devDependencies'>;
export type SymbolIssueType = Exclude<IssueType, ProjectIssueType>;

Expand All @@ -34,7 +34,7 @@ export type IssueGroup =
| 'nsTypes'
| 'duplicates';

export type BaseLocalConfiguration = {
type BaseLocalConfiguration = {
entryFiles: string[];
projectFiles: string[];
};
Expand Down
4 changes: 2 additions & 2 deletions src/util/ignore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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<string[]> => {
const traverseDirs = async (rootDir: string, currentDir: string, patterns: string[] = []): Promise<string[]> => {
const gitIgnorePath = path.join(currentDir, '.gitignore');
const parentDir = path.resolve(currentDir, '..');
if (await isFile(gitIgnorePath)) {
Expand Down

0 comments on commit 2e7b67a

Please sign in to comment.