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

@tobysmith568/eslint-config

v4.1.0

Published

Toby Smith's (tobysmith568) ESLint config

Readme

@tobysmith568/eslint-config

The personal ESLint configs for Toby Smith (tobysmith568).

GitHub: https://github.com/tobysmith568/eslint-config
npm: https://www.npmjs.com/package/@tobysmith568/eslint-config

Usage

Install:

$ npm install @tobysmith568/eslint-config eslint --save-dev

Edit eslint.config.mjs:

import { defineConfig } from "eslint/config";
import recommended from "@tobysmith568/eslint-config";
import jest from "@tobysmith568/eslint-config/jest";
import playwright from "@tobysmith568/eslint-config/playwright";
import prettier from "@tobysmith568/eslint-config/prettier";

export default defineConfig([
  recommended,
  { files: ["**/*.test.ts"], extends: [jest] },
  { files: ["e2e/**/*.ts"], extends: [playwright] },
  prettier
]);

The configs only say which rules to use; you decide which files they apply to with files. Use extends (from defineConfig) to scope a config, so that files is applied to every part of it. Spreading a config directly (...jest) applies it to every file.

Available configs

Everything except recommended is opt-in. All of the plugins are bundled as dependencies, but a plugin is only loaded when you import the config that uses it.

| Import | What it adds | | --------------------------------------------------- | ---------------------------------------------------------------------------------- | | @tobysmith568/eslint-config | ESLint and typescript-eslint recommended rules, ignores | | @tobysmith568/eslint-config/node | Node globals | | @tobysmith568/eslint-config/browser | Browser globals | | @tobysmith568/eslint-config/prettier | Disables rules that conflict with Prettier (put this last) | | @tobysmith568/eslint-config/react | React, JSX runtime and React Hooks rules | | @tobysmith568/eslint-config/next | Next.js (including Core Web Vitals) rules | | @tobysmith568/eslint-config/astro | Astro and accessibility rules | | @tobysmith568/eslint-config/test | Relaxes strict TypeScript rules for tests, for frameworks without their own config | | @tobysmith568/eslint-config/jest | Jest rules and globals | | @tobysmith568/eslint-config/vitest | Vitest rules and globals | | @tobysmith568/eslint-config/playwright | Playwright rules | | @tobysmith568/eslint-config/cypress | Cypress rules and globals | | @tobysmith568/eslint-config/testing-library/dom | Testing Library (DOM) rules | | @tobysmith568/eslint-config/testing-library/react | Testing Library (React) rules |

The test framework configs (jest, vitest, playwright and cypress) also relax a few strict rules for the files they are applied to: TypeScript rules like no-explicit-any, and the nested call restriction, so expect(getThing(x)) is allowed in tests. If your test framework isn't one of those (e.g. bun:test or node:test), use test to get just those relaxations without any framework's rules or globals:

{ files: ["**/*.spec.ts"], extends: [test] }

Code style

recommended also enforces a few house style rules: arrow functions bound to a const instead of function declarations (func-style), braces on every if/else (curly), no SHOUTY_SNAKE_CASE constants (@typescript-eslint/naming-convention), and no call nested directly inside another call's arguments (no-restricted-syntax). The prettier config turns curly back on after Prettier's config disables it, so keep prettier last.

Astro

The astro config enables the eslint-plugin-astro recommended and jsx-a11y-strict rules, plus astro/no-set-html-directive and astro/no-unused-css-selector. It already only applies to .astro files, so it doesn't need files:

export default defineConfig([recommended, astro, prettier]);

It leaves out the plugin's all preset on purpose, as that changes with every minor release and includes stylistic rules (like sort-attributes). New rules are added by hand.

Migrating from v2

The old recommended config bundled everything and applied it by file name. Now you pick the parts you need and say which files they apply to:

| Before | After | | ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | | ...tobysmith568.recommended | recommended, plus browser and/or node for globals, react if you use React, and prettier last | | Unit test rules (*.{spec,test}.*) | { files: ["**/*.{spec,test}.*"], extends: [jest, testingLibraryDom, testingLibraryReact] } (or vitest) | | Cypress rules (*.cy.*) | { files: ["**/*.cy.*"], extends: [cypress] } | | ...tobysmith568.next(import.meta.dirname) | { extends: [next] }, plus the other configs you need. It no longer includes recommended or takes a dirname. |

Other behaviour changes:

  • jest, react, cypress and testing-library now enable their plugins' recommended rules. Previously only the plugins and globals were registered.
  • eslint ^9.22.0 or newer is now required, for defineConfig.

License

@tobysmith568/eslint-config is licensed under the ISC License.