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-tsdoc-require-2

v1.2.7

Published

Require TSDoc comments for exported TypeScript declarations.

Readme

eslint-plugin-tsdoc-require-2

npm license. npm total downloads. latest GitHub release. GitHub stars. GitHub forks. GitHub open issues. codecov.

Require TSDoc and JSDoc-style comments and documentation tags on exported TypeScript declarations and default exports, with optional enforcement for non-exported top-level declarations.

Oxlint: Compatible with Oxlint 1.80.0 across all 58 rules and eight presets; the JavaScript plugin API remains alpha, so the release gate reruns ESLint/Oxlint conformance coverage.

Table of contents

  1. Installation
  2. Usage (Flat Config)
  3. Opt into non-exported declarations
  4. Presets
  5. Preset matrix
  6. Preset usage examples
  7. Rules
  8. Rule docs
  9. License
  10. Contributors ✨

Installation

npm i -D eslint-plugin-tsdoc-require-2

Usage (Flat Config)

This plugin supports both TSDoc-first and JSDoc-style documentation workflows. Use tsdocRequire.configs.tsdoc for stricter TSDoc conventions, or tsdocRequire.configs.jsdoc for JSDoc-style function tag requirements such as @param, @returns, and @throws.

All bundled presets are scoped to JavaScript and TypeScript source extensions (.cjs, .cts, .js, .jsx, .mjs, .mts, .ts, and .tsx). This keeps the presets compatible with non-JavaScript ESLint languages such as JSON when they share the same Flat Config array.

import tsdocRequire from "eslint-plugin-tsdoc-require-2";

export default [
 tsdocRequire.configs.recommended,
 {
  plugins: {
   "tsdoc-require-2": tsdocRequire,
  },
  rules: {
   "tsdoc-require-2/require": "error",
   "tsdoc-require-2/require-remarks": "error",
  },
 },
];

Opt into non-exported declarations

By default, rules in this plugin focus on exported declarations. To also enforce top-level non-exported declarations, set includeNonExported: true on the rules you want.

import tsdocRequire from "eslint-plugin-tsdoc-require-2";

export default [
 {
  plugins: {
   "tsdoc-require-2": tsdocRequire,
  },
  rules: {
   "tsdoc-require-2/require": [
    "error",
    {
     includeNonExported: true,
    },
   ],
   "tsdoc-require-2/require-remarks": [
    "error",
    {
     includeNonExported: true,
    },
   ],
  },
 },
];

Presets

The matrix below is generated by scripts/sync-presets-rules-matrix.mjs.

Preset matrix

| Rule | Fix | Preset key | | --- | :---: | --- | | tsdoc-require-2/require | — | 🟢 🟡 🟠 🔵 🔴 🟣 🟦 | | tsdoc-require-2/require-abstract | — | | | tsdoc-require-2/require-alpha | — | | | tsdoc-require-2/require-author | — | | | tsdoc-require-2/require-beta | — | | | tsdoc-require-2/require-category | — | | | tsdoc-require-2/require-class | — | 🔵 🔴 | | tsdoc-require-2/require-decorator | — | | | tsdoc-require-2/require-default-value | — | | | tsdoc-require-2/require-deprecated | — | | | tsdoc-require-2/require-document | — | | | tsdoc-require-2/require-enum | — | 🔵 🔴 | | tsdoc-require-2/require-event | — | | | tsdoc-require-2/require-event-property | — | | | tsdoc-require-2/require-example | — | | | tsdoc-require-2/require-expand | — | | | tsdoc-require-2/require-experimental | — | | | tsdoc-require-2/require-function | — | 🔵 🔴 | | tsdoc-require-2/require-group | — | | | tsdoc-require-2/require-hidden | — | | | tsdoc-require-2/require-hideconstructor | — | | | tsdoc-require-2/require-ignore | — | | | tsdoc-require-2/require-import | — | | | tsdoc-require-2/require-include | — | | | tsdoc-require-2/require-inherit-doc | — | | | tsdoc-require-2/require-inline | — | | | tsdoc-require-2/require-interface | — | 🔵 🔴 | | tsdoc-require-2/require-internal | — | | | tsdoc-require-2/require-label | — | | | tsdoc-require-2/require-license | — | | | tsdoc-require-2/require-link | — | | | tsdoc-require-2/require-merge-module-with | — | | | tsdoc-require-2/require-module | — | 🔴 | | tsdoc-require-2/require-namespace | — | | | tsdoc-require-2/require-overload | — | | | tsdoc-require-2/require-override | — | | | tsdoc-require-2/require-package-documentation | — | 🟠 | | tsdoc-require-2/require-param | — | 🟣 🟦 | | tsdoc-require-2/require-primary-export | — | | | tsdoc-require-2/require-private | — | | | tsdoc-require-2/require-private-remarks | — | | | tsdoc-require-2/require-property | — | | | tsdoc-require-2/require-protected | — | | | tsdoc-require-2/require-public | — | | | tsdoc-require-2/require-readonly | — | | | tsdoc-require-2/require-remarks | — | 🟡 🟠 🔴 🟣 | | tsdoc-require-2/require-returns | — | 🟣 🟦 | | tsdoc-require-2/require-sealed | — | | | tsdoc-require-2/require-see | — | | | tsdoc-require-2/require-since | — | | | tsdoc-require-2/require-sort-strategy | — | | | tsdoc-require-2/require-summary | — | | | tsdoc-require-2/require-template | — | | | tsdoc-require-2/require-throws | — | 🟣 🟦 | | tsdoc-require-2/require-type-param | — | 🟣 | | tsdoc-require-2/require-use-declared-type | — | | | tsdoc-require-2/require-virtual | — | | | tsdoc-require-2/restrict-tags | — | 🔴 🟣 |

Preset usage examples

import tsdocRequire from "eslint-plugin-tsdoc-require-2";

export default [
 tsdocRequire.configs.detailed,
 // or:
 // tsdocRequire.configs.packages,
 // tsdocRequire.configs.tsdoc,
 // tsdocRequire.configs.jsdoc,
 // tsdocRequire.configs.typedoc,
 // tsdocRequire.configs["typedoc-strict"],
 // tsdocRequire.configs.all,
];

configs.typedoc is intentionally conservative. It only enables TypeDoc-oriented tag rules whose applicability can be inferred safely from declaration kind: classes, enums, functions, and interfaces.

configs["typedoc-strict"] adds stricter constraints, including tsdoc-require-2/restrict-tags to disallow TypeDoc compatibility-only block tags.

Rules

The table below is generated by scripts/sync-readme-rules-table.mjs.

  • Rule coverage by preset is documented in the Preset matrix above.
  • For full rule documentation links, see Rule docs.

Rule docs

License

MIT © Nick2bad4u

Contributors ✨

All Contributors.

Thanks goes to these wonderful people (emoji key):