Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use standard TypeScript config #159

Merged
merged 1 commit into from
Jul 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
],
"scripts": {
"setup": "yarn install && yarn allow-scripts",
"build": "tsc --project ./tsconfig.prod.json && tsc --project ./tsconfig.test.json",
"build": "tsc --project ./tsconfig.json && tsc --project ./tsconfig.test.json",
"lint:eslint": "eslint . --cache --ext js,ts",
"lint:json": "prettier '**/*.json' --ignore-path .gitignore",
"lint": "yarn lint:eslint && yarn lint:json --check",
Expand Down
9 changes: 7 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@
"compilerOptions": {
"declaration": true,
"esModuleInterop": true,
"inlineSources": true,
"lib": ["ES2020"],
"module": "CommonJS",
"moduleResolution": "node",
"moduleResolution": "Node",
"outDir": "dist",
"rootDir": "src",
"sourceMap": true,
"target": "ES2017",
"typeRoots": ["./node_modules/@types"]
}
},
"include": ["./src/**/*.ts"]
}
7 changes: 0 additions & 7 deletions tsconfig.prod.json

This file was deleted.

5 changes: 4 additions & 1 deletion tsconfig.test.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"declaration": false,
"inlineSources": false,
"rootDir": "",
"outDir": "",
Comment on lines +6 to +7
Copy link
Member

@rekmarks rekmarks Jul 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've never seen this before. Do we output the test index.js to the repo root?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope! Seemingly this "unsets" the outDir set in the base config. So it defaults to outputting it alongside the source, in the test directory.

"sourceMap": false
},
"files": ["./test/index.ts"]
"include": ["./test/index.ts"]
}