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

eslint-plugin-slop

v0.1.3

Published

ESLint rules that flag low-value code and prose patterns.

Readme

eslint-plugin-slop

npm version npm downloads bundle JSDocs License

ESLint rules for guarding AI slops in code.

Usage

createSlopConfig() enables every rule as an error. It inspects recent changes by default.

import { createSlopConfig } from 'eslint-plugin-slop'

export default [
  ...createSlopConfig(),
]

The constructor returns two flat config entries. The universal entry enables no-em-dash for every language in the surrounding ESLint config. The JavaScript entry enables the syntax rules for js, mjs, cjs, jsx, ts, mts, cts, and tsx files.

The consumer supplies parsers and language plugins. Linting Markdown, for example, requires a Markdown language plugin in the same ESLint config.

Inspection modes

createSlopConfig({
  cwd: import.meta.dirname,
  inspection: {
    mode: 'recent-changes',
    tracebackCommits: 5,
  },
})
  • recent-changes compares the exact linted text with HEAD~tracebackCommits. It includes committed, staged, unstaged, untracked, and unsaved changes. The default traceback is five commits.
  • uncommitted compares the exact linted text with HEAD. It includes staged, unstaged, untracked, and unsaved changes.
  • full inspects the complete file.

A bare mode string is shorthand for { mode }, so inspection: 'full' equals inspection: { mode: 'full' }.

Recent modes report a construct only when its current range intersects an added or modified line in the net diff. If Git is unavailable, the file sits outside the repository, or the requested history is unavailable, the rules inspect the complete file.

Per-rule overrides

Every rule accepts the global props (cwd, inspection) in its own options entry, overriding the shared config for that rule alone. The shorthand works here too.

createSlopConfig({
  inspection: 'recent-changes',
  rules: {
    // Always scan the whole file for em dashes, ignoring the global inspection.
    'slop/no-em-dash': ['error', { inspection: 'full' }],
    'slop/max-comment-length': ['error', { maximumWords: 40, inspection: 'uncommitted' }],
  },
})

Rule overrides

Rule overrides use normal flat config entries.

createSlopConfig({
  rules: {
    'slop/max-comment-length': ['error', { maximumWords: 40 }],
    'slop/no-trivial-functions': ['error', { minimumReferences: 3 }],
    'slop/no-em-dash': 'off',
  },
})

The default export is the raw ESLint plugin object. It has meta and rules, with no bundled configs. A raw configuration with no settings.slop uses full inspection.

Rules

| Rule | Reports | Options | | --- | --- | --- | | slop/no-em-dash | Each literal U+2014 character in any parser-compatible language | None | | slop/no-trivial-functions | Low-use top-level property access or transparent forwarding functions that are not exported through ESM | minimumReferences, default 5 | | slop/max-comment-length | Logical comment blocks over a word limit | maximumWords, default 50; ignoreJSDoc, default true | | slop/no-jargon | Inflated vocabulary in comments, with editor suggestions where a clean swap exists | words; extraWords; allow; ignoreJSDoc, default false | | slop/prefer-jsdoc | A // comment documenting an export or member, autofixed to /** */ | None | | slop/no-trivial-type-aliases | Top-level TypeScript aliases that resolve through same-file chains to unknown or a primitive | None | | slop/no-static-only-class | Classes that group only static members and act as namespaces instead of abstractions | None | | slop/no-chained-type-assertions | Two or more nested TypeScript assertions, except chains made entirely of as const | None |

max-comment-length groups directly adjacent line comments. A blank line or code separates groups. The first comment block before the first code token is a file header. A shebang may come before it.

no-trivial-functions counts external value references. It excludes the declaration, recursive references inside the function, and type-only references. Direct and later ESM exports remain allowed.

no-jargon matches simple inflections, so utilizes and delving are caught. A word inside backticks or double quotes never fires. The default word list is exported as defaultJargonWords.

prefer-jsdoc fires on a // run directly above an export or a member (interface and type-literal members, object properties, class members, enum members). A blank line does not break the association; code or a block comment does. License headers and directive comments are left alone.

no-static-only-class reports a class when every member is static, ignoring an empty boilerplate constructor. Classes with a superclass, implements, decorators, an abstract or declare modifier, a static block, or any instance member stay allowed.

Credits

The rule selection and package organization draw from these projects.

The rule implementations here are original and follow the narrower behavior documented above.

Sponsors

License

MIT License © Anthony Fu