# single-line-block-comment-style

Rule `unicorn/single-line-block-comment-style`. Enforce a consistent style for single-line block comments.

- Source: unicorn
- Technologies: JavaScript
- Kind: style
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 9.9M weekly downloads of presets that enable it
- Trend: +28.3% last quarter
- Rank: #1086 by reach, #1341 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `unicorn/single-line-block-comment-style` | no | safe | package `eslint-plugin-unicorn` | [docs](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v80.0.0/docs/rules/single-line-block-comment-style.md) |

## Code examples

### Incorrect: the rule reports this

```js
/** Get the value. */
/* Get the value. */
```

### Correct: the rule accepts this

```js
/**
Get the value.
*/
/*
Get the value.
*/
```

Examples from the ESLint documentation.

## Enable it

### ESLint: `eslint.config.js`

```js
import unicorn from "eslint-plugin-unicorn";

export default [
  {
    plugins: { unicorn },
    rules: {
      "unicorn/single-line-block-comment-style": "error",
    },
  },
];
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Unicorn recommended](https://lintradar.dev/presets/unicorn-recommended.md) | ESLint | `eslint-plugin-unicorn` | 340 | 9.5M | +30.3% |
| [XO](https://lintradar.dev/presets/xo.md) | ESLint | `eslint-config-xo` | 618 | 413K | −5.0% |

## Related rules

- [unicorn/require-spread-parentheses](https://lintradar.dev/rules/unicorn/require-spread-parentheses.md): Require parentheses around complex spread arguments.
- [unicorn/template-indent](https://lintradar.dev/rules/unicorn/template-indent.md): Fix whitespace-insensitive template indentation.
- [unicorn/prefer-type-literal-last](https://lintradar.dev/rules/unicorn/prefer-type-literal-last.md): Require type literals to be last in union types.
- [unicorn/prefer-then-catch](https://lintradar.dev/rules/unicorn/prefer-then-catch.md): Prefer `.then().catch()` over `.then(…, …)` for error handling.
- [unicorn/prefer-smaller-scope](https://lintradar.dev/rules/unicorn/prefer-smaller-scope.md): Prefer declaring variables and type aliases in the smallest possible scope.
- [unicorn/prefer-single-object-destructuring](https://lintradar.dev/rules/unicorn/prefer-single-object-destructuring.md): Prefer a single object destructuring declaration per local const source.

---

Web page: https://lintradar.dev/rules/unicorn/single-line-block-comment-style. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
