Skip to content

Commit fb97cda

Browse files
authored
fix: improve error message for missing fix function in suggestions (#20218)
1 parent 9e7fad4 commit fb97cda

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/linter/file-report.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ function validateSuggestions(suggest, messages) {
426426

427427
if (typeof suggestion.fix !== "function") {
428428
throw new TypeError(
429-
`context.report() called with a suggest option without a fix function. See: ${suggestion}`,
429+
`context.report() called with a suggest option without a fix function. See: ${JSON.stringify(suggestion, null, 2)}`,
430430
);
431431
}
432432
});

0 commit comments

Comments
 (0)