npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@nextnode/eslint-plugin

v1.2.0

Published

Typescript + React rules enforcement

Readme

@nextnode/eslint-plugin

A comprehensive ESLint configuration package for TypeScript and React projects, optimized for Next.js applications.

Features

  • 🔧 TypeScript support with strict type checking
  • ⚛️ React and React Hooks rules
  • 🚀 Next.js specific rules and optimizations
  • 📦 Import sorting and organization with path groups
  • 🎯 Modern JavaScript features support
  • 🌐 Node.js and Browser globals
  • ⚠️ Only warnings mode (no errors that break builds)

Installation

pnpm add -D @nextnode/eslint-plugin eslint@^9.22.0

Note: This package requires ESLint v9.22.0 or higher and uses the new flat config format.

Quick Start

Base Configuration (TypeScript)

For a basic TypeScript setup:

// eslint.config.js
import nextnodeEslint from '@nextnode/eslint-plugin/base'

export default nextnodeEslint

React Configuration

For React projects:

// eslint.config.js
import nextnodeEslint from '@nextnode/eslint-plugin/react'

export default nextnodeEslint

Next.js Configuration

For Next.js projects:

// eslint.config.js
import nextnodeEslint from '@nextnode/eslint-plugin/next'

export default nextnodeEslint

Configuration Details

Base Configuration Features

  • TypeScript Parser: Uses @typescript-eslint/parser with project-aware type checking
  • Import Management: Automatic import sorting with custom path groups for React, Next.js, and internal modules
  • Modern JavaScript: Support for latest ECMAScript features
  • Globals: Includes both Node.js and browser globals
  • File Extensions: Supports .mjs, .cjs, .js, .jsx, .ts, .tsx

Import Sorting Rules

The configuration includes intelligent import sorting with the following groups:

  1. Built-in and external packages (React, Next.js prioritized)
  2. Internal modules
  3. Relative imports (sibling, parent, index)
  4. Object imports
  5. Type imports

Example of sorted imports:

import React from 'react'
import { NextPage } from 'next'
import { Button } from '@mui/material'

import { utils } from '@/lib/utils'

import { Header } from '../components/Header'
import { Footer } from './Footer'

import type { User } from '@/types/user'

Advanced Usage

Extending Configuration

You can extend any configuration and override specific rules:

// eslint.config.js
import nextnodeEslint from '@nextnode/eslint-plugin/base'

export default [
  ...nextnodeEslint,
  {
    rules: {
      // Override specific rules
      '@typescript-eslint/explicit-function-return-type': 'off',
      'import-x/order': ['error', {
        groups: [
          ['builtin', 'external'],
          'internal',
          ['sibling', 'parent', 'index'],
          'object',
          'type'
        ],
        'newlines-between': 'always'
      }]
    }
  }
]

Custom Ignores

Add custom ignore patterns:

// eslint.config.js
import nextnodeEslint from '@nextnode/eslint-plugin/base'

export default [
  ...nextnodeEslint,
  {
    ignores: [
      'dist/',
      'build/',
      '*.generated.ts'
    ]
  }
]

Dependencies

This package includes and configures the following ESLint plugins:

Core

  • eslint - The core ESLint linter
  • @eslint/js - ESLint's recommended JavaScript rules

TypeScript Support

  • typescript - TypeScript compiler
  • @typescript-eslint/parser - TypeScript parser for ESLint
  • typescript-eslint - TypeScript-specific ESLint rules

React & Next.js

  • @next/eslint-plugin-next - Next.js specific rules
  • eslint-plugin-react - React specific rules
  • eslint-plugin-react-hooks - React Hooks rules

Import Management

  • eslint-plugin-import-x - Import/export syntax rules
  • eslint-import-resolver-typescript - TypeScript import resolution

Utilities

  • eslint-plugin-only-warn - Converts all errors to warnings
  • globals - Global variables definitions

Requirements

  • Node.js: >= 20.0.0
  • TypeScript: >= 5.8.2
  • ESLint: >= 9.22.0

Troubleshooting

Common Issues

  1. "Cannot find module" errors: Ensure your tsconfig.json is properly configured and in the project root.

  2. Import resolution issues: Make sure your TypeScript paths are correctly set up in tsconfig.json.

  3. Performance issues: For large projects, consider using project: ['./tsconfig.json'] instead of project: true in your TypeScript parser options.

Changesets & Version Management

This project uses Changesets for automated version management and publishing.

Quick Changeset Guide

When making changes that should trigger a version bump:

pnpm changeset

This will prompt you to:

  1. Select which packages to bump (@nextnode/eslint-plugin)
  2. Choose the change type:
    • patch (1.0.0 → 1.0.1): Bug fixes, documentation updates
    • minor (1.0.0 → 1.1.0): New features, new rules
    • major (1.0.0 → 2.0.0): Breaking changes
  3. Provide a summary of your changes

Automated Workflow

  1. PR Creation: Changeset-check ensures a changeset is present
  2. Merge to Main: Creates a "Version Packages" PR automatically
  3. Version PR Merge: Publishes the new version to npm

Manual Commands

# Create a changeset
pnpm changeset

# Apply changesets and update versions (automated)
pnpm changeset:version

# Publish to npm (automated)
pnpm changeset:publish

For detailed information, see our Changesets Documentation and the official Changesets Documentation.

Contributing

When contributing to this project:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run pnpm changeset to create a changeset describing your changes
  5. Commit the changeset file along with your changes
  6. Create a Pull Request

The changeset workflow will automatically handle versioning and publishing once your PR is merged.

License

ISC © Walid M