Skip to content

Commit

Permalink
chore: update tsconfig and add type="module" (#1151)
Browse files Browse the repository at this point in the history
* chore: update tsconfig and add type="module"

* chore: run prettier

* chore: update file extension
  • Loading branch information
jpedroschmitz authored Dec 20, 2024
1 parent 50a3d15 commit 95a42d0
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 18 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'pnpm'

- name: Setup pnpm config
shell: bash
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"description": "A TypeScript starter for Next.js that includes all you need to build amazing projects",
"version": "1.0.0",
"private": true,
"author": "João Pedro Schmitz <[email protected]> (@jpedroschmitz)",
"type": "module",
"author": "João Pedro Schmitz (@jpedroschmitz)",
"license": "MIT",
"keywords": [
"nextjs",
Expand Down
37 changes: 21 additions & 16 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,35 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
/* Base Options: */
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"skipLibCheck": true,
"target": "es2022",
"allowJs": true,
"resolveJsonModule": true,
"moduleDetection": "force",
"isolatedModules": true,

/* Strictness */
"strict": true,
"noUncheckedIndexedAccess": true,
"checkJs": true,

/* Bundled projects */
"lib": ["dom", "dom.iterable", "es2022"],
"noEmit": true,
"module": "ESNext",
"moduleResolution": "Bundler",
"jsx": "preserve",
"plugins": [{ "name": "next" }],
"incremental": true,

/* Path Aliases */
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"],
"@/public/*": ["./public/*"]
},
"plugins": [
{
"name": "next"
}
]
}
},
"exclude": ["node_modules"],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"]
"include": [".eslintrc.mjs", "next-env.d.ts", "**/*.ts", "**/*.tsx", "**/*.cjs", "**/*.js", ".next/types/**/*.ts"]
}

0 comments on commit 95a42d0

Please sign in to comment.