Skip to content

Commit e3f4e41

Browse files
authored
feat!: don't read strict from tsconfig.json (#11)
1 parent e5dcbfc commit e3f4e41

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/index.ts

-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ export function convertTsConfig(
3131
jsxFactory = 'React.createElement',
3232
jsxFragmentFactory = 'React.Fragment',
3333
jsxImportSource = 'react',
34-
strict = false,
3534
alwaysStrict = false,
3635
noImplicitUseStrict = false,
3736
paths,
@@ -44,7 +43,6 @@ export function convertTsConfig(
4443
sourceMaps: sourceMap,
4544
module: {
4645
type: ['commonjs', 'amd', 'umd'].includes(module) ? module : 'commonjs',
47-
strict,
4846
strictMode: alwaysStrict || !noImplicitUseStrict,
4947
noInterop: !esModuleInterop,
5048
} as swcType.ModuleConfig,

test/index.ts

+6
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,9 @@ test('convert tsconfig file', (t) => {
3333

3434
t.end()
3535
})
36+
37+
test('ignores strict from tsconfig', (t) => {
38+
const result = convert()
39+
t.equal(result.module?.strict, undefined)
40+
t.end()
41+
})

0 commit comments

Comments
 (0)