Skip to content
This repository has been archived by the owner on Jan 28, 2024. It is now read-only.

Latest commit

 

History

History
53 lines (40 loc) · 1.33 KB

File metadata and controls

53 lines (40 loc) · 1.33 KB

never-disable/rules

Completely bans disabling specific rules.

Examples

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.

Options

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[]