diff options
author | Rich Trott <rtrott@gmail.com> | 2017-04-01 22:57:53 -0700 |
---|---|---|
committer | Myles Borins <mylesborins@google.com> | 2017-05-02 20:01:06 +0200 |
commit | 736a736ed5d5cf054456a74cea56a00904c33f4a (patch) | |
tree | d5c43f9d55289ed675c8ac8df81eff8ee6167305 /tools/eslint/lib/rules/max-lines.js | |
parent | 312091a1968856a86512ec5819b52568d0f5aa8a (diff) | |
download | node-new-736a736ed5d5cf054456a74cea56a00904c33f4a.tar.gz |
tools: update ESLint to 3.19.0
Backport-PR-URL: https://github.com/nodejs/node/pull/12504
PR-URL: https://github.com/nodejs/node/pull/12162
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'tools/eslint/lib/rules/max-lines.js')
-rw-r--r-- | tools/eslint/lib/rules/max-lines.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/eslint/lib/rules/max-lines.js b/tools/eslint/lib/rules/max-lines.js index 08cf9f6084..297c75dc13 100644 --- a/tools/eslint/lib/rules/max-lines.js +++ b/tools/eslint/lib/rules/max-lines.js @@ -90,7 +90,7 @@ module.exports = { token = comment; do { - token = sourceCode.getTokenOrCommentBefore(token); + token = sourceCode.getTokenBefore(token, { includeComments: true }); } while (isCommentNodeType(token)); if (token && astUtils.isTokenOnSameLine(token, comment)) { @@ -99,7 +99,7 @@ module.exports = { token = comment; do { - token = sourceCode.getTokenOrCommentAfter(token); + token = sourceCode.getTokenAfter(token, { includeComments: true }); } while (isCommentNodeType(token)); if (token && astUtils.isTokenOnSameLine(comment, token)) { @@ -134,7 +134,7 @@ module.exports = { message: "File must be at most {{max}} lines long. It's {{actual}} lines long.", data: { max, - actual: lines.length, + actual: lines.length } }); } |