Skip to content

Commit 0fe65db

Browse files
committed
Merge branch 'release/v4.0' into fix/AG-49411
2 parents b0351f3 + 1228808 commit 0fe65db

File tree

5 files changed

+12
-11
lines changed

5 files changed

+12
-11
lines changed

.gitignore

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
*.log
22
.DS_Store
33
.eslintcache
4-
.vscode
5-
coverage
6-
dist
7-
node_modules
4+
.vscode/
5+
.idea/
6+
coverage/
7+
dist/
8+
node_modules/
89
.pnpm-store/
910

1011
# npmjs token

schema/aglint-config.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,4 +146,4 @@
146146
}
147147
},
148148
"required": []
149-
}
149+
}

src/cli/run-cli.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable no-console */
21
/**
32
* Main CLI execution logic.
43
*
@@ -216,11 +215,11 @@ export async function runCli(context?: Partial<CliContext>): Promise<CliResult>
216215
const file = matchedPatterns.files[0]!;
217216
const config = await tree.getResolvedConfig(file);
218217

219-
console.log(
220-
inspect(config, {
218+
ctx.stdout.write(
219+
`${inspect(config, {
221220
colors: useColors,
222221
depth: Infinity,
223-
}),
222+
})}\n`,
224223
);
225224
return { exitCode: 0 };
226225
}
@@ -308,7 +307,7 @@ export async function runCli(context?: Partial<CliContext>): Promise<CliResult>
308307
const useColors = options?.color ?? (ctx.stderr.isTTY ?? false);
309308
const errorMessage = prefix + await getFormattedError(error, { colors: useColors });
310309

311-
console.error(errorMessage);
310+
ctx.stderr.write(`${errorMessage}\n`);
312311

313312
return { exitCode: 2, error: errorMessage };
314313
}

src/cli/utils/config-resolver/config-resolver.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ export class ConfigResolver {
136136
if (this.debug && isFirstTimeLoggingTarget) {
137137
const chainPaths = configChain.map((entry) => entry.path).join(' <- ');
138138
this.debug.log(`Config chain for ${targetPath} is: ${chainPaths}`);
139+
this.loggedConfigs.add(targetPath);
139140
}
140141

141142
// Start with base config

tasks/generate-config-schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const main = async (): Promise<void> => {
4747
// Write the JSON schema to file
4848
await writeFile(
4949
outputFileLocation,
50-
JSON.stringify(enrichedSchema, null, 2),
50+
`${JSON.stringify(enrichedSchema, null, 2)}\n`,
5151
'utf-8',
5252
);
5353

0 commit comments

Comments
 (0)