eslint 6.5.1 → 6.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/README.md +4 -3
  3. package/lib/cli-engine/cascading-config-array-factory.js +2 -1
  4. package/lib/cli-engine/cli-engine.js +9 -7
  5. package/lib/cli-engine/config-array/config-array.js +0 -4
  6. package/lib/cli-engine/config-array/config-dependency.js +2 -0
  7. package/lib/cli-engine/config-array/override-tester.js +2 -0
  8. package/lib/cli-engine/config-array-factory.js +7 -1
  9. package/lib/cli-engine/file-enumerator.js +5 -3
  10. package/lib/cli-engine/formatters/html.js +1 -0
  11. package/lib/cli-engine/ignored-paths.js +1 -0
  12. package/lib/init/autoconfig.js +1 -11
  13. package/lib/init/config-file.js +0 -1
  14. package/lib/init/config-initializer.js +0 -1
  15. package/lib/init/config-rule.js +1 -5
  16. package/lib/init/npm-utils.js +0 -5
  17. package/lib/linter/code-path-analysis/code-path-analyzer.js +24 -38
  18. package/lib/linter/code-path-analysis/code-path-segment.js +17 -25
  19. package/lib/linter/code-path-analysis/code-path-state.js +40 -81
  20. package/lib/linter/code-path-analysis/code-path.js +10 -11
  21. package/lib/linter/code-path-analysis/debug-helpers.js +8 -12
  22. package/lib/linter/code-path-analysis/fork-context.js +23 -34
  23. package/lib/linter/code-path-analysis/id-generator.js +2 -2
  24. package/lib/linter/linter.js +121 -95
  25. package/lib/linter/node-event-generator.js +3 -2
  26. package/lib/rule-tester/rule-tester.js +6 -8
  27. package/lib/rules/accessor-pairs.js +8 -8
  28. package/lib/rules/array-bracket-newline.js +12 -15
  29. package/lib/rules/array-bracket-spacing.js +12 -12
  30. package/lib/rules/array-callback-return.js +6 -11
  31. package/lib/rules/array-element-newline.js +5 -8
  32. package/lib/rules/arrow-parens.js +0 -1
  33. package/lib/rules/block-scoped-var.js +3 -3
  34. package/lib/rules/block-spacing.js +4 -4
  35. package/lib/rules/capitalized-comments.js +0 -7
  36. package/lib/rules/class-methods-use-this.js +3 -3
  37. package/lib/rules/comma-dangle.js +15 -23
  38. package/lib/rules/comma-spacing.js +1 -1
  39. package/lib/rules/computed-property-spacing.js +10 -10
  40. package/lib/rules/consistent-return.js +4 -5
  41. package/lib/rules/consistent-this.js +5 -5
  42. package/lib/rules/constructor-super.js +14 -16
  43. package/lib/rules/curly.js +3 -5
  44. package/lib/rules/default-param-last.js +1 -0
  45. package/lib/rules/dot-location.js +11 -12
  46. package/lib/rules/func-names.js +6 -6
  47. package/lib/rules/function-call-argument-newline.js +5 -5
  48. package/lib/rules/generator-star-spacing.js +4 -9
  49. package/lib/rules/getter-return.js +4 -7
  50. package/lib/rules/indent.js +2 -2
  51. package/lib/rules/init-declarations.js +2 -2
  52. package/lib/rules/jsx-quotes.js +1 -1
  53. package/lib/rules/keyword-spacing.js +32 -56
  54. package/lib/rules/lines-around-directive.js +1 -1
  55. package/lib/rules/max-len.js +0 -5
  56. package/lib/rules/max-statements-per-line.js +3 -7
  57. package/lib/rules/multiline-ternary.js +3 -3
  58. package/lib/rules/newline-after-var.js +6 -7
  59. package/lib/rules/newline-before-return.js +8 -9
  60. package/lib/rules/newline-per-chained-call.js +2 -4
  61. package/lib/rules/no-class-assign.js +2 -2
  62. package/lib/rules/no-compare-neg-zero.js +1 -2
  63. package/lib/rules/no-confusing-arrow.js +2 -2
  64. package/lib/rules/no-console.js +4 -8
  65. package/lib/rules/no-const-assign.js +1 -1
  66. package/lib/rules/no-dupe-args.js +1 -1
  67. package/lib/rules/no-dupe-class-members.js +3 -4
  68. package/lib/rules/no-dupe-keys.js +6 -5
  69. package/lib/rules/no-duplicate-imports.js +14 -18
  70. package/lib/rules/no-else-return.js +0 -8
  71. package/lib/rules/no-empty-function.js +2 -4
  72. package/lib/rules/no-eval.js +10 -18
  73. package/lib/rules/no-ex-assign.js +1 -1
  74. package/lib/rules/no-extra-bind.js +5 -12
  75. package/lib/rules/no-extra-boolean-cast.js +0 -2
  76. package/lib/rules/no-extra-label.js +4 -9
  77. package/lib/rules/no-extra-parens.js +17 -15
  78. package/lib/rules/no-extra-semi.js +5 -6
  79. package/lib/rules/no-fallthrough.js +6 -6
  80. package/lib/rules/no-func-assign.js +3 -3
  81. package/lib/rules/no-global-assign.js +4 -4
  82. package/lib/rules/no-implicit-coercion.js +10 -10
  83. package/lib/rules/no-implied-eval.js +0 -1
  84. package/lib/rules/no-invalid-this.js +1 -3
  85. package/lib/rules/no-labels.js +3 -6
  86. package/lib/rules/no-lone-blocks.js +1 -1
  87. package/lib/rules/no-loop-func.js +6 -11
  88. package/lib/rules/no-magic-numbers.js +6 -6
  89. package/lib/rules/no-misleading-character-class.js +14 -7
  90. package/lib/rules/no-mixed-operators.js +13 -22
  91. package/lib/rules/no-mixed-requires.js +0 -1
  92. package/lib/rules/no-multi-spaces.js +1 -1
  93. package/lib/rules/no-native-reassign.js +4 -4
  94. package/lib/rules/no-param-reassign.js +28 -7
  95. package/lib/rules/no-redeclare.js +1 -1
  96. package/lib/rules/no-regex-spaces.js +0 -1
  97. package/lib/rules/no-restricted-imports.js +11 -11
  98. package/lib/rules/no-self-assign.js +12 -13
  99. package/lib/rules/no-sequences.js +3 -3
  100. package/lib/rules/no-shadow.js +1 -4
  101. package/lib/rules/no-tabs.js +8 -2
  102. package/lib/rules/no-this-before-super.js +12 -13
  103. package/lib/rules/no-trailing-spaces.js +19 -7
  104. package/lib/rules/no-unmodified-loop-condition.js +16 -29
  105. package/lib/rules/no-unneeded-ternary.js +3 -3
  106. package/lib/rules/no-unreachable.js +7 -7
  107. package/lib/rules/no-unsafe-finally.js +4 -7
  108. package/lib/rules/no-unsafe-negation.js +32 -9
  109. package/lib/rules/no-unused-expressions.js +11 -7
  110. package/lib/rules/no-unused-labels.js +3 -6
  111. package/lib/rules/no-unused-vars.js +22 -29
  112. package/lib/rules/no-use-before-define.js +10 -15
  113. package/lib/rules/no-useless-call.js +4 -4
  114. package/lib/rules/no-useless-concat.js +4 -4
  115. package/lib/rules/no-useless-constructor.js +14 -22
  116. package/lib/rules/no-useless-escape.js +3 -5
  117. package/lib/rules/no-useless-rename.js +7 -7
  118. package/lib/rules/no-useless-return.js +8 -15
  119. package/lib/rules/no-var.js +12 -25
  120. package/lib/rules/no-warning-comments.js +0 -1
  121. package/lib/rules/no-whitespace-before-property.js +3 -3
  122. package/lib/rules/object-curly-newline.js +7 -10
  123. package/lib/rules/object-curly-spacing.js +13 -14
  124. package/lib/rules/object-shorthand.js +1 -1
  125. package/lib/rules/one-var-declaration-per-line.js +2 -2
  126. package/lib/rules/operator-assignment.js +22 -1
  127. package/lib/rules/padded-blocks.js +1 -1
  128. package/lib/rules/padding-line-between-statements.js +0 -16
  129. package/lib/rules/prefer-arrow-callback.js +6 -6
  130. package/lib/rules/prefer-const.js +13 -21
  131. package/lib/rules/prefer-destructuring.js +1 -7
  132. package/lib/rules/prefer-named-capture-group.js +0 -1
  133. package/lib/rules/prefer-numeric-literals.js +32 -4
  134. package/lib/rules/prefer-object-spread.js +7 -7
  135. package/lib/rules/prefer-rest-params.js +3 -6
  136. package/lib/rules/prefer-spread.js +4 -4
  137. package/lib/rules/prefer-template.js +5 -6
  138. package/lib/rules/quote-props.js +1 -1
  139. package/lib/rules/quotes.js +5 -6
  140. package/lib/rules/radix.js +5 -10
  141. package/lib/rules/require-await.js +2 -5
  142. package/lib/rules/require-yield.js +2 -2
  143. package/lib/rules/rest-spread-spacing.js +1 -1
  144. package/lib/rules/sort-imports.js +3 -4
  145. package/lib/rules/sort-keys.js +1 -3
  146. package/lib/rules/space-before-blocks.js +1 -2
  147. package/lib/rules/space-in-parens.js +4 -4
  148. package/lib/rules/space-infix-ops.js +5 -5
  149. package/lib/rules/spaced-comment.js +15 -18
  150. package/lib/rules/strict.js +2 -4
  151. package/lib/rules/symbol-description.js +1 -2
  152. package/lib/rules/template-curly-spacing.js +2 -2
  153. package/lib/rules/use-isnan.js +40 -3
  154. package/lib/rules/utils/ast-utils.js +53 -81
  155. package/lib/rules/utils/fix-tracker.js +0 -6
  156. package/lib/rules/utils/lazy-loading-rule-map.js +0 -1
  157. package/lib/rules/vars-on-top.js +11 -11
  158. package/lib/shared/config-ops.js +2 -2
  159. package/lib/shared/runtime-info.js +8 -8
  160. package/lib/shared/traverser.js +2 -0
  161. package/lib/source-code/source-code.js +8 -8
  162. package/lib/source-code/token-store/backward-token-comment-cursor.js +5 -5
  163. package/lib/source-code/token-store/backward-token-cursor.js +5 -5
  164. package/lib/source-code/token-store/cursors.js +17 -19
  165. package/lib/source-code/token-store/decorative-cursor.js +1 -1
  166. package/lib/source-code/token-store/filter-cursor.js +2 -2
  167. package/lib/source-code/token-store/forward-token-comment-cursor.js +5 -5
  168. package/lib/source-code/token-store/forward-token-cursor.js +5 -5
  169. package/lib/source-code/token-store/index.js +86 -92
  170. package/lib/source-code/token-store/limit-cursor.js +2 -2
  171. package/lib/source-code/token-store/padded-token-cursor.js +7 -7
  172. package/lib/source-code/token-store/skip-cursor.js +2 -2
  173. package/lib/source-code/token-store/utils.js +9 -13
  174. package/package.json +6 -5
