Skip to content

docs(quickstart): remove typescript for imports and tests #2216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 17, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/vue/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ So, if you’d prefer to use JavaScript instead of TypeScript, you can. After ge
npm uninstall --save typescript @types/jest @typescript-eslint/eslint-plugin @typescript-eslint/parser @vue/cli-plugin-typescript @vue/eslint-config-typescript
```

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`.
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.

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

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

5. Delete the `src/shims-vue.d.ts` file.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the shims-vue line still be present?

Copy link
Contributor

Choose a reason for hiding this comment

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

That file doesn't exist when I create a blank vue starter.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah right. That was specific to the Vue CLI applications which you'll get when using Ionic CLI <= 6: https://github.com/ionic-team/starters/blob/main/vue/base/src/shims-vue.d.ts. Developers on Ionic CLI >=7 will get Vite apps which does not have that file. Maybe we can say "Delete the src/shims-vue.d.ts file if it exists. This is only needed when using the Vue CLI."

5. Remove `Array<RouteRecordRaw>` and the import of `RouteRecordRaw` from `src/router/index.js`.

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`.

Expand Down
8 changes: 4 additions & 4 deletions versioned_docs/version-v5/vue/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ So, if you’d prefer to use JavaScript instead of TypeScript, you can. After ge
npm uninstall --save typescript @types/jest @typescript-eslint/eslint-plugin @typescript-eslint/parser @vue/cli-plugin-typescript @vue/eslint-config-typescript
```

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`.
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.

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

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

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

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`.

Expand Down
8 changes: 4 additions & 4 deletions versioned_docs/version-v6/vue/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ So, if you’d prefer to use JavaScript instead of TypeScript, you can. After ge
npm uninstall --save typescript @types/jest @typescript-eslint/eslint-plugin @typescript-eslint/parser @vue/cli-plugin-typescript @vue/eslint-config-typescript
```

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`.
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.

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

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

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

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`.

Expand Down