More Premium Hugo Themes Premium Nuxt Themes

Nuxt 3 Optimal Starter Template

Nuxt 3 starter template with ESLint - Prettier - Husky - Lint-Staged - Typescript - Vitest - Commitlint - Tailwind

Nuxt 3 Optimal Starter Template

Nuxt 3 starter template with ESLint - Prettier - Husky - Lint-Staged - Typescript - Vitest - Commitlint - Tailwind

Github Stars Github Stars: 7
Last Commit Last Commit: Aug 15, 2023 -
First Commit Created: Dec 18, 2023 -
Nuxt 3 Optimal Starter Template screenshot

Overview

The Nuxt 3 Optimal Starter Template is a ready-to-use template for Nuxt 3 projects. It comes pre-configured with the most commonly used tools and features, making it easy to set up a new Nuxt 3 project.

Features

  • Typescript: The template includes support for Typescript, allowing developers to write type-safe code.
  • ESLint: ESLint is integrated into the template, providing code linting and quality checks.
  • Prettier: Prettier is used for code formatting, ensuring consistent and clean code.
  • @typescript-eslint: This plugin extends ESLint with additional rules specifically for Typescript.
  • @trivago/prettier-plugin-sort-imports: This plugin sorts import statements in a consistent and organized manner.
  • prettier-plugin-organize-attributes: This plugin helps in organizing HTML attributes in a readable manner.
  • prettier-plugin-tailwindcss: This plugin provides Prettier support for Tailwind CSS syntax.
  • Husky: Husky is configured in the template to run pre-commit hooks, such as linting staged files.
  • lint-staged: lint-staged is set up to run ESLint on staged files during the commit process.
  • commitlint: The template includes a commit-msg configuration for commitlint, ensuring consistent commit message format.
  • Vitest: Vitest is used for testing purposes and is integrated with the template.
  • @nuxt/test-utils: This package provides utilities for testing Nuxt applications.
  • Tailwind: Tailwind CSS is set up and ready to use in the template.
  • Optional: use pnpm: The template suggests using pnpm as the package manager for installation.

Installation

To use the Nuxt 3 Optimal Starter Template, follow these steps:

  1. Install the template dependencies. If you prefer, you can use the optional pnpm package manager.

    npm install
    # or
    pnpm install
    
  2. Start the development server by running the following command:

    npm run dev
    
  3. To run tests, use the following command:

    npm run test
    
  4. Build the application for production using the following command:

    npm run build
    
  5. Locally preview the production build by running the following command:

    npm run preview
    

Summary

The Nuxt 3 Optimal Starter Template is a comprehensive template that provides a solid foundation for Nuxt 3 projects. It includes essential tools for development, such as Typescript, ESLint, and Prettier. Additionally, it comes with pre-configured settings for code formatting, linting, and testing. By following the simple installation guide, developers can quickly set up a Nuxt 3 project with all the necessary features for a smooth development experience.