diff options
author | Rich Trott <rtrott@gmail.com> | 2018-03-21 22:44:47 -0700 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2018-03-24 04:11:48 -0700 |
commit | 0863a0e528ba9ee01f960dce7ffebe8fff3a774c (patch) | |
tree | 37990f3af668c242ec1c4a9e24afd31b720ad96d /tools/node_modules/eslint/lib/rules/comma-dangle.js | |
parent | 5e00a013eb219716d952cb8eb29a134c00f5db54 (diff) | |
download | android-node-v8-0863a0e528ba9ee01f960dce7ffebe8fff3a774c.tar.gz android-node-v8-0863a0e528ba9ee01f960dce7ffebe8fff3a774c.tar.bz2 android-node-v8-0863a0e528ba9ee01f960dce7ffebe8fff3a774c.zip |
tools: update ESLint to 4.19.1
A few bug fixes result in more stringent linting rules.
PR-URL: https://github.com/nodejs/node/pull/19528
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'tools/node_modules/eslint/lib/rules/comma-dangle.js')
-rw-r--r-- | tools/node_modules/eslint/lib/rules/comma-dangle.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/node_modules/eslint/lib/rules/comma-dangle.js b/tools/node_modules/eslint/lib/rules/comma-dangle.js index 180979d403..50de7b59b2 100644 --- a/tools/node_modules/eslint/lib/rules/comma-dangle.js +++ b/tools/node_modules/eslint/lib/rules/comma-dangle.js @@ -124,14 +124,17 @@ module.exports = { ] } ] + }, + + messages: { + unexpected: "Unexpected trailing comma.", + missing: "Missing trailing comma." } }, create(context) { const options = normalizeOptions(context.options[0]); const sourceCode = context.getSourceCode(); - const UNEXPECTED_MESSAGE = "Unexpected trailing comma."; - const MISSING_MESSAGE = "Missing trailing comma."; /** * Gets the last item of the given node. @@ -230,7 +233,7 @@ module.exports = { context.report({ node: lastItem, loc: trailingToken.loc.start, - message: UNEXPECTED_MESSAGE, + messageId: "unexpected", fix(fixer) { return fixer.remove(trailingToken); } @@ -267,7 +270,7 @@ module.exports = { context.report({ node: lastItem, loc: trailingToken.loc.end, - message: MISSING_MESSAGE, + messageId: "missing", fix(fixer) { return fixer.insertTextAfter(trailingToken, ","); } |