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

@dtrw/eslint-config

v6.0.2

Published

Custom eslint configs

Readme

@dtrw/eslint-config

npm version NPM License Release dependencies

This is repository with my eslint configs for multiple purposes that are used (or will be used) in my other projects.

Install

yarn add -D @dtrw/eslint-config@~6.0.0 eslint

or

npm i -D @dtrw/eslint-config@~6.0.0 eslint

Usage

// eslint.config.js

import { config, prepareConfig } from '@dtrw/eslint-config'; // config re-exported from eslint/config

export default prepareConfig(configuration)
//or
export default config(
    ...prepareConfig(configuration),
    ...moreFlatConfigs
);

Configuration

prepareConfig accepts up to three arguments:

prepareConfig(providedConfigs?, ignores?, baseConfig?)

| Argument | Type | Default | Description | |---|---|---|---| | providedConfigs | object | {} | Feature configs to enable (see keys below) | | ignores | string[] or (defaults: string[]) => string[] | ['node_modules/', 'dist/', 'coverage/', '.vercel/'] | Glob patterns for files ESLint should ignore. Pass a function to modify the defaults. | | baseConfig | object | — | Experimental options passed to the base config (see base) |

providedConfigs keys

Each key can be set to true to enable the config with default options, or to an options object for additional configuration. All keys are optional.

| Key | Options | Description | |---|---|---| | cypress | (none) | Enables Cypress test linting | | jest | { mode?: 'jest' \| 'vitest' } | Enables Jest / Vitest test linting | | json | { additionalFiles?: { json?: string[], jsonc?: string[], json5?: string[] } } | Enables JSON / JSONC / JSON5 linting | | lodash | (none) | Enables Lodash best-practice rules | | node | (none) | Enables Node.js-specific rules | | react | { a11y?: boolean, nextjs?: boolean } | Enables React linting, with optional accessibility and Next.js support | | testingLibrary | (none) | Enables Testing Library and jest-dom rules |

Docs

base

Always enabled. Applies to all JS and TS files (**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx}).

Plugins: @eslint/js, typescript-eslint, eslint-plugin-import-x, eslint-plugin-promise, @stylistic/eslint-plugin

baseConfig options:

| Option | Type | Default | Description | |---|---|---|---| | nextResolver | boolean | true | Use the TypeScript import resolver from eslint-import-resolver-typescript. Set to false to use the legacy resolver instead. |

cypress

Applies to Cypress spec files (**/*.cy.{js,cjs,mjs,jsx,ts,cts,mts,tsx}).

Plugins: eslint-plugin-cypress

No configuration options.

jest

Applies to test files (**/*.test.{js,cjs,mjs,jsx,ts,cts,mts,tsx}) and mock files (**/__mocks__/**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx}).

Plugins: eslint-plugin-jest

Options:

| Option | Type | Default | Description | |---|---|---|---| | mode | 'jest' \| 'vitest' | 'jest' | Set to 'vitest' to configure the plugin for use with Vitest instead of Jest |

json

Applies to JSON files. Strict JSON rules apply to **/*.json files (except well-known JSONC files such as tsconfig.json and .vscode/**/*.json). JSONC rules apply to **/*.jsonc and known JSONC files. JSON5 rules apply to **/*.json5.

Plugins: @eslint/json, eslint-plugin-jsonc

Options:

| Option | Type | Default | Description | |---|---|---|---| | additionalFiles.json | string[] | [] | Additional glob patterns to treat as strict JSON | | additionalFiles.jsonc | string[] | [] | Additional glob patterns to treat as JSONC | | additionalFiles.json5 | string[] | [] | Additional glob patterns to treat as JSON5 |

lodash

Applies to all JS and TS files (**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx}).

Plugins: eslint-plugin-lodash

No configuration options.

node

Applies to all JS and TS files (**/*.{js,cjs,mjs,ts,cts,mts}).

Plugins: eslint-plugin-n, eslint-plugin-security-node

No configuration options.

react

Applies to all JS and TS files (**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx}). JSX-specific rules additionally apply to **/*.{jsx,tsx}.

Plugins: @eslint-react/eslint-plugin, @stylistic/eslint-plugin (JSX rules)

Options:

| Option | Type | Default | Description | |---|---|---|---| | a11y | boolean | false | Enable accessibility (a11y) rules via eslint-plugin-jsx-a11y | | nextjs | boolean | false | Enable Next.js rules via @next/eslint-plugin-next |

testingLibrary

Applies to test files (**/*.test.{js,cjs,mjs,jsx,ts,cts,mts,tsx}).

Plugins: eslint-plugin-jest-dom, eslint-plugin-testing-library

No configuration options.