Skip to content

Commit

Permalink
Refactoring common tsconfig (#9507)
Browse files Browse the repository at this point in the history
  • Loading branch information
fungairino authored Nov 12, 2024
1 parent e80e6e6 commit f427855
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 36 deletions.
1 change: 0 additions & 1 deletion applications/browser-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@
"@playwright/test": "^1.48.2",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.15",
"@shopify/jest-dom-mocks": "^5.2.0",
"@sindresorhus/tsconfig": "^6.0.0",
"@sinonjs/fake-timers": "^13.0.5",
"@storybook/addon-actions": "^7.6.17",
"@storybook/addon-essentials": "^7.6.17",
Expand Down
17 changes: 1 addition & 16 deletions applications/browser-extension/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,7 @@
{
// You can see the full details at https://github.com/sindresorhus/tsconfig/blob/main/tsconfig.json
// Note: `strict: true` enables many flags that aren’t explicitly listed in that file
"extends": "@sindresorhus/tsconfig",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"sourceMap": true,
"module": "esnext",
"target": "es2023",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"baseUrl": ".",
"outDir": null,
"declaration": false,

// TODO: Drop these lines to make TS stricter https://github.com/pixiebrix/pixiebrix-extension/issues/775
"strictFunctionTypes": false,
"noPropertyAccessFromIndexSignature": false,
"noImplicitReturns": false,
"noUnusedParameters": false,
"paths": {
"@/*": ["src/*"],
"@img/*": ["img/*"],
Expand Down
20 changes: 2 additions & 18 deletions libraries/utils/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,9 @@
{
// You can see the full details at https://github.com/sindresorhus/tsconfig/blob/main/tsconfig.json
// Note: `strict: true` enables many flags that aren’t explicitly listed in that file
"extends": "@sindresorhus/tsconfig",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"sourceMap": true,
"module": "esnext",
"target": "es2023",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"baseUrl": ".",
"outDir": null,
"declaration": false,

// TODO: Drop these lines to make TS stricter https://github.com/pixiebrix/pixiebrix-extension/issues/775
"strictFunctionTypes": false,
"noPropertyAccessFromIndexSignature": false,
"noImplicitReturns": false,
"noUnusedParameters": false,
"paths": {
"@/*": ["src/*"]
}
},
"exclude": ["node_modules"]
}
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
},
"devDependencies": {
"knip": "^5.36.7",
"prettier": "3.1.0"
"prettier": "3.1.0",
"@sindresorhus/tsconfig": "^6.0.0"
}
}
3 changes: 3 additions & 0 deletions pixiebrix-extension.iml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
<excludeFolder url="file://$MODULE_DIR$/applications/browser-extension/scripts/bin" />
<excludeFolder url="file://$MODULE_DIR$/.playwright-report" />
<excludeFolder url="file://$MODULE_DIR$/applications/browser-extension/dist" />
<excludeFolder url="file://$MODULE_DIR$/applications/browser-extension/node_modules" />
<excludeFolder url="file://$MODULE_DIR$/libraries/utils/coverage" />
<excludePattern pattern="applications/browser-extension/report.html" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
Expand Down
22 changes: 22 additions & 0 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
// You can see the full details at https://github.com/sindresorhus/tsconfig/blob/main/tsconfig.json
// Note: `strict: true` enables many flags that aren’t explicitly listed in that file
"extends": "@sindresorhus/tsconfig",
"compilerOptions": {
"sourceMap": true,
"module": "esnext",
"target": "es2023",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"baseUrl": ".",
"outDir": null,
"declaration": false,

// TODO: Drop these lines to make TS stricter https://github.com/pixiebrix/pixiebrix-extension/issues/775
"strictFunctionTypes": false,
"noPropertyAccessFromIndexSignature": false,
"noImplicitReturns": false,
"noUnusedParameters": false
},
"exclude": ["node_modules"]
}

0 comments on commit f427855

Please sign in to comment.