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

Refactor tsconfig.json #2250

Merged
merged 8 commits into from
Feb 9, 2023
Merged
Changes from 1 commit
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
Next Next commit
Refactor tsconfig.json
wooorm committed Feb 9, 2023

Verified

This commit was signed with the committer’s verified signature.
Doctor-wu Doctor Wu
commit 478548cfb05972b301d94bbfe60a777839034439
2 changes: 1 addition & 1 deletion packages/esbuild/lib/index.js
Original file line number Diff line number Diff line change
@@ -225,7 +225,7 @@ export function esbuild(options = {}) {
// V8 on Erbium.
/* c8 ignore next 9 */
return {
contents: value,
contents: value || '',
errors,
warnings,
resolveDir: http.test(file.path)
7 changes: 6 additions & 1 deletion packages/rollup/lib/index.js
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@
* @typedef {import('@rollup/pluginutils').FilterPattern} FilterPattern
* @typedef {Omit<import('@mdx-js/mdx').CompileOptions, 'SourceMapGenerator'>} CompileOptions
* @typedef {import('rollup').Plugin} Plugin
* @typedef {import('rollup').SourceDescription} SourceDescription
*
* @typedef RollupPluginOptions
* @property {FilterPattern} [include]
@@ -42,7 +43,11 @@ export function rollup(options = {}) {
extnames.includes(file.extname)
) {
const compiled = await process(file)
return {code: String(compiled.value), map: compiled.map}
const code = String(compiled.value)
/** @type {SourceDescription} */
// @ts-expect-error: a) `undefined` is fine, b) `sourceRoot: undefined` is fine too.
const result = {code, map: compiled.map}
return result
// V8 on Erbium.
/* c8 ignore next 2 */
}
11 changes: 7 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{
"compilerOptions": {
"target": "es2021",
"lib": ["es2021"],
"module": "node16",
"checkJs": true,
"declaration": true,
"emitDeclarationOnly": true,
"exactOptionalPropertyTypes": true,
"forceConsistentCasingInFileNames": true,
"lib": ["es2021"],
"module": "node16",
"newLine": "lf",
"skipLibCheck": true,
"strict": true
"strict": true,
"target": "es2021"
}
}