diff --git a/eslint-rules/__tests__/warning-and-invariant-args-test.js b/eslint-rules/__tests__/warning-and-invariant-args-test.js index be460f6cfb..bca79f8b75 100644 --- a/eslint-rules/__tests__/warning-and-invariant-args-test.js +++ b/eslint-rules/__tests__/warning-and-invariant-args-test.js @@ -51,8 +51,9 @@ eslintTester.addRuleTest('eslint-rules/warning-and-invariant-args', { code: "warning(true, 'expected %s, got %s');", errors: [ { - message: 'Expected 4 arguments in call to warning, but got 2 ' + - 'based on the number of "%s" substitutions', + message: + 'Expected 4 arguments in call to warning based on the number of ' + + '"%s" substitutions, but got 2', }, ], }, @@ -60,8 +61,9 @@ eslintTester.addRuleTest('eslint-rules/warning-and-invariant-args', { code: "warning(true, 'foobar', 'junk argument');", errors: [ { - message: 'Expected 2 arguments in call to warning, but got 3 ' + - 'based on the number of "%s" substitutions', + message: + 'Expected 2 arguments in call to warning based on the number of ' + + '"%s" substitutions, but got 3', }, ], }, diff --git a/eslint-rules/warning-and-invariant-args.js b/eslint-rules/warning-and-invariant-args.js index 332262ed8b..e120810dda 100644 --- a/eslint-rules/warning-and-invariant-args.js +++ b/eslint-rules/warning-and-invariant-args.js @@ -63,8 +63,8 @@ module.exports = function(context) { if (node.arguments.length !== expectedNArgs) { context.report( node, - 'Expected {{expectedNArgs}} arguments in call to {{name}}, but ' + - 'got {{length}} based on the number of "%s" substitutions', + 'Expected {{expectedNArgs}} arguments in call to {{name}} based on ' + + 'the number of "%s" substitutions, but got {{length}}', { expectedNArgs: expectedNArgs, name: node.callee.name,