@@ -32,8 +32,9 @@ module.exports = {
32
32
  // Helpers
33
33
  //--------------------------------------------------------------------------
34
34
 
35
+ // eslint-disable-next-line jsdoc/require-description
35
36
  /**
36
- * @param {ASTNode} node - any node
37
+ * @param {ASTNode} node any node
37
38
  * @returns {boolean} whether the given node structurally represents a directive
38
39
  */
39
40
  function looksLikeDirective(node) {
@@ -43,7 +44,7 @@ module.exports = {
43
44
 
44
45
  /**
45
46
  * Check to see if its a ES6 import declaration
46
- * @param {ASTNode} node - any node
47
+ * @param {ASTNode} node any node
47
48
  * @returns {boolean} whether the given node represents a import declaration
48
49
  */
49
50
  function looksLikeImport(node) {
@@ -53,8 +54,7 @@ module.exports = {
53
54
 
54
55
  /**
55
56
  * Checks whether a given node is a variable declaration or not.
56
- *
57
- * @param {ASTNode} node - any node
57
+ * @param {ASTNode} node any node
58
58
  * @returns {boolean} `true` if the node is a variable declaration.
59
59
  */
60
60
  function isVariableDeclaration(node) {
@@ -70,8 +70,8 @@ module.exports = {
70
70
 
71
71
  /**
72
72
  * Checks whether this variable is on top of the block body
73
- * @param {ASTNode} node - The node to check
74
- * @param {ASTNode[]} statements - collection of ASTNodes for the parent node block
73
+ * @param {ASTNode} node The node to check
74
+ * @param {ASTNode[]} statements collection of ASTNodes for the parent node block
75
75
  * @returns {boolean} True if var is on top otherwise false
76
76
  */
77
77
  function isVarOnTop(node, statements) {
@@ -99,8 +99,8 @@ module.exports = {
99
99
 
100
100
  /**
101
101
  * Checks whether variable is on top at the global level
102
- * @param {ASTNode} node - The node to check
103
- * @param {ASTNode} parent - Parent of the node
102
+ * @param {ASTNode} node The node to check
103
+ * @param {ASTNode} parent Parent of the node
104
104
  * @returns {void}
105
105
  */
106
106
  function globalVarCheck(node, parent) {
@@ -111,9 +111,9 @@ module.exports = {
111
111
 
112
112
  /**
113
113
  * Checks whether variable is on top at functional block scope level
114
- * @param {ASTNode} node - The node to check
115
- * @param {ASTNode} parent - Parent of the node
116
- * @param {ASTNode} grandParent - Parent of the node's parent
114
+ * @param {ASTNode} node The node to check
115
+ * @param {ASTNode} parent Parent of the node
116
+ * @param {ASTNode} grandParent Parent of the node's parent
117
117
  * @returns {void}
118
118
  */
119
119
  function blockScopeVarCheck(node, parent, grandParent) {
@@ -77,7 +77,7 @@ module.exports = {
77
77
 
78
78
  /**
79
79
  * Checks whether a given config has valid severity or not.
80
- * @param {number|string|Array} ruleConfig - The configuration for an individual rule.
80
+ * @param {number|string|Array} ruleConfig The configuration for an individual rule.
81
81
  * @returns {boolean} `true` if the configuration has valid severity.
82
82
  */
83
83
  isValidSeverity(ruleConfig) {
@@ -91,7 +91,7 @@ module.exports = {
91
91
 
92
92
  /**
93
93
  * Checks whether every rule of a given config has valid severity or not.
94
- * @param {Object} config - The configuration for rules.
94
+ * @param {Object} config The configuration for rules.
95
95
  * @returns {boolean} `true` if the configuration has valid severity.
96
96
  */
97
97
  isEverySeverityValid(config) {
@@ -28,8 +28,8 @@ function environment() {
28
28
 
29
29
  /**
30
30
  * Checks if a path is a child of a directory.
31
- * @param {string} parentPath - The parent path to check.
32
- * @param {string} childPath - The path to check.
31
+ * @param {string} parentPath The parent path to check.
32
+ * @param {string} childPath The path to check.
33
33
  * @returns {boolean} Whether or not the given path is a child of a directory.
34
34
  */
35
35
  function isChildOfDirectory(parentPath, childPath) {
@@ -38,8 +38,8 @@ function environment() {
38
38
 
39
39
  /**
40
40
  * Synchronously executes a shell command and formats the result.
41
- * @param {string} cmd - The command to execute.
42
- * @param {Array} args - The arguments to be executed with the command.
41
+ * @param {string} cmd The command to execute.
42
+ * @param {Array} args The arguments to be executed with the command.
43
43
  * @returns {string} The version returned by the command.
44
44
  */
45
45
  function execCommand(cmd, args) {
@@ -63,7 +63,7 @@ function environment() {
63
63
 
64
64
  /**
65
65
  * Normalizes a version number.
66
- * @param {string} versionStr - The string to normalize.
66
+ * @param {string} versionStr The string to normalize.
67
67
  * @returns {string} The normalized version number.
68
68
  */
69
69
  function normalizeVersionStr(versionStr) {
@@ -72,7 +72,7 @@ function environment() {
72
72
 
73
73
  /**
74
74
  * Gets bin version.
75
- * @param {string} bin - The bin to check.
75
+ * @param {string} bin The bin to check.
76
76
  * @returns {string} The normalized version returned by the command.
77
77
  */
78
78
  function getBinVersion(bin) {
@@ -88,8 +88,8 @@ function environment() {
88
88
 
89
89
  /**
90
90
  * Gets installed npm package version.
91
- * @param {string} pkg - The package to check.
92
- * @param {boolean} global - Whether to check globally or not.
91
+ * @param {string} pkg The package to check.
92
+ * @param {boolean} global Whether to check globally or not.
93
93
  * @returns {string} The normalized version returned by the command.
94
94
  */
95
95
  function getNpmPackageVersion(pkg, { global = false } = {}) {
@@ -65,6 +65,7 @@ class Traverser {
65
65
  this._leave = null;
66
66
  }
67
67
 
68
+ // eslint-disable-next-line jsdoc/require-description
68
69
  /**
69
70
  * @returns {ASTNode} The current node.
70
71
  */
@@ -72,6 +73,7 @@ class Traverser {
72
73
  return this._current;
73
74
  }
74
75
 
76
+ // eslint-disable-next-line jsdoc/require-description
75
77
  /**
76
78
  * @returns {ASTNode[]} The ancestor nodes.
77
79
  */
@@ -86,13 +86,13 @@ class SourceCode extends TokenStore {
86
86
 
87
87
  /**
88
88
  * Represents parsed source code.
89
- * @param {string|Object} textOrConfig - The source code text or config object.
90
- * @param {string} textOrConfig.text - The source code text.
91
- * @param {ASTNode} textOrConfig.ast - The Program node of the AST representing the code. This AST should be created from the text that BOM was stripped.
92
- * @param {Object|null} textOrConfig.parserServices - The parser services.
93
- * @param {ScopeManager|null} textOrConfig.scopeManager - The scope of this source code.
94
- * @param {Object|null} textOrConfig.visitorKeys - The visitor keys to traverse AST.
95
- * @param {ASTNode} [astIfNoConfig] - The Program node of the AST representing the code. This AST should be created from the text that BOM was stripped.
89
+ * @param {string|Object} textOrConfig The source code text or config object.
90
+ * @param {string} textOrConfig.text The source code text.
91
+ * @param {ASTNode} textOrConfig.ast The Program node of the AST representing the code. This AST should be created from the text that BOM was stripped.
92
+ * @param {Object|null} textOrConfig.parserServices The parser services.
93
+ * @param {ScopeManager|null} textOrConfig.scopeManager The scope of this source code.
94
+ * @param {Object|null} textOrConfig.visitorKeys The visitor keys to traverse AST.
95
+ * @param {ASTNode} [astIfNoConfig] The Program node of the AST representing the code. This AST should be created from the text that BOM was stripped.
96
96
  */
97
97
  constructor(textOrConfig, astIfNoConfig) {
98
98
  let text, ast, parserServices, scopeManager, visitorKeys;
@@ -423,7 +423,7 @@ class SourceCode extends TokenStore {
423
423
  isSpaceBetweenTokens(first, second) {
424
424
  const text = this.text.slice(first.range[1], second.range[0]);
425
425
 
426
- return /\s/u.test(text.replace(/\/\*.*?\*\//gu, ""));
426
+ return /\s/u.test(text.replace(/\/\*.*?\*\//gus, ""));
427
427
  }
428
428
 
429
429
  /**
@@ -22,11 +22,11 @@ module.exports = class BackwardTokenCommentCursor extends Cursor {
22
22
 
23
23
  /**
24
24
  * Initializes this cursor.
25
- * @param {Token[]} tokens - The array of tokens.
26
- * @param {Comment[]} comments - The array of comments.
27
- * @param {Object} indexMap - The map from locations to indices in `tokens`.
28
- * @param {number} startLoc - The start location of the iteration range.
29
- * @param {number} endLoc - The end location of the iteration range.
25
+ * @param {Token[]} tokens The array of tokens.
26
+ * @param {Comment[]} comments The array of comments.
27
+ * @param {Object} indexMap The map from locations to indices in `tokens`.
28
+ * @param {number} startLoc The start location of the iteration range.
29
+ * @param {number} endLoc The end location of the iteration range.
30
30
  */
31
31
  constructor(tokens, comments, indexMap, startLoc, endLoc) {
32
32
  super();
@@ -22,11 +22,11 @@ module.exports = class BackwardTokenCursor extends Cursor {
22
22
 
23
23
  /**
24
24
  * Initializes this cursor.
25
- * @param {Token[]} tokens - The array of tokens.
26
- * @param {Comment[]} comments - The array of comments.
27
- * @param {Object} indexMap - The map from locations to indices in `tokens`.
28
- * @param {number} startLoc - The start location of the iteration range.
29
- * @param {number} endLoc - The end location of the iteration range.
25
+ * @param {Token[]} tokens The array of tokens.
26
+ * @param {Comment[]} comments The array of comments.
27
+ * @param {Object} indexMap The map from locations to indices in `tokens`.
28
+ * @param {number} startLoc The start location of the iteration range.
29
+ * @param {number} endLoc The end location of the iteration range.
30
30
  */
31
31
  constructor(tokens, comments, indexMap, startLoc, endLoc) {
32
32
  super();
@@ -28,8 +28,8 @@ class CursorFactory {
28
28
 
29
29
  /**
30
30
  * Initializes this cursor.
31
- * @param {Function} TokenCursor - The class of the cursor which iterates tokens only.
32
- * @param {Function} TokenCommentCursor - The class of the cursor which iterates the mix of tokens and comments.
31
+ * @param {Function} TokenCursor The class of the cursor which iterates tokens only.
32
+ * @param {Function} TokenCommentCursor The class of the cursor which iterates the mix of tokens and comments.
33
33
  */
34
34
  constructor(TokenCursor, TokenCommentCursor) {
35
35
  this.TokenCursor = TokenCursor;
@@ -38,13 +38,12 @@ class CursorFactory {
38
38
 
39
39
  /**
40
40
  * Creates a base cursor instance that can be decorated by createCursor.
41
- *
42
- * @param {Token[]} tokens - The array of tokens.
43
- * @param {Comment[]} comments - The array of comments.
44
- * @param {Object} indexMap - The map from locations to indices in `tokens`.
45
- * @param {number} startLoc - The start location of the iteration range.
46
- * @param {number} endLoc - The end location of the iteration range.
47
- * @param {boolean} includeComments - The flag to iterate comments as well.
41
+ * @param {Token[]} tokens The array of tokens.
42
+ * @param {Comment[]} comments The array of comments.
43
+ * @param {Object} indexMap The map from locations to indices in `tokens`.
44
+ * @param {number} startLoc The start location of the iteration range.
45
+ * @param {number} endLoc The end location of the iteration range.
46
+ * @param {boolean} includeComments The flag to iterate comments as well.
48
47
  * @returns {Cursor} The created base cursor.
49
48
  */
50
49
  createBaseCursor(tokens, comments, indexMap, startLoc, endLoc, includeComments) {
@@ -55,16 +54,15 @@ class CursorFactory {
55
54
 
56
55
  /**
57
56
  * Creates a cursor that iterates tokens with normalized options.
58
- *
59
- * @param {Token[]} tokens - The array of tokens.
60
- * @param {Comment[]} comments - The array of comments.
61
- * @param {Object} indexMap - The map from locations to indices in `tokens`.
62
- * @param {number} startLoc - The start location of the iteration range.
63
- * @param {number} endLoc - The end location of the iteration range.
64
- * @param {boolean} includeComments - The flag to iterate comments as well.
65
- * @param {Function|null} filter - The predicate function to choose tokens.
66
- * @param {number} skip - The count of tokens the cursor skips.
67
- * @param {number} count - The maximum count of tokens the cursor iterates. Zero is no iteration for backward compatibility.
57
+ * @param {Token[]} tokens The array of tokens.
58
+ * @param {Comment[]} comments The array of comments.
59
+ * @param {Object} indexMap The map from locations to indices in `tokens`.
60
+ * @param {number} startLoc The start location of the iteration range.
61
+ * @param {number} endLoc The end location of the iteration range.
62
+ * @param {boolean} includeComments The flag to iterate comments as well.
63
+ * @param {Function|null} filter The predicate function to choose tokens.
64
+ * @param {number} skip The count of tokens the cursor skips.
65
+ * @param {number} count The maximum count of tokens the cursor iterates. Zero is no iteration for backward compatibility.
68
66
  * @returns {Cursor} The created cursor.
69
67
  */
70
68
  createCursor(tokens, comments, indexMap, startLoc, endLoc, includeComments, filter, skip, count) {
@@ -21,7 +21,7 @@ module.exports = class DecorativeCursor extends Cursor {
21
21
 
22
22
  /**
23
23
  * Initializes this cursor.
24
- * @param {Cursor} cursor - The cursor to be decorated.
24
+ * @param {Cursor} cursor The cursor to be decorated.
25
25
  */
26
26
  constructor(cursor) {
27
27
  super();
@@ -21,8 +21,8 @@ module.exports = class FilterCursor extends DecorativeCursor {
21
21
 
22
22
  /**
23
23
  * Initializes this cursor.
24
- * @param {Cursor} cursor - The cursor to be decorated.
25
- * @param {Function} predicate - The predicate function to decide tokens this cursor iterates.
24
+ * @param {Cursor} cursor The cursor to be decorated.
25
+ * @param {Function} predicate The predicate function to decide tokens this cursor iterates.
26
26
  */
27
27
  constructor(cursor, predicate) {
28
28
  super(cursor);
@@ -22,11 +22,11 @@ module.exports = class ForwardTokenCommentCursor extends Cursor {
22
22
 
23
23
  /**
24
24
  * Initializes this cursor.
25
- * @param {Token[]} tokens - The array of tokens.
26
- * @param {Comment[]} comments - The array of comments.
27
- * @param {Object} indexMap - The map from locations to indices in `tokens`.
28
- * @param {number} startLoc - The start location of the iteration range.
29
- * @param {number} endLoc - The end location of the iteration range.
25
+ * @param {Token[]} tokens The array of tokens.
26
+ * @param {Comment[]} comments The array of comments.
27
+ * @param {Object} indexMap The map from locations to indices in `tokens`.
28
+ * @param {number} startLoc The start location of the iteration range.
29
+ * @param {number} endLoc The end location of the iteration range.
30
30
  */
31
31
  constructor(tokens, comments, indexMap, startLoc, endLoc) {
32
32
  super();
@@ -22,11 +22,11 @@ module.exports = class ForwardTokenCursor extends Cursor {
22
22
 
23
23
  /**
24
24
  * Initializes this cursor.
25
- * @param {Token[]} tokens - The array of tokens.
26
- * @param {Comment[]} comments - The array of comments.
27
- * @param {Object} indexMap - The map from locations to indices in `tokens`.
28
- * @param {number} startLoc - The start location of the iteration range.
29
- * @param {number} endLoc - The end location of the iteration range.
25
+ * @param {Token[]} tokens The array of tokens.
26
+ * @param {Comment[]} comments The array of comments.
27
+ * @param {Object} indexMap The map from locations to indices in `tokens`.
28
+ * @param {number} startLoc The start location of the iteration range.
29
+ * @param {number} endLoc The end location of the iteration range.
30
30
  */
31
31
  constructor(tokens, comments, indexMap, startLoc, endLoc) {
32
32
  super();