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

@cevek/eslint-plugin

v1.0.3

Published

Custom ESLint rules

Readme

@cevek/eslint-plugin

Custom ESLint rules. Config namespace: @cevek.

Rules

| Rule | Applies to | Reports | | -------------------------- | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | component-file-structure | *.tsx with PascalCase filename | one component per file matching filename; no top-level helpers or hooks (allowed: imports, re-exports, enum, type/interface, lazy(() => import(...)), curried HOCs) | | component-scss-module | *.tsx with PascalCase filename | at most one .module.scss import; basename must be <Component>.module.scss; relative paths must be sibling (./<Component>.module.scss); plain .scss imports are not checked | | lucide-icon-size-prop | any JSX | JSX elements imported from lucide-react without a size prop (spread {...props} skips the check) | | no-static-inline-style | any JSX | <div style={{...}}/> on a lowercase DOM element where every property value is a literal (nested static objects included) | | no-template-literal-classname | any JSX | template literal inside className={...} — use cn() from @/lib/utils instead | | no-handrolled-form | any component file | a component that owns field state + renders a controlled field + persists it (mutation / submit) without the sanctioned form hook — i.e. a hand-rolled form. Fully name-configurable (see options). |

component-file-structure messages

  • nameMismatch — single component in file, name ≠ filename
  • extraComponent — more than one component in file
  • noHelpers — top-level helper function (camelCase, not a hook)
  • noHooks — top-level use* hook

component-scss-module messages

  • scssMismatch.module.scss import basename ≠ <Component>.module.scss, or relative path is not strict sibling
  • multipleScss — more than one .module.scss import in the file

lucide-icon-size-prop messages

  • missingSizelucide-react icon used without a size prop

no-static-inline-style messages

  • noStaticStyle

no-template-literal-classname messages

  • useCn — template literal used inside className={...}

no-handrolled-form messages

  • handrolled — component fires all three signals (owns field state + controlled field + persist) without the form hook

A file is flagged only when all hold and the form hook is absent:

  1. owns field state — calls a hook in stateHooks (useState/useReducer)
  2. controlled field — renders a fieldComponents element carrying both a valueProps prop and a changeProps prop
  3. persists — calls mutateCallees (mutate/mutateAsync, incl. x.mutate()), or a hook matching persistHookPattern, or a formElements element with onSubmit, or a submitComponents element with type="submit"

This naturally exempts controlled sub-editors (value+onChange via props, no persist) and search inputs (query, not mutation).

Options

All matching is name-based and configurable, so the rule ports across projects. Omitted keys fall back to defaults.

| Option | Default | Meaning | | --- | --- | --- | | formHook | "useForm" | sanctioned form hook; its presence in a file exempts the file | | fieldComponents | input, textarea, select (native elements) | JSX names treated as controlled fields; projects hiding fields behind primitives (<Input>, …) pass their own list | | valueProps | value, checked, selected | props marking a field value-controlled | | changeProps | onChange, onValueChange, onCheckedChange | props marking a field change-handled | | stateHooks | useState, useReducer | hooks counting as "owns field state" | | mutateCallees | mutate, mutateAsync | callee names (identifier or .member) counting as persist | | persistHookPattern | ^use\\w*Mutation$ | regex (source string) for persist hook names (useMutation, useCreateUserMutation, …) | | formElements | ["form"] | elements whose onSubmit counts as persist | | submitComponents | ["Button", "button"] | elements counting as persist when type="submit" | | exemptPaths | [] | regex source strings matched against the filename; a match skips the file |

// e.g. a project using react-hook-form + MUI
'@cevek/no-handrolled-form': ['error', {
    formHook: 'useForm',
    fieldComponents: ['TextField', 'Checkbox', 'Switch', 'Autocomplete'],
    persistHookPattern: '^use\\w+Mutation$',
    exemptPaths: ['[\\\\/]ui[\\\\/]', '[\\\\/]lib[\\\\/]'],
}],

Flat config (ESLint 10+)

import cevek from '@cevek/eslint-plugin';

export default [
    {
        files: ['**/*.{ts,tsx}'],
        plugins: {'@cevek': cevek},
        rules: {
            '@cevek/component-file-structure': 'error',
            '@cevek/component-scss-module': 'error',
            '@cevek/lucide-icon-size-prop': 'error',
            '@cevek/no-static-inline-style': 'warn',
            '@cevek/no-template-literal-classname': 'error',
            '@cevek/no-handrolled-form': 'error',
        },
    },
];