feat(tsconfigs): Enable allowJs in base preset (#7274)

This commit is contained in:
Erika 2023-06-05 17:31:21 +02:00 committed by GitHub
parent 4c33576a6c
commit b5213654b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 2 deletions

View file

@ -0,0 +1,5 @@
---
'astro': minor
---
Update base `tsconfig.json` template with `allowJs: true` to provide a better relaxed experience for users unfamilliar with TypeScript. `allowJs` is still set to `false` (its default value) when using the `strictest` preset.

View file

@ -25,6 +25,8 @@
}, },
// TypeScript 5.0 changed how `isolatedModules` and `importsNotUsedAsValues` works, deprecating the later // TypeScript 5.0 changed how `isolatedModules` and `importsNotUsedAsValues` works, deprecating the later
// Until the majority of users are on TypeScript 5.0, we'll have to supress those deprecation errors // Until the majority of users are on TypeScript 5.0, we'll have to supress those deprecation errors
"ignoreDeprecations": "5.0" "ignoreDeprecations": "5.0",
// Allow JavaScript files to be imported
"allowJs": true
} }
} }

View file

@ -19,6 +19,8 @@
// Report an error for unreachable code instead of just a warning. // Report an error for unreachable code instead of just a warning.
"allowUnreachableCode": false, "allowUnreachableCode": false,
// Report an error for unused labels instead of just a warning. // Report an error for unused labels instead of just a warning.
"allowUnusedLabels": false "allowUnusedLabels": false,
// Disallow JavaScript files from being imported
"allowJs": false
} }
} }