Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation #229

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,19 @@ Either way, you can optionally configure individual rules:
// ...
comments.recommended,
{
"@eslint-community/eslint-comments/no-unused-disable": "error"
rules: {
"@eslint-community/eslint-comments/require-description": "warn",
},
linterOptions:
reportUnusedDisableDirectives: "error",
},
},
]
```

::: tip
The [`@eslint-community/eslint-comments/no-unused-disable`](./rules/no-unused-disable.html) rule has the same effect as [--report-unused-disable-directives](https://eslint.org/docs/user-guide/command-line-interface#--report-unused-disable-directives) option.
However, the `@eslint-community/eslint-comments/no-unused-disable` rule is relatively useful since it can be configured in shareable configs.
For legacy configs, the [`@eslint-community/eslint-comments/no-unused-disable`](./rules/no-unused-disable.html) rule has the same effect as [--report-unused-disable-directives](https://eslint.org/docs/user-guide/command-line-interface#--report-unused-disable-directives) option.
However, the `@eslint-community/eslint-comments/no-unused-disable` rule is relatively useful since it can be configured in shareable configs. For flat configs the rule has no effect, use `linterOptions.reportUnusedDisableDirectives` instead.
:::

### 📜 Legacy ESLint Configs
Expand All @@ -84,6 +89,7 @@ For example:
],
"rules": {
// Optional.
"@eslint-community/eslint-comments/require-description": "warn",
"@eslint-community/eslint-comments/no-unused-disable": "error"
}
}
Expand Down