Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/sindresorhus/eslint-plugin-unicorn/llms.txt

Use this file to discover all available pages before exploring further.

A bare eslint-disable comment without any rule names silences every ESLint rule in scope. This makes it easy to accidentally hide real problems. This rule requires you to always name the specific rule or rules you are disabling.
Recommendedrecommended · ☑️ unopinionated
Fixable
Suggestions

Examples

/* eslint-disable */
console.log(message); // undeclared `message` is hidden too

console.log(message); // eslint-disable-line

// eslint-disable-next-line
console.log(message);
If you need to disable ESLint for an entire file, add the file to your .eslintignore (or the ignores property in your flat config) instead of using a bare eslint-disable comment.

Why this matters

When you write /* eslint-disable */, ESLint suppresses all rules. That means a genuine bug — an undeclared variable, an unsafe operation — could go unreported because the disable comment was too broad. Naming the rule makes the intent explicit and limits suppression to only what is needed.

Build docs developers (and LLMs) love