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

@williamthorsen/eslint-config-typescript

v5.17.4

Published

ESLint config for TypeScript, JSON & YML

Readme

@williamthorsen/eslint-config-typescript

Flat-config ESLint preset for TypeScript projects. Covers TypeScript, JavaScript, JSON, YAML, and package.json from a single default export, with opt-in framework configs for React, Next.js, JSX A11y, Vitest, and React Testing Library.

Release notes — v5.17.4 (2026-05-01)

Bug fixes

  • Declare @typescript-eslint/utils as a peer dependency (#67)

    Fixes ERR_MODULE_NOT_FOUND failures in consumers of @williamthorsen/eslint-config-typescript whose pnpm graph does not happen to hoist @typescript-eslint/utils into a location reachable from the eslint-config's compiled files. The package's compiled rules import @typescript-eslint/utils at runtime, but it was previously declared only in devDependencies — so pnpm's strict isolation could leave it unreachable depending on the consumer's resolution graph. Declaring it as a peer dependency makes the contract explicit and ensures consumers resolve a single shared copy.

Installation

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

Requires ESLint 9+ and TypeScript 5+.

Quick start

// eslint.config.js
import tsConfig from '@williamthorsen/eslint-config-typescript';

export default [
  ...tsConfig,
  // your overrides
];

What's included

The default export bundles configs for the following surfaces:

| Surface | File pattern | Notable plugins | | -------------- | ------------------------------ | ----------------------------------------------------------------- | | TypeScript | **/*.{ts,cts,mts,tsx} | typescript-eslint (type-aware), sky-pilot | | JavaScript | **/*.{js,cjs,mjs,jsx} | core rules, JS-specific conventions | | Cross-cutting | all code files | eslint-comments, import, n, simple-import-sort, unicorn | | JSON / JSON5 | **/*.{json,json5} | jsonc | | YAML | **/*.{yaml,yml} | yml | | package.json | **/package.json | package-json (recommended + stylistic) | | Tests | **/*.{spec,test}.{js,ts,...} | strict TypeScript rules relaxed |

Test files (*.spec.* / *.test.*) have several strict rules disabled (e.g., no-unsafe-assignment, unbound-method, no-extraneous-class) so spec files don't fight the type checker. Declaration files (*.d.ts) have import/no-duplicates turned off.

Granular config access

The default export is the catch-all "everything on" preset. For à la carte composition, import individual configs:

import { configs } from '@williamthorsen/eslint-config-typescript';

export default [
  ...configs.typeScript,
  ...configs.import,
  // skip configs.unicorn entirely
];

| Config | Targets | | -------------------------- | ------------------------------------------ | | configs.javaScript | core JavaScript rules | | configs.typeScript | TypeScript rules (type-aware) | | configs.eslintComments | eslint-disable comment hygiene | | configs.import | import order and resolution | | configs.n | Node.js (eslint-plugin-n) rules | | configs.simpleImportSort | sorted imports | | configs.unicorn | eslint-plugin-unicorn rules | | configs.json | JSON rules | | configs.json5 | JSON5 rules — apply after configs.json | | configs.packageJson | package.json rules | | configs.yaml | YAML rules |

Framework configs (lazy-loaded)

Framework-specific configs are exposed via createConfig so their plugin dependencies (eslint-plugin-react, @next/eslint-plugin-next, etc.) load only when used:

import config, { createConfig } from '@williamthorsen/eslint-config-typescript';

export default [
  ...config,
  ...(await createConfig.react()),
  ...(await createConfig.jsxA11y()),
  await createConfig.next(),
  ...(await createConfig.vitest()),
  ...(await createConfig.reactTestingLibrary()),
];

| Method | Loads | | ------------------------------------ | -------------------------------------------------- | | createConfig.react() | eslint-plugin-react, eslint-plugin-react-hooks | | createConfig.next() | @next/eslint-plugin-next | | createConfig.jsxA11y() | eslint-plugin-jsx-a11y | | createConfig.reactTestingLibrary() | eslint-plugin-testing-library | | createConfig.vitest() | @vitest/eslint-plugin |

These plugins are declared as devDependencies of this package. Install them yourself in projects that use them.

File patterns

For composing your own scoped configs without re-deriving the globs:

import { patterns } from '@williamthorsen/eslint-config-typescript';

export default [
  {
    files: patterns.typeScriptFiles,
    rules: {
      // TypeScript-only overrides
    },
  },
];

| Constant | Value | | ------------------------------- | --------------------------- | | patterns.javaScriptFiles | ['**/*.{js,cjs,mjs,jsx}'] | | patterns.typeScriptFiles | ['**/*.{ts,cts,mts,tsx}'] | | patterns.codeFiles | both of the above | | patterns.javaScriptExtensions | ['{js,cjs,mjs,jsx}'] | | patterns.typeScriptExtensions | ['{ts,cts,mts,tsx}'] | | patterns.codeExtensions | both |

Peer dependencies

| Dependency | Required | | ------------ | -------- | | eslint | >=9 | | typescript | >=5 |

License

ISC.