{"id":26582956,"url":"https://github.com/capybara003/nuxt-typescript","last_synced_at":"2026-04-09T23:04:27.769Z","repository":{"id":281890934,"uuid":"946505268","full_name":"Capybara003/nuxt-typescript","owner":"Capybara003","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-11T08:47:34.000Z","size":147,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-11T17:54:07.954Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Capybara003.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":"2025-03-11T08:46:05.000Z","updated_at":"2025-03-11T08:47:44.000Z","dependencies_parsed_at":"2025-03-11T17:54:21.476Z","dependency_job_id":"f14a64b1-699d-40fa-831c-619830949a60","html_url":"https://github.com/Capybara003/nuxt-typescript","commit_stats":null,"previous_names":["capybara003/nuxt-typescript"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Capybara003%2Fnuxt-typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Capybara003%2Fnuxt-typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Capybara003%2Fnuxt-typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Capybara003%2Fnuxt-typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Capybara003","download_url":"https://codeload.github.com/Capybara003/nuxt-typescript/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245072945,"owners_count":20556460,"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":[],"created_at":"2025-03-23T08:19:10.381Z","updated_at":"2026-04-09T23:04:27.736Z","avatar_url":"https://github.com/Capybara003.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nuxt TypeScript Module\n\nLightening fast type checking and linting with [TypeScript][typescript] and [TSLint][tslint].\n\n```bash\nyarn add nuxt-typescript typescript tslint --dev\n```\n\nAdd `nuxt-typescript` to Nuxt's config:\n\n```js\n// nuxt.config.js\nmodule.exports = {\n  modules: [\"nuxt-typescript\"]\n}\n```\n\nConfigure `tsconfig.json` with the following settings:\n\n```json\n{\n  \"compilerOptions\": {\n    \"jsx\": \"preserve\",\n    \"target\": \"esnext\",\n    \"module\": \"esnext\",\n    \"moduleResolution\": \"node\",\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"~/*\": [\"./*\"],\n      \"@/*\": [\"./*\"]\n    },\n    \"strict\": true,\n    \"sourceMap\": true,\n    \"noUnusedLocals\": true,\n    \"experimentalDecorators\": true\n  }\n}\n```\n\nNow you can use TypeScript in your Nuxt project:\n\n```ts\n// core/utils.ts\nexport function reverseString(value: string) {\n  return value\n    .split(\"\")\n    .reverse()\n    .join(\"\")\n}\n```\n\n```ts\n// store/index.ts\nexport const state = () =\u003e ({\n  title: \"Nuxt + TypeScript\"\n})\n```\n\n```html\n\u003ctemplate\u003e\n  \u003cdiv\u003e\n    \u003ch1 v-text=\"title\"/\u003e\n    \u003cinput v-model=\"input\"/\u003e\n    \u003cpre v-text=\"reversed\"/\u003e\n  \u003c/div\u003e\n\u003c/template\u003e\n\n\u003cscript lang=\"ts\"\u003e\nimport { State } from 'vuex-class'\nimport { Component, Vue } from 'nuxt-property-decorator'\nimport { reverseString } from '~/core/utils'\n\n@Component\nexport default class extends Vue {\n\n  @State public title: string\n\n  public input = 'TypeScript'\n\n  head() {\n    return {\n      title: this.title\n    }\n  }\n\n  get reversed(): string {\n    return reverseString(this.input)\n  }\n}\n\u003c/script\u003e\n```\n\n**Check out the [working example](example).**\n\n## TSLint\n\nIf you want to use [TSLint][tslint] to lint your TypeScript files, simply create a `tslint.json` file at the root of your project:\n\n```json\n{\n  \"defaultSeverity\": \"warning\",\n  \"extends\": [\"tslint:latest\"]\n}\n```\n\nIt is recommended that you set `defaultSeverity` to \"warning\" so that linting errors can be distinguished from type errors.\n\n## Options\n\nOptions can be passed to `nuxt-typescript` via a `typescript` object in the Nuxt config file:\n\n```js\n// nuxt.config.js\nmodule.exports = {\n  modules: [\"nuxt-typescript\"],\n  typescript: {\n    formatter: \"default\"\n  }\n}\n```\n\n| Option      | Type      | Default         | Description                                                    |\n| ----------- | --------- | --------------- | -------------------------------------------------------------- |\n| `tsconfig`  | `String`  | \"tsconfig.json\" | Path to TypeScript config file.                                |\n| `tslint`    | `String`  | \"tslint.json\"   | Path to TSLint config file.                                    |\n| `formatter` | `String`  | \"codeframe\"     | TSLint formatter to use. Either \"default\" or \"codeframe\".      |\n| `parallel`  | `Boolean` | `true`          | Enable/disable `thread-loader` for production builds.          |\n| `checker`   | `Boolean` | `true`          | Enable/disable the TypeScript checker webpack plugin.          |\n| `babel`     | `Object`  | `null`          | Babel configuration options to be merged with Nuxt's defaults. |\n\n## Credits\n\nThanks to [Evan You][evanyou] and [Kevin Petit][kevinpetit] for their work on the [Vue CLI TypeScript plugin][vue-cli-typescript] from which a lot of the implementation is based.\n\nThanks to [John Lindquist][johnlindquist] for creating the [Nuxt TypeScript example][nuxt-typescript-example] that got this project started.\n\n## Author\n\n[Matthew Wagerfield][wagerfield]\n\n## License\n\n[MIT][mit]\n\n[nuxt]: https://nuxtjs.org\n[tslint]: https://palantir.github.io/tslint\n[typescript]: http://www.typescriptlang.org\n[nuxt-typescript-example]: https://github.com/nuxt/nuxt.js/tree/dev/examples/typescript\n[vue-cli-typescript]: https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-typescript\n[evanyou]: https://github.com/yyx990803\n[johnlindquist]: https://github.com/johnlindquist\n[kevinpetit]: https://github.com/kvpt\n[wagerfield]: https://github.com/wagerfield\n[mit]: https://opensource.org/licenses/MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapybara003%2Fnuxt-typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapybara003%2Fnuxt-typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapybara003%2Fnuxt-typescript/lists"}