diff options
author | 2023-01-17 03:36:15 +0100 | |
---|---|---|
committer | 2023-01-17 10:36:15 +0800 | |
commit | 63d5d89038dc8cddf0a137672b68f61a21bb4951 (patch) | |
tree | 852fbc440bae68f90130600855f66d8a0dadc444 | |
parent | b66d7195c17a55ea0931bc3744888bd4f5f01ce6 (diff) | |
download | astro-63d5d89038dc8cddf0a137672b68f61a21bb4951.tar.gz astro-63d5d89038dc8cddf0a137672b68f61a21bb4951.tar.zst astro-63d5d89038dc8cddf0a137672b68f61a21bb4951.zip |
Add missing `noPropertyAccessFromIndexSignature` to strictest tsconfig profile (#5864)
Diffstat (limited to '')
-rw-r--r-- | .changeset/smooth-cycles-sing.md | 7 | ||||
-rw-r--r-- | packages/astro/tsconfigs/strictest.json | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/.changeset/smooth-cycles-sing.md b/.changeset/smooth-cycles-sing.md new file mode 100644 index 000000000..d00bf0331 --- /dev/null +++ b/.changeset/smooth-cycles-sing.md @@ -0,0 +1,7 @@ +--- +'astro': patch +--- + +The `noPropertyAccessFromIndexSignature` typescript configuration option was added to the `strictest` profile. + +This will have no impact at runtime, but may affect code checks on codebases which do not already use this check. diff --git a/packages/astro/tsconfigs/strictest.json b/packages/astro/tsconfigs/strictest.json index f59dc4f6c..adabf0142 100644 --- a/packages/astro/tsconfigs/strictest.json +++ b/packages/astro/tsconfigs/strictest.json @@ -8,6 +8,8 @@ "noImplicitOverride": true, // Force functions to specify that they can return `undefined` if a possible code path does not return a value. "noImplicitReturns": true, + // Ensures consistency between accessing a field via the “dot” (obj.key) syntax, and “indexed” (obj["key"]) and the way which the property is declared in the type. + "noPropertyAccessFromIndexSignature": true, // Report an error when a variable is declared but never used. "noUnusedLocals": true, // Report an error when a parameter is declared but never used. |