Skip to content

Commit

Permalink
Enable allowJs for strictest.json (#10762)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
bholmesdev and sarah11918 committed Apr 24, 2024
1 parent 8b59d5d commit 43ead8f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .changeset/thirty-poems-chew.md
Original file line number Diff line number Diff line change
@@ -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`.
4 changes: 1 addition & 3 deletions packages/astro/tsconfigs/strictest.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
// Report an error for unreachable code instead of just a warning.
"allowUnreachableCode": false,
// Report an error for unused labels instead of just a warning.
"allowUnusedLabels": false,
// Disallow JavaScript files from being imported
"allowJs": false
"allowUnusedLabels": false
}
}

0 comments on commit 43ead8f

Please sign in to comment.