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-meaningful-docs

v1.0.0

Published

ESLint plugin to detect and auto-fix AI-generated documentation patterns

Readme

eslint-plugin-meaningful-docs

ESLint plugin to detect and auto-fix AI-generated documentation patterns in TypeScript/JavaScript codebases.

AI code agents generate excessive, redundant documentation that clutters codebases. This plugin catches common patterns and helps keep your docs meaningful.

Installation

npm install eslint-plugin-meaningful-docs --save-dev

Usage

Flat Config (ESLint 9+)

// eslint.config.js
import meaningfulDocs from 'eslint-plugin-meaningful-docs';

export default [
  // Use the recommended config
  meaningfulDocs.configs.recommended,

  // Or configure rules individually
  {
    plugins: {
      'meaningful-docs': meaningfulDocs,
    },
    rules: {
      'meaningful-docs/no-obvious-comments': 'warn',
      'meaningful-docs/no-ai-filler-phrases': 'warn',
      'meaningful-docs/no-redundant-function-description': 'warn',
      'meaningful-docs/no-redundant-type-docs': 'warn',
      'meaningful-docs/no-over-documented-simple-code': 'warn',
      'meaningful-docs/no-restating-comments': 'warn',
      'meaningful-docs/no-redundant-jsdoc-params': 'warn',
    },
  },
];

Rules

no-obvious-comments

Detects comments that state the obvious and add no value.

// BAD
// Loop through items
for (const item of items) { }

// Increment counter
counter++;

// GOOD - no comment needed, code is self-explanatory
for (const item of items) { }
counter++;

Auto-fixable: Yes - removes the comment

Options:

  • patterns (string[]): Additional regex patterns to flag

no-ai-filler-phrases

Detects AI-style filler language in comments.

// BAD
/** This function retrieves the user from the database */
function getUser() {}

// Note that we call the API here
fetch('/api');

// GOOD
/** Retrieves from read replica, falls back to primary on miss */
function getUser() {}

Auto-fixable: Partially - removes entirely filler comments

Options:

  • phrases (string[]): Additional filler phrases to detect

no-redundant-function-description

Detects JSDoc descriptions that merely restate the function name.

// BAD
/** Gets user data */
function getUserData() {}

/** Calculates the total */
function calculateTotal() {}

// GOOD
/** Fetches from cache first, retries 3x on failure */
function getUserData() {}

/** Includes tax and shipping per GAAP requirements */
function calculateTotal() {}

Auto-fixable: Yes - removes redundant description

no-redundant-type-docs

Detects @param and @returns tags that merely restate TypeScript types.

// BAD
/**
 * @param userId - The user ID
 * @returns The user
 */
function getUser(userId: string): User {}

// GOOD - let TypeScript handle type documentation
function getUser(userId: string): User {}

// ALSO GOOD - adds meaningful context
/**
 * @param userId - Must be a v4 UUID from the auth service
 */
function getUser(userId: string): User {}

Auto-fixable: No (requires judgment on what to keep)

Options:

  • allowDescriptiveParams (boolean, default: true): Keep @param if it adds context beyond the type

no-over-documented-simple-code

Detects excessive documentation on trivial code.

// BAD
/**
 * Gets the current value from the store.
 * This function retrieves the value.
 * It returns the value as-is.
 * @returns The value
 */
function getValue() {
  return 1;
}

// GOOD
function getValue() {
  return 1;
}

Auto-fixable: No (requires human judgment)

Options:

  • maxSimpleStatements (number, default: 1): Max statements for "simple" code
  • maxDocLines (number, default: 3): Max JSDoc lines for simple code

no-restating-comments

Detects comments that simply restate what the code does.

// BAD
// Check if user is valid
if (user.isValid) { }

// Return the result
return result;

// Loop through items
for (const item of items) { }

// GOOD - no comment needed, or explain WHY
// Validation required before API call (see SEC-123)
if (user.isValid) { }

Auto-fixable: Yes - removes the comment

Options:

  • threshold (number, 0-1, default: 0.4): Word overlap threshold for detection

no-redundant-jsdoc-params

Removes @param and @returns tags when TypeScript types already document the parameters.

// BAD - TypeScript types already document this
/**
 * @param userId - The user ID
 * @param options - The options
 * @returns The user object
 */
function getUser(userId: string, options: Options): User {}

// GOOD - let TypeScript be the documentation
function getUser(userId: string, options: Options): User {}

// ALSO GOOD - untyped params still need @param
/**
 * @param callback - Called when complete
 */
function fetchData(url: string, callback): void {}

Auto-fixable: Yes - removes redundant tags

Preserved Patterns

The plugin is smart about preserving valuable documentation. It will NOT flag comments containing:

  • Why explanations: "because", "due to", "workaround", "edge case"
  • Task markers: "TODO", "FIXME", "BUG", "HACK", "XXX"
  • Business context: "requirement", "compliance", "legacy", "specification"
  • Warnings: "warning", "caution", "security", "throws", "side effect"

Configs

recommended

Enables all rules at warn level:

import meaningfulDocs from 'eslint-plugin-meaningful-docs';

export default [
  meaningfulDocs.configs.recommended,
];

strict

Enables all rules at error level:

import meaningfulDocs from 'eslint-plugin-meaningful-docs';

export default [
  meaningfulDocs.configs.strict,
];

Running with Auto-fix

# Check for issues
npx eslint src/

# Auto-fix where possible
npx eslint src/ --fix

CI/Pre-commit Integration

Add to your package.json:

{
  "scripts": {
    "lint": "eslint src/",
    "lint:fix": "eslint src/ --fix"
  }
}

Or use with lint-staged:

{
  "lint-staged": {
    "*.{ts,tsx,js,jsx}": "eslint --fix"
  }
}

License

MIT