A fast, modern starter template for vanilla JavaScript and Sass, powered by Vite.
Includes comprehensive linting, formatting, image optimization, HTML minification, and legacy browser support.
Perfect for performant, framework-free frontend apps with strict code quality.
- β‘οΈ Lightning-fast development with Vite
- π§± Pure Vanilla JS & Sass (no frameworks)
- π§Ή Integrated linting for HTML, CSS/SCSS, and JS
- πΌοΈ Automated image optimization
- π§ Minified and templated HTML
- πΈοΈ Legacy browser compatibility
- π Autoprefixing for cross-browser CSS
- Build: Vite
- Language: Vanilla JavaScript
- Styles: Dart Sass, modern-normalize
- Linting: ESLint, Stylelint, HTMLHint
- Formatting: Prettier
- Images: vite-plugin-imagemin
- HTML: vite-plugin-html
- PostCSS: Autoprefixer
- Legacy: @vitejs/plugin-legacy
src/
β Source files (HTML, JS, SCSS, assets)dist/
β Production build outputindex.html
β Entry HTML filevite.config.js
β Vite configpostcss.config.js
β PostCSS configeslint.config.js
,.stylelintrc
,.htmlhintrc
β Lint configsprettier.config.mjs
β Formatting configpackage.json
β Scripts & dependencies
vite-plugin-html
β Minifies HTML + template supportvite-plugin-imagemin
β Optimizes imagesvite-plugin-eslint2
β Lints JSvite-plugin-stylelint
β Lints SCSS@vitejs/plugin-legacy
β Legacy browser support
npx degit marcop135/vite-vanilla-sass-lint my-app
cd my-app
npm install
npm run dev
npm run dev # Start dev server
npm run build # Build for production
npm run preview # Preview production build
Includes:
eslint
β Lint JavaScriptstylelint
β Lint CSS/SCSShtmlhint
β Lint HTML/JSXprettier
β Format code
npx eslint "src/assets/js/*.js"
npx stylelint "src/assets/scss/*.{scss,css}"
npx htmlhint "**/*.html"
npx prettier --check "src/**/*.{js,css,scss,html,md}"
- Vite Docs
- Sass Docs
- Modern Normalize
- Autoprefixer
- HTMLHint
- Stylelint
- ESLint
- Vite Plugins:
Contributions welcome! Open issues or submit PRs.
Licensed under the MIT License.