ESLint plugin to completely ban disabling specific rules. π
Use eslint-comments/no-restricted-disable
instead.
Add the following options to your ESLint configuration file:
module.exports = {
// ...
plugins: ["never-disable"],
rules: {
"never-disable/rules": [
"error",
{
rules: [
{
message: "Explanation for why this is so.",
rule: "rule-to-never-disable",
},
],
},
],
},
// ...
};
Then developers will receive the following error upon trying to disable a never-to-be-disabled rule:
// eslint-disable-next-line rule-to-never-disable
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Rule 'rule-to-never-disable' should not be disabled. Explanation for why this is so.
Name | Description |
---|---|
rules | Completely bans disabling specific rules. |
Josh Goldberg β¨ π» π π π€ π π§ π π§ π |
StyleShit π π» π π€ |
π This package was templated with
create-typescript-app
.