eslint-plugin-avoid-comments
Version:
ESLint customized rule to prevent comments
29 lines (22 loc) • 764 B
Markdown
Some comments cause unnecessary noise in the code, so this rule makes ESLint disallow comments that do not fit the proposals of pre-configured **prefixes keywords**.
```sh
npm install eslint-plugin-avoid-comments --save-dev
```
```js
// eslintrc.js
{
"plugins": ["avoid-comments"],
"rules": {
"avoid-comments/avoid-comments": [
"error",
{
"allow": ["PENDING", "FIXME", "REVIEW"],
}
]
}
}
```
> _In the trials ahead, it is recommended to wield this plugin alongside its extension [Comment Anchors](https://marketplace.visualstudio.com/items?itemName=ExodiusStudios.comment-anchors)_