From 377a5061cad377401b4a26d8e4f32676f5d2cf7f Mon Sep 17 00:00:00 2001 From: Erfan Besharat Date: Mon, 9 Dec 2024 15:44:55 +0100 Subject: [PATCH] Lint --- packages/cli/src/api/split.ts | 6 +++--- packages/cli/src/commands/split.ts | 6 +++--- packages/cli/src/splitRunner/worker.ts | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/cli/src/api/split.ts b/packages/cli/src/api/split.ts index 5c5ebe3..687c334 100644 --- a/packages/cli/src/api/split.ts +++ b/packages/cli/src/api/split.ts @@ -13,7 +13,7 @@ export async function split(payload: z.infer) { // Get the dependency tree const dependencyTreeManager = new DependencyTreeManager( - payload.entrypointPath + payload.entrypointPath, ); const outputDir = payload.outputDir || path.dirname(payload.entrypointPath); @@ -38,13 +38,13 @@ export async function split(payload: z.infer) { const relativeFileNamePath = path.relative(targetDir, file.path); const destinationPath = path.join( annotationDirectory, - relativeFileNamePath + relativeFileNamePath, ); fs.mkdirSync(path.dirname(destinationPath), { recursive: true }); fs.writeFileSync(destinationPath, file.sourceCode, "utf8"); }); return files; - }) + }), ); // Store the processed annotations in the output directory diff --git a/packages/cli/src/commands/split.ts b/packages/cli/src/commands/split.ts index a4273e3..eabbc7c 100644 --- a/packages/cli/src/commands/split.ts +++ b/packages/cli/src/commands/split.ts @@ -7,7 +7,7 @@ import SplitRunner from "../splitRunner/splitRunner"; export default async function splitCommandHandler( entrypointPath: string, // Path to the entrypoint file - outputDir: string // Path to the output directory + outputDir: string, // Path to the output directory ) { const groupMap: Record = {}; @@ -32,12 +32,12 @@ export default async function splitCommandHandler( const relativeFileNamePath = path.relative(targetDir, file.path); const destinationPath = path.join( annotationDirectory, - relativeFileNamePath + relativeFileNamePath, ); fs.mkdirSync(path.dirname(destinationPath), { recursive: true }); fs.writeFileSync(destinationPath, file.sourceCode, "utf8"); }); - }) + }), ); // Store the processed annotations in the output directory diff --git a/packages/cli/src/splitRunner/worker.ts b/packages/cli/src/splitRunner/worker.ts index 76d3ae3..a8f1984 100644 --- a/packages/cli/src/splitRunner/worker.ts +++ b/packages/cli/src/splitRunner/worker.ts @@ -25,7 +25,7 @@ function removeAnnotationFromOtherGroups() { const updatedSourceCode = languagePlugin.removeAnnotationFromOtherGroups( file.sourceCode, - group + group, ); return { ...file, sourceCode: updatedSourceCode }; }); @@ -51,7 +51,7 @@ function removeInvalidImportsAndUsages(exportMap: Map) { const updatedSourceCode = languagePlugin.cleanupInvalidImports( file.path, file.sourceCode, - exportMap + exportMap, ); return { ...file, sourceCode: updatedSourceCode }; @@ -64,7 +64,7 @@ function removeUnusedImports() { const updatedSourceCode = languagePlugin.cleanupUnusedImports( file.path, - file.sourceCode + file.sourceCode, ); return { ...file, sourceCode: updatedSourceCode }; @@ -135,7 +135,7 @@ function removeErrors() { const query = new Parser.Query( languagePlugin.parser.getLanguage(), - "(ERROR) @error" + "(ERROR) @error", ); const errorCaptures = query.captures(tree.rootNode); errorCaptures.forEach((capture) => { @@ -147,7 +147,7 @@ function removeErrors() { const updatedSourceCode = removeIndexesFromSourceCode( file.sourceCode, - indexesToRemove + indexesToRemove, ); return { ...file, sourceCode: updatedSourceCode };