Skip to content

Commit

Permalink
fix: load tsconfig with a lib that supports extends (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
ForbesLindesay authored Mar 4, 2020
1 parent 91d7bf5 commit 13efde2
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 297 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"glob": "^7.1.3",
"json-stable-stringify": "^1.0.1",
"minimatch": "^3.0.4",
"tsconfig": "^7.0.0",
"tsconfig-loader": "^1.1.0",
"typescript-json-schema": "^0.38.3",
"yargs": "^13.2.4"
}
Expand Down
55 changes: 0 additions & 55 deletions src/Example.validator.ts

This file was deleted.

9 changes: 4 additions & 5 deletions src/loadTsConfig.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import {loadSync} from 'tsconfig';
import loadTsconfig from 'tsconfig-loader';

export default function loadTsConfig(cwd: string = process.cwd()): any {
const result = loadSync(cwd);
const compilerOptions =
(result.config && result.config.compilerOptions) || {};
export default function loadTsConfig(cwd: string = process.cwd()) {
const result = loadTsconfig({cwd});
const compilerOptions = result?.tsConfig.compilerOptions || {};
if (
compilerOptions.experimentalDecorators === false &&
compilerOptions.emitDecoratorMetadata === undefined
Expand Down
Loading

0 comments on commit 13efde2

Please sign in to comment.