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

@lzear/eslint-config

v5.0.0

Published

Shared ESLint flat config for lzear repos

Readme

@lzear/eslint-config

npm license

ESLint flat config for forge repos. Node ≥ 24, ESLint ≥ 10. Browse every rule in the config inspector, or locally with npx eslint --inspect-config.

yarn add -D @lzear/eslint-config eslint
// eslint.config.ts
import lzearConfig, { FILES } from '@lzear/eslint-config'

export default [
  ...(await lzearConfig({ react: false, local: 'acme' })),
  { files: FILES.TESTS, rules: { 'no-console': 'off' } },
  { ignores: ['src/generated/**'] },
]

Options

Defaults come from the dependencies in the cwd's package.json and its workspaces'; explicit options win.

| Option | Default | Effect | | ------------ | ----------------------------------------- | --------------------------------------------------- | | json | true | enable the layer | | markdown | true | enable the layer | | node | true | enable the layer | | react | react is a dependency | enable the layer | | typescript | typescript is one, or a tsconfig.json | enable the layer | | vitest | vitest is a dependency | enable the layer | | yaml | true | enable the layer | | local | | npm scope whose imports sort after third-party ones |

Layers

Each is exported too, for replacing one wholesale. prettier comes last so it overrides the rest.

| Layer | Files | Plugins | | ------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- | | core | JS, TS, JSX, TSX | @eslint/js, stylistic, unicorn, sonarjs, import-x, simple-import-sort, promise, regexp, de-morgan, eslint-comments, prefer-arrow | | typescript | TS, TSX | typescript-eslint strictTypeChecked + stylisticTypeChecked (project service) | | react | JSX, TSX | react-x, react-dom, react-web-api, react-hooks | | a11y | JSX, TSX | jsx-a11y-x, as jsx-a11y | | node | JS, TS, JSX, TSX | n | | vitest | tests | @vitest/eslint-plugin; relaxes no-non-null-assertion, no-unsafe-* and sonarjs/no-duplicate-string | | json | JSON, JSONC, JSON5 | @eslint/json; JSONC: *.jsonc, tsconfigs, .vscode, .devcontainer, .fallowrc.json | | markdown | *.md | @eslint/markdown (GFM, YAML front matter); JS/TS code blocks get the layers above, without type-aware rules | | yaml | *.yml, *.yaml | eslint-plugin-yml recommended, minus no-empty-mapping-value | | packageJson | package.json | eslint-package-json, e18e/ban-dependencies, lzear/major-version-only | | prettier | all | prettier: no semicolons, single quotes; deno.json as JSON.stringify writes it, .yarnrc.yml double-quoted, code blocks with their Markdown file | | ignores | | dist, coverage, build, caches |

Arrow functions only, curly: multi, inline type imports, it over test. Unused disable directives and inline configs are errors. On TS files, sonarjs rules that tsc or typescript-eslint already enforce are off; sonarjs/aws-* everywhere. only-throw-error allows TanStack Router's redirect() and notFound(). The n layer leaves Node builtins alone in JSX/TSX (browser code). react-x reads the installed React version. The data layers keep correctness rules: Prettier formats those files. In code blocks, imports may name the package itself and values go unused; <!-- eslint-skip --> above a block skips it.

Adding your own no-restricted-syntax replaces forge's: spread RESTRICTED_SYNTAX into it.

import { FILES, RESTRICTED_SYNTAX } from '@lzear/eslint-config'

const restricted = {
  files: FILES.REACT,
  rules: {
    'no-restricted-syntax': [
      2,
      ...RESTRICTED_SYNTAX,
      { selector: 'WithStatement', message: 'No with.' },
    ],
  },
}

Rules

  • lzear/prefer-relative-imports (fixable): an aliased import inside the same package becomes relative when shorter, up to maxParentPrefixes ../ (default 1).
  • lzear/major-version-only (fixable): ^1.2.3 → ^1, ^0.5.4 → ^0.5. ignore takes package names or { regex }.