Skip to content

Commit fa4423b

Browse files
committed
chore: move noUncheckedIndexedAccess from base config to the lib config
1 parent 051d720 commit fa4423b

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

tsconfig.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@
3232
// Strict mode is on by default in TS 6+
3333
"strict": true,
3434

35-
// See <https://www.semver-ts.org/formal-spec/5-compiler-considerations.html#strictness>
36-
// These 2 options are also part of the recommended tsconfig as of TS 5.9
37-
"noUncheckedIndexedAccess": true,
35+
// This option is part of the recommended tsconfig as of TS 5.9.
3836
// Commented out for now. It's hard to land in the current ecosystem.
3937
// Needs more consensus before moving forward.
4038
// "exactOptionalPropertyTypes": true,

tsconfig.lib.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,13 @@
99
// For example, its types must be compatible with the Vue types.
1010
// So we don't want to skip the type checking of its dependencies.
1111
"skipLibCheck": false,
12+
13+
// See <https://www.semver-ts.org/formal-spec/5-compiler-considerations.html#strictness>
14+
// Part of the recommended tsconfig as of TS 5.9.
15+
// Flags starting with `no` are likely to have false positives,
16+
// So they are not suitable for existing codebases, but are recommended for new codebases,
17+
// as well as libraries that need to be more strict about their types.
18+
// See also <https://github.com/vuejs/tsconfig/issues/38#issuecomment-3524621112> for more discussion.
19+
"noUncheckedIndexedAccess": true,
1220
}
1321
}

0 commit comments

Comments
 (0)