Skip to content

Latest commit

 

History

History
66 lines (45 loc) · 1.49 KB

File metadata and controls

66 lines (45 loc) · 1.49 KB

Linting

Stack

  • ESLint v9 (flat config)
  • eslint-config-next v16.2.1 — includes Core Web Vitals and TypeScript presets

Config

The ESLint configuration lives in eslint.config.mjs and uses the flat-config format introduced in ESLint v9.

Presets

Preset Purpose
eslint-config-next/core-web-vitals Next.js rules + Core Web Vitals best practices
eslint-config-next/typescript TypeScript-specific rules for Next.js projects

Ignored paths

Defined via globalIgnores:

  • .next/**
  • out/**
  • build/**
  • next-env.d.ts

Disabled rules

Rule Reason
react/no-unescaped-entities Allows ' and " in JSX text
@typescript-eslint/no-unused-vars Permits unused variables during development
@typescript-eslint/no-explicit-any Allows any type usage
@typescript-eslint/no-empty-object-type Allows empty object types ({})
@typescript-eslint/no-empty-interface Allows empty interfaces

Usage

The lint script in package.json runs ESLint:

"lint": "eslint"

For a basic run use pnpm lint. When you need to pass extra flags or paths, use pnpm eslint directly — pnpm's -- separator doesn't forward args cleanly to the underlying command.

Lint the whole project

pnpm lint

Lint specific files or directories

pnpm eslint src/components/
pnpm eslint src/app/page.tsx

Auto-fix

pnpm eslint --fix
pnpm eslint --fix src/components/