Skip to content

A starter boilerplate with Next.js, TypeScript, Tailwind CSS, Prettier, ESLint, Husky, Lint-Staged, and CommitLint — designed to help you write consistent, clean, and maintainable code with a smooth development workflow.

License

Notifications You must be signed in to change notification settings

Timonwa/next-tailwind-ts-linting-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Next.js Tailwind TypeScript Linting Boilerplate

A starter boilerplate with Next.js, TypeScript, Tailwind CSS, Prettier, ESLint, Husky, Lint-Staged, and CommitLint — designed to help you write consistent, clean, and maintainable code with a smooth development workflow.

🚀 What's Inside

  • TypeScript – static type checking for JavaScript
  • Tailwind CSS – utility-first CSS framework
  • Prettier – consistent code formatting
  • ESLint – pluggable JavaScript/TypeScript linter
  • Husky – Git hooks made easy
  • Lint-Staged – run scripts on staged files
  • CommitLint – enforce conventional commit messages

This setup enforces consistent code style, prevents common errors, and keeps your commit history clean—streamlining your development workflow.

🧱 Pages Router & App Router

This boilerplate supports both routing strategies:

Both folders include the same development tooling and configuration. Choose the one that fits your project needs.

🎯 Get Started

Prerequisites

  • Node.js 18+ installed on your machine
  • Git installed
  • Your preferred code editor (VS Code recommended)

Installation

  1. Clone the repository
   git clone https://github.com/Timonwa/next-tailwind-ts-linting-boilerplate.git
   cd next-tailwind-ts-linting-boilerplate
  1. Choose your routing strategy

    Navigate to either the Pages Router or App Router setup:

   # For Pages Router
   cd pages-router-setup
   
   # OR for App Router
   cd app-router-setup
  1. Install dependencies
   npm install
  1. Start the development server
   npm run dev
  1. Open your browser

    Visit http://localhost:3000 to see your app running!

What Happens Next?

  • Pre-commit hooks will automatically lint and format your code when you commit
  • Commit messages will be validated to follow conventional commit standards
  • TypeScript will check for type errors as you code
  • ESLint will catch potential bugs and enforce code quality
  • Prettier will format your code consistently

Customization

Feel free to customize the configuration files to match your preferences:

  • ESLint rules: eslint.config.mjs
  • Prettier settings: .prettierrc
  • TypeScript config: tsconfig.json
  • Commit message rules: commitlint.config.ts

📚 Resources

Official Documentation

Helpful Guides

Understanding This Setup

Want to know how this boilerplate was built from scratch? Check out GUIDE.md for a detailed step-by-step walkthrough of every tool and configuration.

Community & Support

⭐ Show Your Support

If this boilerplate helped you save time and build better applications, please give it a star! It helps other developers discover this resource.

📝 License

This project is open source and available under the MIT License.


Built with ❤️ by Timonwa

About

A starter boilerplate with Next.js, TypeScript, Tailwind CSS, Prettier, ESLint, Husky, Lint-Staged, and CommitLint — designed to help you write consistent, clean, and maintainable code with a smooth development workflow.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •