A Vue 3 and TypeScript starter using Vite, Vitest, Yarn 4, ESLint, Sass, and GitHub security scanning.
This repository is a small, modern Vue application baseline. It is set up for fast local development, Vue-aware type checking, colocated component tests, and CI coverage across current Node LTS/runtime targets.
- Background
- Install
- Usage
- Development
- Testing
- CI and Security
- Project Structure
- Maintainers
- Contributing
- License
The app is intentionally minimal. It keeps Vue Router and Vuex installed as starter dependencies, but the current runtime only mounts the root Vue app and a demo counter component.
The source tree follows a Vite-oriented Vue layout:
src/app/contains the app shell.src/components/contains feature/component folders.- Component styles and tests are colocated with the component they exercise.
public/contains static assets served by Vite.
Requirements:
- Node 22 or newer
- Yarn 4 via Corepack
corepack enable
yarn install --immutableStart the Vite dev server:
yarn devVite prints the local URL when the server starts, usually http://localhost:5173.
Preview a production build:
yarn build
yarn previewAvailable scripts:
yarn dev: start the Vite dev server.yarn serve: alias foryarn dev.yarn build: run Vue type checking and create a production build indist/.yarn preview: preview the production build locally.yarn lint: run ESLint.yarn typecheck: run Vue-aware TypeScript checks.yarn test: run Vitest once.yarn test:watch: run Vitest in watch mode.
Run the local verification set before pushing:
yarn lint
yarn typecheck
yarn test
yarn buildVitest runs component tests in a jsdom environment with Vue Test Utils. The example component test is colocated at src/components/DemoCounter/DemoCounter.spec.ts.
GitHub Actions workflows:
.github/workflows/node.js.yml: CI matrix for Node 22 and Node 24. Runs install, lint, type check, tests, and build..github/workflows/codeql.yml: CodeQL scanning for JavaScript/TypeScript and GitHub Actions workflows on push, pull request, weekly schedule, and manual dispatch..github/workflows/dependency-review.yml: dependency review on pull requests, failing high and critical vulnerability findings.
Dependabot checks GitHub Actions and package updates weekly via .github/dependabot.yml.
base-vue/
├── index.html
├── vite.config.ts
├── eslint.config.cjs
├── tsconfig.json
├── public/
│ └── favicon.ico
├── src/
│ ├── main.ts
│ ├── vite-env.d.ts
│ ├── app/
│ │ └── App.vue
│ ├── assets/
│ │ └── logo.png
│ └── components/
│ └── DemoCounter/
│ ├── DemoCounter.vue
│ ├── DemoCounter.scss
│ └── DemoCounter.spec.ts
└── .github/
├── dependabot.yml
└── workflows/
├── codeql.yml
├── dependency-review.yml
└── node.js.yml
Use pull requests into main. Keep changes focused, update tests or docs when behavior changes, and run the local verification set before requesting review:
yarn lint
yarn typecheck
yarn test
yarn buildNo license file is currently present. All rights are reserved unless a license is added.