Skip to content

Commit 998c507

Browse files
praxxysmapsandapps
andauthored
docs(quickstart): remove typescript for imports and tests (#2216)
* Update quickstart.md Currently, the "use Javascript" section is incomplete as Jest is still configured to use Typescript and running `npm run test:unit` will throw errors. The section was revised to to include Jest Javascript configuration changes. --------- Co-authored-by: Shawn Taylor <shawn@ionic.io>
1 parent 2f1a769 commit 998c507

File tree

3 files changed

+24
-18
lines changed

3 files changed

+24
-18
lines changed

docs/vue/quickstart.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,19 @@ So, if you’d prefer to use JavaScript instead of TypeScript, you can. After ge
4848
npm uninstall --save typescript @types/jest @typescript-eslint/eslint-plugin @typescript-eslint/parser @vue/cli-plugin-typescript @vue/eslint-config-typescript
4949
```
5050

51-
2. Change all `.ts` files to `.js`. In a blank Ionic Vue app, this should only be `src/router/index.ts` and `src/main.ts`.
51+
2. Change all `.ts` files to `.js`. In a blank Ionic Vue app, this should only be `src/router/index.ts` and `src/main.ts`. If you're using tests, also change the extension of files in the `tests` directory.
5252

53-
3. Remove `@vue/typescript/recommended` and `@typescript-eslint/no-explicit-any: ‘off’, `from `.eslintrc.js`.
53+
3. In `index.html`, change the imported `<script>` file from `/src/main.ts` to `/src/main.js`.
5454

55-
4. Remove `Array<RouteRecordRaw>` from `src/router/index.js`.
55+
4. Remove `@vue/typescript/recommended` and `@typescript-eslint/no-explicit-any: ‘off’, `from `.eslintrc.js`.
5656

57-
5. Delete the `src/shims-vue.d.ts` file.
57+
5. Remove `Array<RouteRecordRaw>` and the import of `RouteRecordRaw` from `src/router/index.js`.
5858

59-
6. Remove `lang="ts"` from the `script` tags in any of your Vue components that have them. In a blank Ionic Vue app, this should only be `src/App.vue` and `src/views/HomePage.vue`.
59+
6. Delete the `src/shims-vue.d.ts` file if it exists. This is only needed when using the Vue CLI.
6060

61-
7. Delete the `tsconfig.json` file.
61+
7. Remove `lang="ts"` from the `script` tags in any of your Vue components that have them. In a blank Ionic Vue app, this should only be `src/App.vue` and `src/views/HomePage.vue`.
62+
63+
8. Delete the `tsconfig.json` file.
6264

6365
## A look at a Vue Component
6466

versioned_docs/version-v5/vue/quickstart.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,19 @@ So, if you’d prefer to use JavaScript instead of TypeScript, you can. After ge
4141
npm uninstall --save typescript @types/jest @typescript-eslint/eslint-plugin @typescript-eslint/parser @vue/cli-plugin-typescript @vue/eslint-config-typescript
4242
```
4343

44-
2. Change all `.ts` files to `.js`. In a blank Ionic Vue app, this should only be `src/router/index.ts` and `src/main.ts`.
44+
2. Change all `.ts` files to `.js`. In a blank Ionic Vue app, this should only be `src/router/index.ts` and `src/main.ts`. If you're using tests, also change the extension of files in the `tests` directory.
4545

46-
3. Remove `@vue/typescript/recommended` and `@typescript-eslint/no-explicit-any: ‘off’, `from `.eslintrc.js`.
46+
3. In `index.html`, change the imported `<script>` file from `/src/main.ts` to `/src/main.js`.
4747

48-
4. Remove `Array<RouteRecordRaw>` from `src/router/index.js`.
48+
4. Remove `@vue/typescript/recommended` and `@typescript-eslint/no-explicit-any: ‘off’, `from `.eslintrc.js`.
4949

50-
5. Delete the `src/shims-vue.d.ts` file.
50+
5. Remove `Array<RouteRecordRaw>` and the import of `RouteRecordRaw` from `src/router/index.js`.
5151

52-
6. Remove `lang="ts"` from the `script` tags in any of your Vue components that have them. In a blank Ionic Vue app, this should only be `src/App.vue` and `src/views/HomePage.vue`.
52+
6. Delete the `src/shims-vue.d.ts` file if it exists. This is only needed when using the Vue CLI.
5353

54-
7. Delete the `tsconfig.json` file.
54+
7. Remove `lang="ts"` from the `script` tags in any of your Vue components that have them. In a blank Ionic Vue app, this should only be `src/App.vue` and `src/views/HomePage.vue`.
55+
56+
8. Delete the `tsconfig.json` file.
5557

5658
## A look at a Vue Component
5759

versioned_docs/version-v6/vue/quickstart.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,19 @@ So, if you’d prefer to use JavaScript instead of TypeScript, you can. After ge
4848
npm uninstall --save typescript @types/jest @typescript-eslint/eslint-plugin @typescript-eslint/parser @vue/cli-plugin-typescript @vue/eslint-config-typescript
4949
```
5050

51-
2. Change all `.ts` files to `.js`. In a blank Ionic Vue app, this should only be `src/router/index.ts` and `src/main.ts`.
51+
2. Change all `.ts` files to `.js`. In a blank Ionic Vue app, this should only be `src/router/index.ts` and `src/main.ts`. If you're using tests, also change the extension of files in the `tests` directory.
5252

53-
3. Remove `@vue/typescript/recommended` and `@typescript-eslint/no-explicit-any: ‘off’, `from `.eslintrc.js`.
53+
3. In `index.html`, change the imported `<script>` file from `/src/main.ts` to `/src/main.js`.
5454

55-
4. Remove `Array<RouteRecordRaw>` from `src/router/index.js`.
55+
4. Remove `@vue/typescript/recommended` and `@typescript-eslint/no-explicit-any: ‘off’, `from `.eslintrc.js`.
5656

57-
5. Delete the `src/shims-vue.d.ts` file.
57+
5. Remove `Array<RouteRecordRaw>` and the import of `RouteRecordRaw` from `src/router/index.js`.
5858

59-
6. Remove `lang="ts"` from the `script` tags in any of your Vue components that have them. In a blank Ionic Vue app, this should only be `src/App.vue` and `src/views/HomePage.vue`.
59+
6. Delete the `src/shims-vue.d.ts` file if it exists. This is only needed when using the Vue CLI.
6060

61-
7. Delete the `tsconfig.json` file.
61+
7. Remove `lang="ts"` from the `script` tags in any of your Vue components that have them. In a blank Ionic Vue app, this should only be `src/App.vue` and `src/views/HomePage.vue`.
62+
63+
8. Delete the `tsconfig.json` file.
6264

6365
## A look at a Vue Component
6466

0 commit comments

Comments
 (0)