Skip to content

Commit

Permalink
docs: improvements based on suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
emmenko committed Jun 30, 2022
1 parent 595a145 commit 785d879
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion website/src/content/development/adding-typescript.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,18 @@ By default, this is included in the TypeScript starter template `src/index.tsx`
You can also include this in the `tsconfig.json` file in the `compilerOptions.types` field but we don't recommend
to use that unless you are very familiar with the [implications of using the `types` field](https://www.typescriptlang.org/tsconfig#types).

Additional adjustments to other config files is also required, in particular:
Additional adjustments to other config files are also required, in particular:

- `.prettierrc`: use the `typescript` parser.
- `jest.test.config.js`: use the `@commercetools-frontend/jest-preset-mc-app/typescript` preset.
- `jest.eslint.config.js`: include the file extensions `ts` and `tsx` in `moduleFileExtensions`, then `<rootDir>/**/*.ts` and `<rootDir>/**/*.tsx` in `testMatch`.

<Info>

The TypeScript setup is already preconfigured when using the TypeScript starter template. Consider this document as a reference to match your setup.

</Info>

# Migrate to TypeScript

If you have an existing Custom Application project and would like to migrate it to TypeScript, you need to do the following:
Expand Down

0 comments on commit 785d879

Please sign in to comment.