summaryrefslogtreecommitdiff
path: root/tools/node_modules/eslint/lib/source-code/token-store/utils.js
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2019-10-25 12:48:14 -0700
committercjihrig <cjihrig@gmail.com>2019-10-28 09:51:24 -0400
commit511f67bcb42b59c9a3a3efab8fed578db100afe1 (patch)
tree8b64f390dd727dd739fd2fb84d69df3c829a9315 /tools/node_modules/eslint/lib/source-code/token-store/utils.js
parentb35181f877d5a92e8bb52eb071489f2a7d87494b (diff)
downloadandroid-node-v8-511f67bcb42b59c9a3a3efab8fed578db100afe1.tar.gz
android-node-v8-511f67bcb42b59c9a3a3efab8fed578db100afe1.tar.bz2
android-node-v8-511f67bcb42b59c9a3a3efab8fed578db100afe1.zip
tools: update ESLint to 6.6.0
Update ESLint to 6.6.0 PR-URL: https://github.com/nodejs/node/pull/30123 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'tools/node_modules/eslint/lib/source-code/token-store/utils.js')
-rw-r--r--tools/node_modules/eslint/lib/source-code/token-store/utils.js22
1 files changed, 9 insertions, 13 deletions
diff --git a/tools/node_modules/eslint/lib/source-code/token-store/utils.js b/tools/node_modules/eslint/lib/source-code/token-store/utils.js
index 34b0a9af6d..444684b52f 100644
--- a/tools/node_modules/eslint/lib/source-code/token-store/utils.js
+++ b/tools/node_modules/eslint/lib/source-code/token-store/utils.js
@@ -16,8 +16,7 @@ const lodash = require("lodash");
/**
* Gets `token.range[0]` from the given token.
- *
- * @param {Node|Token|Comment} token - The token to get.
+ * @param {Node|Token|Comment} token The token to get.
* @returns {number} The start location.
* @private
*/
@@ -32,9 +31,8 @@ function getStartLocation(token) {
/**
* Binary-searches the index of the first token which is after the given location.
* If it was not found, this returns `tokens.length`.
- *
- * @param {(Token|Comment)[]} tokens - It searches the token in this list.
- * @param {number} location - The location to search.
+ * @param {(Token|Comment)[]} tokens It searches the token in this list.
+ * @param {number} location The location to search.
* @returns {number} The found index or `tokens.length`.
*/
exports.search = function search(tokens, location) {
@@ -48,10 +46,9 @@ exports.search = function search(tokens, location) {
/**
* Gets the index of the `startLoc` in `tokens`.
* `startLoc` can be the value of `node.range[1]`, so this checks about `startLoc - 1` as well.
- *
- * @param {(Token|Comment)[]} tokens - The tokens to find an index.
- * @param {Object} indexMap - The map from locations to indices.
- * @param {number} startLoc - The location to get an index.
+ * @param {(Token|Comment)[]} tokens The tokens to find an index.
+ * @param {Object} indexMap The map from locations to indices.
+ * @param {number} startLoc The location to get an index.
* @returns {number} The index.
*/
exports.getFirstIndex = function getFirstIndex(tokens, indexMap, startLoc) {
@@ -77,10 +74,9 @@ exports.getFirstIndex = function getFirstIndex(tokens, indexMap, startLoc) {
/**
* Gets the index of the `endLoc` in `tokens`.
* The information of end locations are recorded at `endLoc - 1` in `indexMap`, so this checks about `endLoc - 1` as well.
- *
- * @param {(Token|Comment)[]} tokens - The tokens to find an index.
- * @param {Object} indexMap - The map from locations to indices.
- * @param {number} endLoc - The location to get an index.
+ * @param {(Token|Comment)[]} tokens The tokens to find an index.
+ * @param {Object} indexMap The map from locations to indices.
+ * @param {number} endLoc The location to get an index.
* @returns {number} The index.
*/
exports.getLastIndex = function getLastIndex(tokens, indexMap, endLoc) {