0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-30 22:03:56 -05:00

Enable allowJs for strictest.json (#10762)

* feat: enable `allowJs` for `strictest.json`

* chore: changeset

* edit: enables

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
This commit is contained in:
Ben Holmes 2024-04-24 11:33:49 -04:00 committed by GitHub
parent 8b59d5d078
commit 43ead8fbd5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 3 deletions

View file

@ -0,0 +1,7 @@
---
"astro": minor
---
Enables type checking for JavaScript files when using the `strictest` TS config. This ensures consistency with Astro's other TS configs, and fixes type checking for integrations like Astro DB when using an `astro.config.mjs`.
If you are currently using the `strictest` preset and would like to still disable `.js` files, set `allowJS: false` in your `tsconfig.json`.

View file

@ -19,8 +19,6 @@
// 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
} }
} }