{"id":15420446,"url":"https://github.com/sandersn/vue-ts-plugin","last_synced_at":"2025-04-15T16:58:43.356Z","repository":{"id":66341756,"uuid":"83819626","full_name":"sandersn/vue-ts-plugin","owner":"sandersn","description":"Typescript Language Service Plugin for Vue","archived":false,"fork":false,"pushed_at":"2017-04-25T18:10:39.000Z","size":24,"stargazers_count":62,"open_issues_count":1,"forks_count":20,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-15T16:58:36.505Z","etag":null,"topics":["plugin","typescript","vue"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sandersn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-03T16:40:35.000Z","updated_at":"2023-12-15T14:22:18.000Z","dependencies_parsed_at":"2023-03-10T16:45:33.512Z","dependency_job_id":null,"html_url":"https://github.com/sandersn/vue-ts-plugin","commit_stats":{"total_commits":24,"total_committers":3,"mean_commits":8.0,"dds":"0.20833333333333337","last_synced_commit":"ff85949fa0f801cb619a86d0dc1175e2a7a62492"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandersn%2Fvue-ts-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandersn%2Fvue-ts-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandersn%2Fvue-ts-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandersn%2Fvue-ts-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sandersn","download_url":"https://codeload.github.com/sandersn/vue-ts-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249116230,"owners_count":21215142,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["plugin","typescript","vue"],"created_at":"2024-10-01T17:29:17.835Z","updated_at":"2025-04-15T16:58:43.331Z","avatar_url":"https://github.com/sandersn.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TypeScript Language Service Plugin for Vue\n\nWARNING: This plugin is in an alpha state. For a more polished\nexperience,\n[try the VS Code plugin vetur](https://marketplace.visualstudio.com/items?itemName=octref.vetur).\nThis plugin, however, works with the Typescript language service. So\nyou can use it with whatever editor you want.\n\nThis plugin does three things for Javascript and Typescript source in a `.vue` file:\n\n1. It uses `vue-template-compiler` to parse out the script section of a `.vue` file.\n2. It wraps a default exported object literal in `new Vue(...)` in order to propagate the Vue contextual type so that no type annotations are needed.\n3. It uses the Typescript language service to provide completions.\n\nIt also resolves `import other from \"other.vue\";` statements in the same manner.\nIt does *not* support completions in the `template` tag. It doesn't\neven support the `template` or `style` tags.\n\n## Features left to add\n\n1. Recognise ES5-style `module.exports = { ...` in addition to ES6 `export default { ...`.\n2. Recognise only lang=\"javascript\", lang=\"typescript\" and no lang attribute. Others should not turn on the language service.\n\n## Instructions\n\n1. `$ npm install vue-ts-plugin`\n2. Add plugin to tsconfig.\n\n```json\n{\n  compilerOptions: {\n    \"allowSyntheticDefaultImports\": true,\n    \"plugins\": [{ \"name\": \"vue-ts-plugin\" }]\n  }\n}\n```\nYou will need \"allowSyntheticDefaultImports\" so that `import Vue from 'vue'` works.\n\n3. Set your editor to treat `.vue` files as Typescript.\n\nFor example, in Emacs, add the line:\n\n```elisp\n(add-to-list 'auto-mode-alist '(\"\\\\.vue$\" . typescript-mode))\n```\n\nIf you're Vim user, you can use [tsuquyomi-vue](https://github.com/Quramy/tsuquyomi-vue).\n\nNow you have typescript support inside the script tags. HTML and CSS support are non-existent right now.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandersn%2Fvue-ts-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsandersn%2Fvue-ts-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandersn%2Fvue-ts-plugin/lists"}