Skip to content

Commit

Permalink
default target ES2022 to avoid unnecessary old JS code like 'use stri…
Browse files Browse the repository at this point in the history
…ct' at the top of the file and easier debugging of dist files, plus top level await support
  • Loading branch information
samuelstroschein committed Jan 24, 2025
1 parent 262d640 commit 16cf0e1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .changeset/shy-ways-wonder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
"@opral/tsconfig": minor
---

default target ES2022 to avoid unnecessary old JS code like 'use strict' at the top of the file and easier debugging of dist files, plus top level await support

```diff
{
"compilerOptions": {
...
+ "target": "ES2022"
}
}
```
5 changes: 5 additions & 0 deletions packages/tsconfig/tsconfig.default.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
{
"compilerOptions": {
"sourceMap": true,
// Module 16 ensures standard module resolution that works anywhere.
"module": "Node16",
"moduleResolution": "Node16",
// Target ES2022 by default to avoid unnecessary old JS code like 'use strict' at the top of the file.
// and easier debugging of dist files
"target": "ES2022",
"allowSyntheticDefaultImports": true,
"resolveJsonModule": false,
"declaration": true,
"strict": true,
// live safer option because some OSes are case-insensitive.
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true,
"skipDefaultLibCheck": true,
Expand Down

0 comments on commit 16cf0e1

Please sign in to comment.