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

@tofrankie/eslint

v0.0.21

Published

Shared ESLint configuration

Readme

@tofrankie/eslint

npm version node version npm package license npm last update

Shared ESLint configuration built on @antfu/eslint-config.

[!IMPORTANT] Before 1.0.0, releases may include breaking changes. Read the CHANGELOG before upgrading.

Requirements

  • Node.js >= 20
  • ESLint >= 9.10.0
  • Flat config only

Quick Start

Install dependencies:

$ pnpm add eslint @tofrankie/eslint -D

ESM (eslint.config.mjs):

import { defineConfig } from '@tofrankie/eslint'

export default defineConfig()

CJS (eslint.config.cjs):

const { defineConfig } = require('@tofrankie/eslint')

module.exports = defineConfig()

Configuration

defineConfig(antfuOptions?, ...flatConfigItems) mirrors @antfu/eslint-config usage: the first argument is antfu-style options (integrations, rules, etc.); rest arguments are extra flat config items appended after the generated stack.

import { defineConfig } from '@tofrankie/eslint'

export default defineConfig(
  {
    typescript: true,
    react: true,
  },
  {
    // additional flat config item
  }
)
  • The first argument uses antfu-compatible options.
  • User rules in the first argument follow antfu's fused-config semantics and stay ahead of any extra flat configs passed in the rest arguments.

@tofrankie/eslint already ships the plugin dependencies behind antfu's renamed rule prefixes. In normal usage you do not need to install those ESLint plugins again in your project. Enable the corresponding antfu options as needed, such as typescript, vue, react, test, or formatters.

Integration overrides vs global rules

Prefer per-integration overrides when a rule belongs to a specific stack (correct file globs and plugin context). Use top-level rules only for truly global tweaks; that layer is not scoped to integration file patterns.

import { defineConfig } from '@tofrankie/eslint'

export default defineConfig({
  vue: {
    overrides: {
      'vue/operator-linebreak': ['error', 'before'],
    },
  },
  typescript: {
    overrides: {
      'ts/consistent-type-definitions': ['error', 'interface'],
    },
  },
})
export default defineConfig({
  rules: { 'no-console': 'off' },
})

TypeScript

Activation follows antfu: when typescript is left unset, support turns on if a typescript package is present. Set typescript: false for JS-only repos that still install TypeScript for tooling.

Type-aware rules need typescript.tsconfigPath (stricter, slower, requires a valid tsconfig.json). With React enabled, React type-aware rules follow the same gate.

export default defineConfig({
  typescript: { tsconfigPath: 'tsconfig.json' },
})

Formatters

@antfu/eslint-config can wire formatters (CSS, HTML, Markdown, GraphQL, Astro, etc.). This preset disables those integrations by default so ESLint does not duplicate work when you already use Prettier (and optionally Stylelint). Defaults still include a formatters.prettierOptions base aligned with @tofrankie/prettier; it applies once you turn formatters on.

Behavior:

  • formatters: false — all formatter integrations off
  • formatters: true — enables the same subset as antfu's boolean shortcut (css, html, markdown, graphql), merged with the built-in prettierOptions base
  • formatters: { ... } — deep-merged with the preset defaults (individual flags off until you set them)
export default defineConfig({
  formatters: {
    html: true,
    markdown: true,
    prettierOptions: { printWidth: 100 },
  },
})

Unused variables

With default options:

  • .jsunused-imports/no-unused-vars
  • .tsts/no-unused-vars
  • Vue SFCs with TypeScript <script>ts/no-unused-vars

WeChat miniprogram

MINIPROGRAM_LANGUAGE_OPTIONS exposes common miniprogram globals for an extra flat item:

import { defineConfig, MINIPROGRAM_LANGUAGE_OPTIONS } from '@tofrankie/eslint'

export default defineConfig(
  { ignores: ['project.config.json', 'project.private.config.json'] },
  { languageOptions: MINIPROGRAM_LANGUAGE_OPTIONS }
)

Acknowledgements

Thanks to these referenced packages: