Completely bans disabling specific rules.
Given the following configuration:
module.exports = {
plugins: ["never-disable"],
rules: {
"never-disable/rules": [
"error",
{
rules: [
{
message: "Explanation for why this is so.",
rule: "rule-to-never-disable",
},
],
},
],
},
};
The rule will report on any ESLint disable directive on rule-to-never-disable
:
// eslint-disable-next-line rule-to-never-disable
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Rule 'rule-to-never-disable' should not be disabled. Explanation for why this is so.
Rules may be specified as an array of objects, each of which have the following properties:
message
(string
): Message to include in rule reports.message
(string
): Rule to disable, including plugin name.
Name | Description | Type |
---|---|---|
message |
Message to include in rule reports. | String |
rule |
Rule to disable, including plugin name. | String |
rules |
Object[] |