Launch Week Day 2: Introducing Reports: An Extensible Reporting Framework for Socket Data.Learn More
Socket
Book a DemoSign in
Socket

eslint-config-nice-nextjs

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-nice-nextjs

A TypeScript ESLint config for Next.js

latest
Source
npmnpm
Version
0.4.0
Version published
Maintainers
1
Created
Source

eslint-config-nice-nextjs

An ESLint setup for Next.js apps. It uses the ESLint flat config style (ESLint 9+) and pulls in React, React Hooks, Next.js, and TypeScript rules so you get useful checks out of the box.

Features

  • Ready for eslint.config.mjs
  • Includes @next/eslint-plugin-next (recommended + core web vitals)
  • Adds eslint-plugin-react and eslint-plugin-react-hooks
  • Extends eslint-config-love for stronger TypeScript rules
  • Sets common browser and Node globals
  • Applies extra strict rules to code in app/ and src/

Install

# pnpm
pnpm add -D eslint-config-nice-nextjs

# npm
npm install --save-dev eslint-config-nice-nextjs

# yarn
yarn add --dev eslint-config-nice-nextjs

Peer packages

Your project should already depend on:

  • eslint@^9
  • eslint-config-next@^15.5.4
  • @next/eslint-plugin-next@^15.2.4
  • eslint-plugin-react@^7.37.5
  • eslint-plugin-react-hooks@^7
  • typescript (optional but recommended)

Install any you are missing:

pnpm add -D eslint@^9 eslint-config-next@^15.5.4 @next/eslint-plugin-next@^15.2.4 eslint-plugin-react@^7.37.5 eslint-plugin-react-hooks@^7 typescript

Use it

Create eslint.config.mjs in your project (or update the existing file):

import niceNextjs from 'eslint-config-nice-nextjs';

export default niceNextjs;

To tweak ignores or rules, spread the config and add your own blocks:

import niceNextjs from 'eslint-config-nice-nextjs';

export default [
   { ignores: ['.turbo/**', 'cypress/**'] },
   ...niceNextjs,
   {
      files: ['tests/**/*.{ts,tsx}'],
      rules: { 'no-console': 'off' },
   },
];

With Prettier

pnpm add -D prettier eslint-plugin-prettier
import niceNextjs from 'eslint-config-nice-nextjs';
import prettier from 'eslint-plugin-prettier/recommended';

export default [...niceNextjs, prettier];

What you get

  • Ignores for .next/**, .pnpm-store/**, and node_modules/**
  • React flat presets, including the JSX runtime rules
  • React Hooks recommended rules
  • Next.js recommended + core web vitals rules
  • TypeScript-focused rules from eslint-config-love
  • Shared browser+Node globals
  • Extra strict rules for files inside app/ and src/

See src/index.ts if you want the full detail.

Example app

The repo includes ts-next-app/, which uses the built config from dist/:

cd ts-next-app
pnpm lint

Some files in that app break the rules on purpose so you can see the errors. Fix them or ignore them if you want a clean run. This app used for the CI testsbefore releasing the new version.

Contribute

Open an issue or PR if you spot something. Run lint and build before sending changes. Update this README and add a Changeset when you change the published rules.

License

MIT

Keywords

check

FAQs

Package last updated on 23 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts