UNPKG

650 BJavaScriptView Raw
1"use strict";
2
3const { stringifyValueForError } = require("./shared");
4
5module.exports = function({ ruleId, value }) {
6 return `
7Configuration for rule "${ruleId}" is invalid. Each rule must have a severity ("off", 0, "warn", 1, "error", or 2) and may be followed by additional options for the rule.
8
9You passed '${stringifyValueForError(value, 4)}', which doesn't contain a valid severity.
10
11If you're attempting to configure rule options, perhaps you meant:
12
13 "${ruleId}": ["error", ${stringifyValueForError(value, 8)}]
14
15See https://eslint.org/docs/latest/use/configure/rules#using-configuration-files for configuring rules.
16`.trimStart();
17};