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

@lobehub/eslint-config

v2.0.1

Published

ESLint Flat Config configuration for LobeHub projects

Readme

ESLint Flat Config configuration for LobeHub projects

Features

  • ESLint 9+ Flat Config
  • TypeScript support with type-aware rules
  • React / React Native / Next.js / Remix support
  • Next.js ESLint rules (@next/eslint-plugin-next)
  • Import sorting with simple-import-sort
  • Interface and enum key sorting with perfectionist
  • Unicorn best practices
  • Accessibility rules (jsx-a11y)
  • React Compiler support

Installation

pnpm add -D @lobehub/eslint-config eslint typescript

Usage

Create eslint.config.js (or eslint.config.mjs) in your project root:

import { defineConfig } from '@lobehub/eslint-config';

export default defineConfig();

With React (Next.js)

import { defineConfig } from '@lobehub/eslint-config';

export default defineConfig({
  react: 'next',
  next: true,
});

With React Native

import { defineConfig } from '@lobehub/eslint-config';

export default defineConfig({
  react: 'expo',
  reactNative: true,
});

With Type-Checked Rules

import { defineConfig } from '@lobehub/eslint-config';

export default defineConfig({
  typescript: 'strict',
  typeChecked: true,
});

With Experimental Decorators

import { defineConfig } from '@lobehub/eslint-config';

export default defineConfig({
  parserOptions: {
    emitDecoratorMetadata: true,
    experimentalDecorators: true,
  },
});

Full Options

import { defineConfig } from '@lobehub/eslint-config';

export default defineConfig({
  // TypeScript support: true | false | 'strict'
  typescript: true,

  // Enable type-aware rules (requires tsconfig)
  typeChecked: false,

  // Custom tsconfig path
  tsconfigPath: './tsconfig.json',

  // React support: true | false | 'next' | 'remix' | 'vite' | 'expo'
  react: false,

  // React Native support
  reactNative: false,

  // React Compiler rules
  reactCompiler: false,

  // Accessibility rules (requires react)
  a11y: false,

  // Import sorting
  sortImports: true,

  // Interface and enum key sorting
  sortKeys: true,

  // Stylistic rules (jsx-sort-props, etc.)
  stylistic: true,

  // Regexp optimization rules
  regexp: true,

  // Additional ignore patterns
  ignores: ['**/dist/**'],
});

Custom Rule Overrides

Use rest parameters to add custom configurations with higher priority:

import { defineConfig } from '@lobehub/eslint-config';

export default defineConfig(
  { react: 'next' },
  // Global rule overrides
  {
    rules: {
      'no-console': 'warn',
    },
  },
  // File-specific overrides
  {
    files: ['**/test/**', '**/*.test.ts', '**/*.spec.ts'],
    rules: {
      'no-console': 'off',
      '@typescript-eslint/no-explicit-any': 'off',
    },
  },
  {
    files: ['**/scripts/**'],
    rules: {
      'unicorn/no-process-exit': 'off',
    },
  },
);

Complex Configuration Example

import { defineConfig } from '@lobehub/eslint-config';

export default defineConfig(
  {
    react: 'next',
    typescript: 'strict',
  },
  // Relax rules for test files
  {
    files: ['**/*.test.ts', '**/*.test.tsx', '**/test/**'],
    rules: {
      '@typescript-eslint/no-explicit-any': 'off',
      '@typescript-eslint/no-non-null-assertion': 'off',
    },
  },
  // Relax rules for scripts
  {
    files: ['scripts/**'],
    rules: {
      'no-console': 'off',
      'unicorn/no-process-exit': 'off',
    },
  },
  // Relax rules for config files
  {
    files: ['*.config.ts', '*.config.js'],
    rules: {
      'unicorn/no-anonymous-default-export': 'off',
    },
  },
);

Options Reference

| Option | Type | Default | Description | | --------------- | -------------------------------------------------- | ------- | --------------------------------- | | typescript | boolean \| 'strict' | true | Enable TypeScript rules | | typeChecked | boolean | false | Enable type-aware rules | | tsconfigPath | string \| string[] | - | Custom tsconfig path | | parserOptions | ParserOptions | - | TypeScript parser options | | react | boolean \| 'next' \| 'remix' \| 'vite' \| 'expo' | false | Enable React rules | | reactNative | boolean | false | Enable React Native rules | | reactCompiler | boolean | false | Enable React Compiler rules | | next | boolean | false | Enable Next.js ESLint rules | | a11y | boolean | false | Enable accessibility rules | | sortImports | boolean | true | Enable import sorting | | sortKeys | boolean | true | Enable interface/enum/jsx sorting | | stylistic | boolean | true | Enable stylistic rules | | regexp | boolean | true | Enable regexp rules | | ignores | string[] | [] | Additional ignore patterns |

API

function defineConfig(options?: Options, ...configs: FlatConfig[]): FlatConfigArray;
  • options - Configuration options (see table above)
  • ...configs - Additional flat configs to append (highest priority)

Requirements

  • Node.js >= 18
  • ESLint >= 9.0.0
  • TypeScript >= 5.0.0 (optional)

License

MIT © LobeHub