Skip to content

Commit

Permalink
feat(config): add shared typescript config
Browse files Browse the repository at this point in the history
  • Loading branch information
douglasduteil committed Feb 6, 2025
1 parent 88b916d commit d24bf54
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 11 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ RUN --mount=type=bind,source=package.json,target=package.json \
--mount=type=bind,source=packages/core/package.json,target=packages/core/package.json \
--mount=type=bind,source=packages/crisp/package.json,target=packages/crisp/package.json \
--mount=type=bind,source=packages/debounce/package.json,target=packages/debounce/package.json \
--mount=type=bind,source=packages/devtools/typescript/package.json,target=packages/devtools/typescript/package.json \
--mount=type=bind,source=packages/email/package.json,target=packages/email/package.json \
--mount=type=bind,source=packages/identite/package.json,target=packages/identite/package.json \
--mount=type=bind,source=packages/insee/package.json,target=packages/insee/package.json \
Expand All @@ -25,6 +26,7 @@ RUN --mount=type=bind,source=package.json,target=package.json \
--mount=type=bind,source=packages/core/package.json,target=packages/core/package.json \
--mount=type=bind,source=packages/crisp/package.json,target=packages/crisp/package.json \
--mount=type=bind,source=packages/debounce/package.json,target=packages/debounce/package.json \
--mount=type=bind,source=packages/devtools/typescript/package.json,target=packages/devtools/typescript/package.json \
--mount=type=bind,source=packages/email/package.json,target=packages/email/package.json \
--mount=type=bind,source=packages/identite/package.json,target=packages/identite/package.json \
--mount=type=bind,source=packages/insee/package.json,target=packages/insee/package.json \
Expand Down
27 changes: 27 additions & 0 deletions package-lock.json

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

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
},
"main": "src/index.js",
"workspaces": [
"packages/devtools/typescript",
"packages/core",
"packages/crisp",
"packages/debounce",
Expand Down Expand Up @@ -53,6 +54,7 @@
]
},
"dependencies": {
"@gouvfr-lasuite/proconnect.devtools.typescript": "workspace:*",
"@gouvfr-lasuite/proconnect.core": "workspace:*",
"@gouvfr-lasuite/proconnect.debounce": "workspace:*",
"@gouvfr-lasuite/proconnect.crisp": "workspace:*",
Expand Down
28 changes: 28 additions & 0 deletions packages/devtools/typescript/base/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "ProConnect Base",
"extends": "@tsconfig/strictest/tsconfig.json",
"compilerOptions": {
"checkJs": false,
"esModuleInterop": true,
"exactOptionalPropertyTypes": false,
"lib": ["ESNext"],
"module": "node16",
"moduleResolution": "node16",
"noFallthroughCasesInSwitch": true,
"noImplicitReturns": false,
"noPropertyAccessFromIndexSignature": true,
"noUncheckedIndexedAccess": false,
"noUnusedLocals": true,
"noUnusedParameters": true,
"skipLibCheck": true,
"strict": true,
"target": "es2022",
"types": [],
"composite": true,
"verbatimModuleSyntax": true,
"ignoreDeprecations": "5.0",
"isolatedModules": true,
"preserveWatchOutput": true
}
}
10 changes: 10 additions & 0 deletions packages/devtools/typescript/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "@gouvfr-lasuite/proconnect.devtools.typescript",
"version": "0.0.0",
"private": true,
"type": "module",
"files": [],
"dependencies": {
"@tsconfig/strictest": "2.0.5"
}
}
17 changes: 6 additions & 11 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,23 @@
"compilerOptions": {
"allowJs": true,
"allowSyntheticDefaultImports": true,
"jsx": "react-jsx",
"jsxImportSource": "@kitajs/html",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"jsx": "react-jsx",
"jsxImportSource": "@kitajs/html",
"module": "Preserve",
"moduleResolution": "Bundler",
"noFallthroughCasesInSwitch": true,
"noPropertyAccessFromIndexSignature": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"outDir": "./build",
"resolveJsonModule": true,
"rootDir": ".",
"verbatimModuleSyntax": true
"resolveJsonModule": true
},
"exclude": ["packages/*", "build/*"],
"exclude": ["packages/*", "build/*", "dist/*"],
"include": ["src"],
"references": [
{ "path": "./packages/core/tsconfig.lib.json" },
{ "path": "./packages/email/tsconfig.lib.json" },
{ "path": "./packages/identite/tsconfig.lib.json" },
{ "path": "./packages/insee/tsconfig.lib.json" }
],
"extends": "@tsconfig/node22/tsconfig.json"
"extends": "@gouvfr-lasuite/proconnect.devtools.typescript/base/tsconfig.json"
}

0 comments on commit d24bf54

Please sign in to comment.