Skip to content

Commit 912e6dd

Browse files
committed
fix: resolve typecheck and lint errors
- Remove composite flag from tsconfig.json to fix project file inclusion - Fix ParsedArgs deprecation by using ParsedArguments directly - Convert if statement to ternary in analyze.ts for lint compliance - Prefix unused _rng parameter in ptolemaic generator - All typecheck errors resolved - All lint errors resolved (0 errors, 1299 warnings)
1 parent 3357eef commit 912e6dd

File tree

4 files changed

+7
-13
lines changed

4 files changed

+7
-13
lines changed

src/cli-commands/analyze.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,9 @@ export const executeAnalyze = (options: AnalyzeOptions): void => {
123123
const spec = computeGraphSpecFromGraph(analyzerGraph);
124124

125125
// Format output
126-
let output: string;
127-
128-
if (options.output?.endsWith(".json") ?? false) {
129-
// JSON output
130-
output = JSON.stringify(spec, null, 2);
131-
} else {
132-
// Human-readable text output
133-
output = formatSpecAsText(spec as Record<string, unknown>, options.verbose);
134-
}
126+
const output: string = options.output?.endsWith(".json") ?? false
127+
? JSON.stringify(spec, null, 2) // JSON output
128+
: formatSpecAsText(spec as Record<string, unknown>, options.verbose); // Human-readable text
135129

136130
// Write output
137131
if (options.output === undefined) {

src/cli-commands/validate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* graphbox validate --input graph.gml --format gml --strict
99
*/
1010

11-
import type { ParsedArgs as ParsedArguments } from "../cli-utils/arg-parser";
11+
import type { ParsedArguments } from "../cli-utils/arg-parser";
1212
import { getBoolean, getOptional, getRequired } from "../cli-utils/arg-parser";
1313
import { formatError, formatValidationErrors } from "../cli-utils/error-formatter";
1414
import type { GraphFormat } from "../cli-utils/format-detection";

src/generation/generators/perfect-variants.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,13 @@ export const generateModularEdges = (
8888
* @param edges - Edge list to populate
8989
* @param spec - Graph specification
9090
* @param rng - Seeded random number generator
91+
* @param _rng
9192
*/
9293
export const generatePtolemaicEdges = (
9394
nodes: TestNode[],
9495
edges: TestEdge[],
9596
spec: GraphSpec,
96-
rng: SeededRandom
97+
_rng: SeededRandom
9798
): void => {
9899
if (spec.ptolemaic?.kind !== "ptolemaic") {
99100
throw new Error("Ptolemaic generation requires ptolemaic spec");

tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
"declarationMap": true,
1414
"sourceMap": true,
1515
"outDir": "./dist",
16-
"rootDir": "./src",
17-
"composite": true
16+
"rootDir": "./src"
1817
},
1918
"include": ["src/**/*"],
2019
"exclude": ["node_modules", "dist"]

0 commit comments

Comments
 (0)