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 🙏

© 2026 – Pkg Stats / Ryan Hefner

eslint-robbnb

v1.0.0

Published

ESLint rules for modern JavaScript

Readme

eslint-robBnB: Rules for modern JavaScript

This package provides linter configuration and rulesets that help engineers write high quality, consistent, and maintainable code. It uses the new ESLint flat configuration file format.

Approach

The configuration focuses on modern JavaScript, TypeScript, and React. It avoids setting rules for legacy patterns (e.g., React lifecycle methods, PropTypes), deprecated APIs, and direct DOM manipulations.

To improve code consistency, it enforces one implementation of a pattern when multiple exist. For example, functional React components are preferred over class components, and Array iteration methods are preferred over for each loops. Clever, less obvious patterns are forbidden; Array.prototype.reduce and bitwise operators may be terse, but alternatives are better understood by a wider audience. Autofixable rules are used when possible, enabling fixes on save with a properly configured IDE.

Why not eslint-config-airbnb?

For years engineers have extended AirBnB's config, and while it's a fantastic starting point it's somewhat outdated and permissive. Because it's used so broadly, the maintainers are reluctant to forbid legacy patterns and avoid enabling useful rules that would create breaking changes in their consumer's codebases. This package uses AirBnB as a reference but follows a more focused and restrictive approach.

Plugins

This package applies rules from the following plugins:

Requirements

  • [x] If using React, your bundler is configured to automatically insert the new JSX transform. Bundlers like Vite do this by default.
  • [x] You're using TypeScript for type safety. All PropType linters are disabled.
  • [x] You're using Prettier. Many useful rules are disabled with the expectation that Prettier makes them unnecessary.

Installation

Install the package and its peer dependencies.

npm install eslint-robbnb eslint@^8

Usage

This package uses the new ESLint flat config. Instead of referencing configuration via magic strings, it uses exported configuration directly.

eslint-robBnB adds configuration for the following file types. You can override rules using ESLint's flat configuration cascade, described in this blog post.

| File type | Glob patterns | | --- | --- | | package.json files | **/package.json | | JavaScript-based files | **/*.js, **/*.jsx, **/*.cjs, **/*.mjs, **/*.ts, **/*.tsx, **/*.d.ts | | TypeScript files | **/*.ts, **/*.tsx, **/*.d.ts | | Test files | **/*.test.js, **/*.test.jsx, **/*.test.cjs, **/*.test.mjs, **/*.test.ts, **/*.test.tsx, **/test/** |

Example configuration

// eslint.config.js
import prettierConfig from 'eslint-config-prettier';
import { robBnBConfig } from 'eslint-robbnb';

const config = [
  // The export is an array of configuration objects and must be spread into
  // the flat config
  ...robBnBConfig,

  // Project-specific configuration
  {
    files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx', '**/*.d.ts'],
    languageOptions: {
      // Configuration for parsers, globals, etc.
    },
    rules: {
      // Additional rules and overrides
      'react/no-adjacent-inline-elements': 'error',
    },
  },

  prettierConfig,
];

// RobBnB prefers named exports; this rule must be disabled for config files
// eslint-disable-next-line import/no-default-export
export default config;

For a complete example, see this package's eslint.config.js.