A Vue 3 + TypeScript starter using Vue CLI (serve/build), Vite (Cypress Component Testing), Yarn 4, ESLint (Airbnb + Vue), and Sass.
- Node 22+
- Yarn 4 (via Corepack)
corepack enable
node -v # should be 22.x
yarn -v # Yarn 4.xyarn install --immutable
yarn serve- Dev server: http://localhost:8080
yarn serve: start the Vue CLI dev serveryarn build: production build todist/yarn lint: run ESLint checksyarn test: lint then open Cypress Component Test Runner (defaults to Firefox)yarn test:chrome: lint then open Cypress in Chromeyarn test:headless: lint then run headless component tests (used in CI)
- Bundler: Vite; Framework: Vue (
cypress.config.ts) - Spec pattern:
src/**/*.spec.{ts,tsx,js,jsx} - Example:
src/tests/Foo.spec.ts - Open runner:
yarn test # Firefox yarn test:chrome # Chrome
- Headless (CI-equivalent):
yarn test:headless
- Config: Flat ESLint with
plugin:vue/recommended+airbnb-baseand TypeScript rules. - Run:
yarn lint # optional: yarn eslint . --fix
- Tip: Install the “ESLint” editor extension for inline feedback.
- GitHub Actions run on pushes/PRs to
main, using Node 22 + Yarn 4 via Corepack andyarn test:headless. - Workflow file:
.github/workflows/node.js.yml
- Vue 3, TypeScript
- Vue Router, Vuex
- Build/serve: Vue CLI
- Component tests: Cypress (+ Vite bundler)
- Styling: Sass
base-vue/
├── babel.config.js # Babel configuration
├── vue.config.js # Vue CLI configuration
├── vite.config.ts # Vite configuration for Cypress
├── cypress.config.ts # Cypress configuration
├── eslint.config.cjs # ESLint configuration
├── public/
│ ├── index.html # HTML template
│ └── favicon.ico # Site favicon
├── src/
│ ├── main.ts # Vue app entry point
│ ├── App.vue # Root Vue component
│ ├── App.scss # Global styles
│ ├── assets/
│ │ └── logo.png # Static assets
│ ├── components/
│ │ ├── Foo.vue # Example component
│ │ └── Foo.scss # Component styles
│ └── tests/
│ └── Foo.spec.ts # Component tests
├── cypress/
│ ├── fixtures/ # Test data
│ ├── plugins/ # Cypress plugins
│ ├── support/ # Support files
│ ├── downloads/ # Downloaded files during tests
│ └── screenshots/ # Test screenshots
├── .github/
│ └── workflows/
│ └── node.js.yml # CI/CD workflow