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

@open-tomato/eslint-config

v0.2.0

Published

The shared flat ESLint config of the open-tomato projects: a base for JavaScript, TypeScript, Markdown and JSON, plus react, vite, cva, atomic, type-aware and markdown-fences flavors.

Readme

@open-tomato/eslint-config

The shared flat ESLint config of the open-tomato projects. It has one base and six flavors, and each flavor is laid over the base in the project's own eslint.config.mjs.

bun add -d @open-tomato/eslint-config eslint typescript

The base

// eslint.config.mjs
import baseConfig from '@open-tomato/eslint-config';

export default [
  { ignores: ['generated/**'] },
  ...baseConfig,
];

The base lints JavaScript and TypeScript (.js .mjs .cjs .jsx .ts .mts .cts .tsx), Markdown and JSON. Its rules hold the house style:

  • single quotes, semicolons, two-space indent and trailing commas on multiline literals;
  • imports grouped type, builtin, external, internal, parent, sibling and index, alphabetised, with a blank line between groups;
  • eslint:recommended and typescript-eslint's recommended set;
  • @open-tomato/no-unsafe-unicode on every linted language, from @open-tomato/eslint-plugin.

no-undef is off for TypeScript files, because TypeScript checks undefined names itself. The base ignores dist, build, coverage, node_modules, .tsbuild, .turbo, and the agent folders .claude, .rafa and .tmp.

The import resolver reads ./tsconfig.json and the tsconfig.json of each folder under packages/, apps/ and services/. A project with another layout sets its own list in a block after the base:

{
  settings: {
    'import/resolver': {
      typescript: { noWarnOnMultipleProjects: true, project: ['./tsconfig.json', './addons/*/*/tsconfig.json'] },
    },
  },
},

The flavors

| Entry | What it adds | Lay it over | | --- | --- | --- | | /react | eslint-plugin-react and jsx-a11y on .tsx and .jsx; the hooks rules on every code file, since custom hooks live in .ts files | base | | /vite | react-refresh/only-export-components with the Vite preset | base, react | | /cva | @open-tomato/cva-only-classname, outside templates, pages, stories and tests | base, react | | /atomic | the atomic-layer rules at warn: layer-imports, no-restyle-from-above, shared-variants, outside stories and tests | base, react | | /type-aware | promise and exhaustiveness rules through the project service | base | | /markdown-fences | lints the js and ts fences of Markdown files | base |

A React component library on Vite with CVA classes:

import baseConfig from '@open-tomato/eslint-config';
import cvaConfig from '@open-tomato/eslint-config/cva';
import reactConfig from '@open-tomato/eslint-config/react';
import viteConfig from '@open-tomato/eslint-config/vite';

export default [...baseConfig, ...reactConfig, ...viteConfig, ...cvaConfig];

The atomic flavor reads a component's level from its path, src/<level>/<Name>/, and warns where a component imports from its own level or a higher one, restyles another component through className, or borrows another component's .variants file. Its default export uses the default levels, lowest first: particles, atoms, molecules, organisms, templates, layouts, pages. That list holds every level the open-tomato libraries use, and a level with no folder costs nothing, so a library with fewer levels keeps it. A library whose levels differ builds the flavor with its own list, which all three rules share:

import { atomic } from '@open-tomato/eslint-config/atomic';

export default [...baseConfig, ...reactConfig, ...atomic({ levels: ['atoms', 'molecules', 'organisms', 'templates'] })];

The rules warn rather than fail, so they show where a low-level component is redefined across layers without blocking a build. A core library that gates on them sets them to error in a block after the flavor:

{
  rules: {
    '@open-tomato/layer-imports': ['error', { levels }],
    '@open-tomato/no-restyle-from-above': ['error', { levels }],
    '@open-tomato/shared-variants': ['error', { levels }],
  },
},

The rules themselves are described in the plugin's README.

The type-aware flavor is a function, because the project service needs the folder of the project's tsconfig.json:

import baseConfig from '@open-tomato/eslint-config';
import { typeAware } from '@open-tomato/eslint-config/type-aware';

export default [...baseConfig, ...typeAware({ tsconfigRootDir: import.meta.dirname })];

Building blocks

/files exports the globs the configs use (TS_FILES, JS_FILES, CODE_FILES, JSX_FILES, LINTED_FILES), so a project block can name the same sets. /shared-rules exports the style rules alone, for a project that needs them in a block of its own.

Versions

ESLint is a peer dependency, so the project picks its version within ^9.39. ESLint 10 is not supported yet, because eslint-plugin-import does not load under it without a compatibility wrapper.