Skip to content

Commit

Permalink
feat(application-config): shared tsconfig.json (#2628)
Browse files Browse the repository at this point in the history
* feat: add shareable tsconfig as a package

* chore: add changeset

* chore: move tsconfig to application-config package

chore: yarn.lock changes

* chore: include tsconfig in the npm package

* refactor(config): adjust tsconfig naming and default options

Co-authored-by: Nicola Molinari <nicola.molinari@commercetools.com>
  • Loading branch information
kark and emmenko authored Jun 3, 2022
1 parent 8829ae8 commit 0b3ea75
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .changeset/beige-moles-listen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
'@commercetools-frontend/application-config': minor
---

Expose a base `tsconfig-mc-app.json` file to be used in a Custom Application TypeScript project.

In your `tsconfig.json` file, extend the base config from the `@commercetools-frontend/application-config` package:

```json
{
"extends": "@commercetools-frontend/application-config/tsconfig-mc-app.json"
}
```
1 change: 1 addition & 0 deletions packages/application-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"ssr",
"scripts",
"schema.json",
"tsconfig-mc-app.json",
"package.json",
"LICENSE",
"README.md"
Expand Down
31 changes: 31 additions & 0 deletions packages/application-config/tsconfig-mc-app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Custom Application",

"compilerOptions": {
"allowJs": false,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"importHelpers": true,
"isolatedModules": true,
"jsx": "react-jsx",
"jsxImportSource": "@emotion/react",
"lib": ["ESNext", "DOM"],
"module": "ESNext",
"moduleResolution": "Node",
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"preserveSymlinks": true,
"removeComments": true,
"resolveJsonModule": true,
"sourceMap": true,
"strict": true,
"strictNullChecks": true,
"stripInternal": true,
"target": "ES2022"
}
}

1 comment on commit 0b3ea75

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for merchant-center-application-kit ready!

✅ Preview
https://merchant-center-application-pp3s1645q-commercetools.vercel.app

Built with commit 0b3ea75.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.