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

@meltstudio/eslint-config

v3.0.0

Published

Melt Studio's ESLint configurations

Readme

@meltstudio/eslint-config

Collection of ESLint configurations used in Melt Studio.

v3: flat config, ESLint 9/10+

v3 rewrites every preset as an ESLint flat config array (eslint.config.js) and bumps peer dependencies to their current majors — ESLint 9/10 dropped support for .eslintrc entirely, so this isn't optional. The underlying rules are unchanged (same airbnb ruleset, same TypeScript rules), except for a few fixes forced by real incompatibilities between eslint-config-airbnb/eslint-plugin-react and ESLint 10 — see Breaking changes below before upgrading from v2.

If you're not ready to move to flat config yet, stay on @meltstudio/eslint-config@^2 and eslint@^8.

Breaking changes from v2

  • Flat config only. .eslintrc* is no longer supported by ESLint 9+. Replace extends: ["@meltstudio/eslint-config/<preset>"] with require("@meltstudio/eslint-config/<preset>") spread into your eslint.config.js array (see each preset below).
  • eslint-config-next@next/eslint-plugin-next. nextjs-ts now uses the Next.js ESLint plugin directly instead of the aggregate eslint-config-next package. Swap the devDependency.
  • react-ts/nextjs-ts set an explicit settings.react.version ('999.999.999', eslint-plugin-react's own "version unknown, assume latest" sentinel) instead of relying on airbnb's 'detect'. Auto-detection calls an API ESLint 10 removed and crashes. "Assume latest" means version-gated rules never flag newer APIs as invalid, regardless of your actual React version — set a real settings.react.version in your own config if you want stricter, version-accurate checks instead.
  • @typescript-eslint peers moved 5 → 8. Two airbnb-typescript rule references were removed upstream in that jump; the flat presets already substitute the modern equivalents (@typescript-eslint/only-throw-error for the old no-throw-literal, core lines-between-class-members for the old TS-specific version), so no action needed on your end.
  • No more --ext .ts,.tsx — scope your own rule overrides. Flat config has no --ext equivalent, so eslint . scans every file by default, not just the ones your old --ext flag allowed. The node-ts/react-ts/ nextjs-ts/base-ts presets scope themselves back to TS files internally, but any rule override you add on top in your own eslint.config.js needs its own files: ['**/*.ts', '**/*.tsx'] (or similar) if it references a plugin (like react/*) that isn't registered for every file in your repo — otherwise you'll hit could not find plugin "..." the first time ESLint tries to lint a .cjs/.json/other non-TS file. Update your lint script to drop --ext too (eslint --max-warnings=0 .).

Upstream rules patched in-place (no behavior change)

Two eslint-plugin-import/eslint-plugin-react rules unconditionally call ESLint APIs removed in v9 (context.parserOptions, context.getFilename()) and crash immediately under flat config, with no config-level workaround — react-ts.js/base.js patch the plugin instance's rule implementation in place (same messages, same options, only the removed API call is replaced) rather than disabling them:

  • import/no-default-export (all presets, via base.js)
  • react/jsx-filename-extension (react-ts/nextjs-ts, still respects the { extensions: ['.jsx', '.tsx'] } airbnb-typescript sets)

If a future eslint-plugin-import/eslint-plugin-react release fixes these upstream, the patches become harmless dead code and can be deleted.

Base rules

All the configurations exported in this package include the following rules:

'no-restricted-imports': [
  'error',
  {
    patterns: [
      {
        group: ['src/**/*', '../**/*'],
        message:
          'usage of src/* and ../**/* imports is not allowed, use paths defined in tsconfig',
      },
    ],
  },
],

'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',

Aditionally, for the TypeScript configurations the following rules are included:

// this rule conflicts with typescript
'no-use-before-define': 'off',

// typescript
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-use-before-define': 'error',
'@typescript-eslint/no-misused-promises': [
  'error',
  { checksVoidReturn: false },
],

Usage

This package exports multiple ESLint flat configs, each an array you spread into your own eslint.config.js.

node-js

Node-JavaScript configuration, it includes the following rule sets:

  • plugin:import/recommended
  • plugin:prettier/recommended
  • eslint:recommended
  • airbnb-base

and the base rules.

To use it:

  1. Install it:
yarn add --dev @meltstudio/eslint-config \
    eslint-config-airbnb-base \
    eslint-config-prettier \
    eslint-plugin-prettier \
    eslint-plugin-import \
    eslint-plugin-simple-import-sort
  1. Add it in your eslint.config.js:
module.exports = [...require('@meltstudio/eslint-config/node-js')];

node-ts

Node-TypeScript configuration, it includes the following rule sets:

  • plugin:import/recommended
  • plugin:prettier/recommended
  • plugin:@typescript-eslint/eslint-recommended
  • plugin:@typescript-eslint/recommended
  • plugin:@typescript-eslint/recommended-type-checked
  • plugin:import/typescript
  • eslint:recommended
  • airbnb-base
  • airbnb-typescript/base

