diff options
author | cjihrig <cjihrig@gmail.com> | 2019-01-18 16:09:54 -0500 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2019-01-20 20:31:03 -0500 |
commit | af102c6d277165a641a4082b0641388807985875 (patch) | |
tree | af55616aa0751e0896699899a2d3fc2f9c7f1802 /tools/node_modules/eslint/lib/rules/multiline-ternary.js | |
parent | d1dee495db1451e74f5364c8687148a53ff0b50d (diff) | |
download | android-node-v8-af102c6d277165a641a4082b0641388807985875.tar.gz android-node-v8-af102c6d277165a641a4082b0641388807985875.tar.bz2 android-node-v8-af102c6d277165a641a4082b0641388807985875.zip |
tools: update ESLint to 5.12.1
Update ESLint to 5.12.1
PR-URL: https://github.com/nodejs/node/pull/25573
Reviewed-By: Wyatt Preul <wpreul@gmail.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
Diffstat (limited to 'tools/node_modules/eslint/lib/rules/multiline-ternary.js')
-rw-r--r-- | tools/node_modules/eslint/lib/rules/multiline-ternary.js | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tools/node_modules/eslint/lib/rules/multiline-ternary.js b/tools/node_modules/eslint/lib/rules/multiline-ternary.js index d1d577a4ff..83378dcd86 100644 --- a/tools/node_modules/eslint/lib/rules/multiline-ternary.js +++ b/tools/node_modules/eslint/lib/rules/multiline-ternary.js @@ -26,7 +26,13 @@ module.exports = { { enum: ["always", "always-multiline", "never"] } - ] + ], + messages: { + expectedTestCons: "Expected newline between test and consequent of ternary expression.", + expectedConsAlt: "Expected newline between consequent and alternate of ternary expression.", + unexpectedTestCons: "Unexpected newline between test and consequent of ternary expression.", + unexpectedConsAlt: "Unexpected newline between consequent and alternate of ternary expression." + } }, create(context) { @@ -49,11 +55,7 @@ module.exports = { function reportError(node, parentNode, expected) { context.report({ node, - message: "{{expected}} newline between {{typeOfError}} of ternary expression.", - data: { - expected: expected ? "Expected" : "Unexpected", - typeOfError: node === parentNode.test ? "test and consequent" : "consequent and alternate" - } + messageId: `${expected ? "expected" : "unexpected"}${node === parentNode.test ? "TestCons" : "ConsAlt"}` }); } |