Skip to content

Commit

Permalink
Simplify tsconfig.json configs
Browse files Browse the repository at this point in the history
  • Loading branch information
yenbekbay committed Nov 1, 2022
1 parent 3de4ced commit 2590f6d
Show file tree
Hide file tree
Showing 6 changed files with 201 additions and 56 deletions.
15 changes: 14 additions & 1 deletion apps/next/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
{
"extends": "../../tsconfig-base.json",
"extends": "@tsconfig/strictest/tsconfig.json",
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"noEmit": true,
"incremental": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"baseUrl": "."
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@
"**/*.{js,ts,tsx}": "eslint --ext .js,.ts,.tsx --cache --fix"
},
"devDependencies": {
"@ianvs/prettier-plugin-sort-imports": "3.4.2",
"@roarr/cli": "5.7.0",
"@trivago/prettier-plugin-sort-imports": "3.4.0",
"@tsconfig/strictest": "1.0.2",
"@types/jest": "29.0.0",
"@types/node": "16.11.12",
"@types/prettier": "2.7.0",
Expand Down
190 changes: 171 additions & 19 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion prettier.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = {
importOrderSortSpecifiers: true,
jsxSingleQuote: false,
plugins: [
require.resolve('@ianvs/prettier-plugin-sort-imports'),
require.resolve('@trivago/prettier-plugin-sort-imports'),
require.resolve('prettier-plugin-packagejson'),
],
printWidth: 80,
Expand Down
30 changes: 0 additions & 30 deletions tsconfig-base.json

This file was deleted.

17 changes: 13 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
{
"extends": "./tsconfig-base.json",
"extends": "@tsconfig/strictest/tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": false,
"esModuleInterop": true,
"exactOptionalPropertyTypes": false,
"importsNotUsedAsValues": "remove",
"jsx": "react-jsx",
"jsxImportSource": "react"
"jsxImportSource": "react",
"module": "ES2020",
"moduleResolution": "Node",
"noEmit": true,
"target": "ES2020"
},
"include": ["/apps/next/next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["**/node_modules"]
"include": ["**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}

0 comments on commit 2590f6d

Please sign in to comment.