Skip to content

Commit 154e09d

Browse files
committed
Fix JSONC configuration files
1 parent aacfb8e commit 154e09d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
- Fixed relative link detection for markdown links containing code in their label, #2606.
1313
- Fixed an issue with packages mode where TypeDoc would use (much) more memory than required, #2607.
1414
- TypeDoc will no longer crash when asked to render highlighted code for an unsupported language, #2609.
15+
- `.jsonc` configuration files are now properly read as JSONC, rather than being passed to `require`.
1516

1617
### Thanks!
1718

src/lib/utils/options/readers/typedoc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export class TypeDocReader implements OptionsReader {
6969
seen.add(file);
7070

7171
let fileContent: any;
72-
if (file.endsWith(".json")) {
72+
if (file.endsWith(".json") || file.endsWith(".jsonc")) {
7373
const readResult = ts.readConfigFile(normalizePath(file), (path) =>
7474
FS.readFileSync(path, "utf-8"),
7575
);

0 commit comments

Comments
 (0)