Menu

Best ESLint Config for Next.js (TypeScript + Tailwind Setup Guide)
🖼️

Best ESLint Config for Next.js (TypeScript + Tailwind Setup Guide)

DEV Community·Ankesh Sharma·6 months ago
#tawtVVLx
#eslint#typescript#nextjs#webdev#next
Reading 0:00
15s threshold

If you're using Next.js with TypeScript and Tailwind CSS , setting up ESLint correctly is harder than it should be.

Most guides either:

cover only basics

ignore Tailwind

or don’t scale for real projects

This guide gives you a complete, scalable ESLint setup for Next.js .

What we want from ESLint in Next.js

A good setup should:

support TypeScript

enforce React hooks rules

align with Next.js best practices

handle Tailwind CSS properly

scale across projects

Installation

npm install -D eslint@^9 @eslint/js typescript-eslint eslint-plugin-react eslint-plugin-react-hooks @next/eslint-plugin-next eslint-plugin-tailwindcss prettier prettier-plugin-tailwindcss

Enter fullscreen mode

Exit fullscreen mode

Minimal setup

import createNextConfig from " @iamankeshsharma/eslint-config/next " ;

export default createNextConfig ();

Enter fullscreen mode

Exit fullscreen mode

Why this works better

Instead of manually combining multiple configs, this approach:

standardizes rules

reduces setup…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.