Skip to content
← Back to rules

jsdoc/no-blank-blocks Style

🛠️ An auto-fix is available for this rule for some violations.

What it does ​

Reports and optionally removes blocks with whitespace only.

Why is this bad? ​

Blank JSDoc blocks add noise without providing any documentation.

Examples ​

Examples of incorrect code for this rule:

js
/** */

/**
 *
 */

Examples of correct code for this rule:

js
/** @tag */

/**
 * Text
 */

/**
 * @tag
 */

Configuration ​

This rule accepts a configuration object with the following properties:

enableFixer ​

type: boolean

default: false

Whether to automatically remove blank JSDoc blocks.

How to use ​

To enable this rule using the config file or in the CLI, you can use:

json
{
  "plugins": ["jsdoc"],
  "rules": {
    "jsdoc/no-blank-blocks": "error"
  }
}
ts
import { defineConfig } from "oxlint";

export default defineConfig({
  plugins: ["jsdoc"],
  rules: {
    "jsdoc/no-blank-blocks": "error",
  },
});
bash
oxlint --deny jsdoc/no-blank-blocks --jsdoc-plugin

Version ​

This rule was added in v1.78.0.

References ​