and the base TypeScript rules.

To use it:

  1. Install it:
yarn add --dev @meltstudio/eslint-config \
    eslint-config-airbnb-base \
    eslint-config-airbnb-typescript \
    eslint-config-prettier \
    eslint-plugin-prettier \
    eslint-plugin-import \
    eslint-plugin-simple-import-sort \
    @typescript-eslint/eslint-plugin \
    @typescript-eslint/parser \
    eslint-import-resolver-typescript
  1. Add it in your eslint.config.js:
module.exports = [...require('@meltstudio/eslint-config/node-ts')];

react-ts

React-TypeScript configuration, it includes the following rule sets:

  • plugin:import/recommended
  • plugin:prettier/recommended
  • plugin:@typescript-eslint/eslint-recommended
  • plugin:@typescript-eslint/recommended
  • plugin:@typescript-eslint/recommended-type-checked
  • plugin:import/typescript
  • airbnb
  • airbnb/hooks
  • airbnb-typescript

all the base TypeScript rules, and the following rules:

// react
'react/function-component-definition': [
  2,
  {
    namedComponents: 'arrow-function',
  },
],
'react/prop-types': 'off',
'react/jsx-props-no-spreading': 'off',
'react/require-default-props': 'off',
'react/react-in-jsx-scope': 'off',

'jsx-a11y/label-has-associated-control': [
  'error',
  { controlComponents: ['Field'] },
],

To use it:

  1. Install it:
yarn add --dev @meltstudio/eslint-config \
    eslint-config-airbnb \
    eslint-config-airbnb-typescript \
    eslint-config-prettier \
    eslint-plugin-prettier \
    eslint-plugin-import \
    eslint-plugin-simple-import-sort \
    @typescript-eslint/eslint-plugin \
    @typescript-eslint/parser \
    eslint-import-resolver-typescript \
    eslint-plugin-jsx-a11y \
    eslint-plugin-react \
    eslint-plugin-react-hooks \
    eslint-plugin-testing-library
  1. Add it in your eslint.config.js:
module.exports = [...require('@meltstudio/eslint-config/react-ts')];

nextjs-ts

Next.js-TypeScript configuration. It includes the same rule sets and rules that come with the react-ts configuration, plus the @next/eslint-plugin-next recommended rules and the following rules:

'jsx-a11y/alt-text': [
  'error',
  {
    elements: ['img'],
    img: ['Image'],
  },
],
'react/no-unknown-property': [
  'error',
  {
    ignore: ['jsx', 'global'],
  },
],

To use it:

  1. Install it:
yarn add --dev @meltstudio/eslint-config \
    eslint-config-airbnb \
    eslint-config-airbnb-typescript \
    eslint-config-prettier \
    eslint-plugin-prettier \
    eslint-plugin-import \
    eslint-plugin-simple-import-sort \
    @typescript-eslint/eslint-plugin \
    @typescript-eslint/parser \
    eslint-import-resolver-typescript \
    eslint-plugin-jsx-a11y \
    eslint-plugin-react \
    eslint-plugin-react-hooks \
    eslint-plugin-testing-library \
    @next/eslint-plugin-next
  1. Add it in your eslint.config.js:
module.exports = [...require('@meltstudio/eslint-config/nextjs-ts')];

jest-overrides

Base config that provides overrides for jest. It provides the following rule set:

  • plugin:jest/recommended (only for test files)

To use it:

  1. Install it:
yarn add --dev @meltstudio/eslint-config eslint-plugin-jest
  1. Add it in your eslint.config.js:
module.exports = [
  // ...your other config
  ...require('@meltstudio/eslint-config/jest-overrides'),
];

jest-react-overrides

Base config that provides overrides for jest when using react. It provides the following rule sets:

  • plugin:jest/recommended (only for test files)
  • plugin:testing-library/react (only for test files)

To use it:

  1. Install it:
yarn add --dev @meltstudio/eslint-config \
    eslint-plugin-jest \
    eslint-plugin-jest-dom \
    eslint-plugin-testing-library
  1. Add it in your eslint.config.js:
module.exports = [
  // ...your other config
  ...require('@meltstudio/eslint-config/jest-react-overrides'),
];

Troubleshooting

Working directory

When running ESLint you need to make sure that it's running using the workspace root as its working directory. If you want to run ESLint using a different working directory, you'll need to override the parserOptions for @typescript-eslint/parser, the settings for eslint-import-resolver-typescript, and the Next.js plugin's own resolution (see the Next.js ESLint docs).

Monorepos and lint-staged

The recommended way to work with lint-staged in monorepos is adding separate configuration files in each package. This ensures that lint-staged will run ESLint using the package directory as its working directory.