eslint 4.12.1 → 4.15.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 (269) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/README.md +3 -3
  3. package/lib/cli-engine.js +4 -0
  4. package/lib/linter.js +78 -35
  5. package/lib/options.js +47 -41
  6. package/lib/report-translator.js +34 -13
  7. package/lib/rules/.eslintrc.yml +1 -0
  8. package/lib/rules/accessor-pairs.js +2 -1
  9. package/lib/rules/array-bracket-newline.js +2 -1
  10. package/lib/rules/array-bracket-spacing.js +2 -1
  11. package/lib/rules/array-callback-return.js +18 -3
  12. package/lib/rules/array-element-newline.js +2 -1
  13. package/lib/rules/arrow-body-style.js +15 -2
  14. package/lib/rules/arrow-parens.js +2 -1
  15. package/lib/rules/arrow-spacing.js +2 -1
  16. package/lib/rules/block-scoped-var.js +2 -1
  17. package/lib/rules/block-spacing.js +2 -1
  18. package/lib/rules/brace-style.js +2 -1
  19. package/lib/rules/callback-return.js +2 -1
  20. package/lib/rules/camelcase.js +29 -17
  21. package/lib/rules/capitalized-comments.js +2 -1
  22. package/lib/rules/class-methods-use-this.js +2 -1
  23. package/lib/rules/comma-dangle.js +2 -1
  24. package/lib/rules/comma-spacing.js +2 -1
  25. package/lib/rules/comma-style.js +2 -1
  26. package/lib/rules/complexity.js +3 -16
  27. package/lib/rules/computed-property-spacing.js +2 -1
  28. package/lib/rules/consistent-return.js +2 -1
  29. package/lib/rules/consistent-this.js +2 -1
  30. package/lib/rules/constructor-super.js +2 -1
  31. package/lib/rules/curly.js +2 -1
  32. package/lib/rules/default-case.js +2 -1
  33. package/lib/rules/dot-location.js +2 -1
  34. package/lib/rules/dot-notation.js +2 -1
  35. package/lib/rules/eol-last.js +10 -1
  36. package/lib/rules/eqeqeq.js +2 -1
  37. package/lib/rules/for-direction.js +2 -1
  38. package/lib/rules/func-call-spacing.js +2 -1
  39. package/lib/rules/func-name-matching.js +2 -1
  40. package/lib/rules/func-names.js +2 -1
  41. package/lib/rules/func-style.js +2 -1
  42. package/lib/rules/function-paren-newline.js +2 -1
  43. package/lib/rules/generator-star-spacing.js +2 -1
  44. package/lib/rules/getter-return.js +2 -1
  45. package/lib/rules/global-require.js +2 -1
  46. package/lib/rules/guard-for-in.js +2 -1
  47. package/lib/rules/handle-callback-err.js +2 -1
  48. package/lib/rules/id-blacklist.js +2 -1
  49. package/lib/rules/id-length.js +2 -1
  50. package/lib/rules/id-match.js +2 -1
  51. package/lib/rules/implicit-arrow-linebreak.js +2 -1
  52. package/lib/rules/indent-legacy.js +2 -1
  53. package/lib/rules/indent.js +13 -2
  54. package/lib/rules/init-declarations.js +2 -1
  55. package/lib/rules/jsx-quotes.js +2 -1
  56. package/lib/rules/key-spacing.js +2 -1
  57. package/lib/rules/keyword-spacing.js +2 -1
  58. package/lib/rules/line-comment-position.js +2 -1
  59. package/lib/rules/linebreak-style.js +2 -1
  60. package/lib/rules/lines-around-comment.js +2 -1
  61. package/lib/rules/lines-around-directive.js +2 -1
  62. package/lib/rules/lines-between-class-members.js +53 -4
  63. package/lib/rules/max-depth.js +2 -1
  64. package/lib/rules/max-len.js +2 -1
  65. package/lib/rules/max-lines.js +2 -1
  66. package/lib/rules/max-nested-callbacks.js +2 -1
  67. package/lib/rules/max-params.js +2 -1
  68. package/lib/rules/max-statements-per-line.js +2 -1
  69. package/lib/rules/max-statements.js +2 -1
  70. package/lib/rules/multiline-comment-style.js +2 -1
  71. package/lib/rules/multiline-ternary.js +2 -1
  72. package/lib/rules/new-cap.js +2 -1
  73. package/lib/rules/new-parens.js +2 -1
  74. package/lib/rules/newline-after-var.js +2 -1
  75. package/lib/rules/newline-before-return.js +2 -1
  76. package/lib/rules/newline-per-chained-call.js +2 -1
  77. package/lib/rules/no-alert.js +2 -1
  78. package/lib/rules/no-array-constructor.js +2 -1
  79. package/lib/rules/no-await-in-loop.js +2 -1
  80. package/lib/rules/no-bitwise.js +2 -1
  81. package/lib/rules/no-buffer-constructor.js +2 -1
  82. package/lib/rules/no-caller.js +2 -1
  83. package/lib/rules/no-case-declarations.js +2 -1
  84. package/lib/rules/no-catch-shadow.js +2 -1
  85. package/lib/rules/no-class-assign.js +2 -1
  86. package/lib/rules/no-compare-neg-zero.js +2 -1
  87. package/lib/rules/no-cond-assign.js +2 -1
  88. package/lib/rules/no-confusing-arrow.js +2 -1
  89. package/lib/rules/no-console.js +2 -1
  90. package/lib/rules/no-const-assign.js +2 -1
  91. package/lib/rules/no-constant-condition.js +2 -1
  92. package/lib/rules/no-continue.js +2 -1
  93. package/lib/rules/no-control-regex.js +2 -1
  94. package/lib/rules/no-debugger.js +2 -1
  95. package/lib/rules/no-delete-var.js +2 -1
  96. package/lib/rules/no-div-regex.js +2 -1
  97. package/lib/rules/no-dupe-args.js +2 -1
  98. package/lib/rules/no-dupe-class-members.js +2 -1
  99. package/lib/rules/no-dupe-keys.js +2 -1
  100. package/lib/rules/no-duplicate-case.js +2 -1
  101. package/lib/rules/no-duplicate-imports.js +2 -1
  102. package/lib/rules/no-else-return.js +2 -1
  103. package/lib/rules/no-empty-character-class.js +2 -1
  104. package/lib/rules/no-empty-function.js +2 -1
  105. package/lib/rules/no-empty-pattern.js +2 -1
  106. package/lib/rules/no-empty.js +2 -1
  107. package/lib/rules/no-eq-null.js +2 -1
  108. package/lib/rules/no-eval.js +2 -1
  109. package/lib/rules/no-ex-assign.js +2 -1
  110. package/lib/rules/no-extend-native.js +2 -1
  111. package/lib/rules/no-extra-bind.js +2 -1
  112. package/lib/rules/no-extra-boolean-cast.js +2 -1
  113. package/lib/rules/no-extra-label.js +2 -1
  114. package/lib/rules/no-extra-parens.js +3 -2
  115. package/lib/rules/no-extra-semi.js +2 -1
  116. package/lib/rules/no-fallthrough.js +2 -1
  117. package/lib/rules/no-floating-decimal.js +2 -1
  118. package/lib/rules/no-func-assign.js +2 -1
  119. package/lib/rules/no-global-assign.js +2 -1
  120. package/lib/rules/no-implicit-coercion.js +2 -1
  121. package/lib/rules/no-implicit-globals.js +2 -1
  122. package/lib/rules/no-implied-eval.js +2 -1
  123. package/lib/rules/no-inline-comments.js +2 -1
  124. package/lib/rules/no-inner-declarations.js +2 -1
  125. package/lib/rules/no-invalid-regexp.js +2 -1
  126. package/lib/rules/no-invalid-this.js +2 -1
  127. package/lib/rules/no-irregular-whitespace.js +2 -1
  128. package/lib/rules/no-iterator.js +2 -1
  129. package/lib/rules/no-label-var.js +2 -1
  130. package/lib/rules/no-labels.js +2 -1
  131. package/lib/rules/no-lone-blocks.js +2 -1
  132. package/lib/rules/no-lonely-if.js +2 -1
  133. package/lib/rules/no-loop-func.js +2 -1
  134. package/lib/rules/no-magic-numbers.js +2 -1
  135. package/lib/rules/no-mixed-operators.js +2 -1
  136. package/lib/rules/no-mixed-requires.js +2 -1
  137. package/lib/rules/no-mixed-spaces-and-tabs.js +2 -1
  138. package/lib/rules/no-multi-assign.js +2 -1
  139. package/lib/rules/no-multi-spaces.js +2 -1
  140. package/lib/rules/no-multi-str.js +2 -1
  141. package/lib/rules/no-multiple-empty-lines.js +2 -1
  142. package/lib/rules/no-native-reassign.js +2 -1
  143. package/lib/rules/no-negated-condition.js +2 -1
  144. package/lib/rules/no-negated-in-lhs.js +2 -1
  145. package/lib/rules/no-nested-ternary.js +2 -1
  146. package/lib/rules/no-new-func.js +2 -1
  147. package/lib/rules/no-new-object.js +2 -1
  148. package/lib/rules/no-new-require.js +2 -1
  149. package/lib/rules/no-new-symbol.js +2 -1
  150. package/lib/rules/no-new-wrappers.js +2 -1
  151. package/lib/rules/no-new.js +2 -1
  152. package/lib/rules/no-obj-calls.js +2 -1
  153. package/lib/rules/no-octal-escape.js +2 -1
  154. package/lib/rules/no-octal.js +2 -1
  155. package/lib/rules/no-param-reassign.js +2 -1
  156. package/lib/rules/no-path-concat.js +2 -1
  157. package/lib/rules/no-plusplus.js +2 -1
  158. package/lib/rules/no-process-env.js +2 -1
  159. package/lib/rules/no-process-exit.js +2 -1
  160. package/lib/rules/no-proto.js +2 -1
  161. package/lib/rules/no-prototype-builtins.js +2 -1
  162. package/lib/rules/no-redeclare.js +2 -1
  163. package/lib/rules/no-regex-spaces.js +2 -1
  164. package/lib/rules/no-restricted-globals.js +2 -1
  165. package/lib/rules/no-restricted-imports.js +2 -1
  166. package/lib/rules/no-restricted-modules.js +2 -1
  167. package/lib/rules/no-restricted-properties.js +2 -1
  168. package/lib/rules/no-restricted-syntax.js +2 -1
  169. package/lib/rules/no-return-assign.js +2 -1
  170. package/lib/rules/no-return-await.js +5 -1
  171. package/lib/rules/no-script-url.js +2 -1
  172. package/lib/rules/no-self-assign.js +2 -1
  173. package/lib/rules/no-self-compare.js +2 -1
  174. package/lib/rules/no-sequences.js +2 -1
  175. package/lib/rules/no-shadow-restricted-names.js +2 -1
  176. package/lib/rules/no-shadow.js +2 -1
  177. package/lib/rules/no-spaced-func.js +2 -1
  178. package/lib/rules/no-sparse-arrays.js +2 -1
  179. package/lib/rules/no-sync.js +2 -1
  180. package/lib/rules/no-tabs.js +2 -1
  181. package/lib/rules/no-template-curly-in-string.js +2 -1
  182. package/lib/rules/no-ternary.js +2 -1
  183. package/lib/rules/no-this-before-super.js +2 -1
  184. package/lib/rules/no-throw-literal.js +2 -1
  185. package/lib/rules/no-trailing-spaces.js +2 -1
  186. package/lib/rules/no-undef-init.js +2 -1
  187. package/lib/rules/no-undef.js +2 -1
  188. package/lib/rules/no-undefined.js +2 -1
  189. package/lib/rules/no-underscore-dangle.js +2 -1
  190. package/lib/rules/no-unexpected-multiline.js +2 -1
  191. package/lib/rules/no-unmodified-loop-condition.js +81 -79
  192. package/lib/rules/no-unneeded-ternary.js +2 -1
  193. package/lib/rules/no-unreachable.js +2 -1
  194. package/lib/rules/no-unsafe-finally.js +2 -1
  195. package/lib/rules/no-unsafe-negation.js +2 -1
  196. package/lib/rules/no-unused-expressions.js +2 -1
  197. package/lib/rules/no-unused-labels.js +2 -1
  198. package/lib/rules/no-unused-vars.js +10 -14
  199. package/lib/rules/no-use-before-define.js +2 -1
  200. package/lib/rules/no-useless-call.js +2 -1
  201. package/lib/rules/no-useless-computed-key.js +2 -1
  202. package/lib/rules/no-useless-concat.js +2 -1
  203. package/lib/rules/no-useless-constructor.js +2 -1
  204. package/lib/rules/no-useless-escape.js +2 -1
  205. package/lib/rules/no-useless-rename.js +2 -1
  206. package/lib/rules/no-useless-return.js +2 -1
  207. package/lib/rules/no-var.js +2 -1
  208. package/lib/rules/no-void.js +2 -1
  209. package/lib/rules/no-warning-comments.js +2 -1
  210. package/lib/rules/no-whitespace-before-property.js +2 -1
  211. package/lib/rules/no-with.js +2 -1
  212. package/lib/rules/nonblock-statement-body-position.js +2 -1
  213. package/lib/rules/object-curly-newline.js +2 -1
  214. package/lib/rules/object-curly-spacing.js +2 -1
  215. package/lib/rules/object-property-newline.js +2 -1
  216. package/lib/rules/object-shorthand.js +2 -1
  217. package/lib/rules/one-var-declaration-per-line.js +2 -1
  218. package/lib/rules/one-var.js +42 -8
  219. package/lib/rules/operator-assignment.js +2 -1
  220. package/lib/rules/operator-linebreak.js +2 -1
  221. package/lib/rules/padded-blocks.js +2 -1
  222. package/lib/rules/padding-line-between-statements.js +2 -1
  223. package/lib/rules/prefer-arrow-callback.js +2 -1
  224. package/lib/rules/prefer-const.js +2 -1
  225. package/lib/rules/prefer-destructuring.js +2 -1
  226. package/lib/rules/prefer-numeric-literals.js +2 -1
  227. package/lib/rules/prefer-promise-reject-errors.js +2 -1
  228. package/lib/rules/prefer-reflect.js +2 -1
  229. package/lib/rules/prefer-rest-params.js +2 -1
  230. package/lib/rules/prefer-spread.js +2 -1
  231. package/lib/rules/prefer-template.js +2 -1
  232. package/lib/rules/quote-props.js +2 -1
  233. package/lib/rules/quotes.js +2 -1
  234. package/lib/rules/radix.js +2 -1
  235. package/lib/rules/require-await.js +2 -1
  236. package/lib/rules/require-jsdoc.js +2 -1
  237. package/lib/rules/require-yield.js +2 -1
  238. package/lib/rules/rest-spread-spacing.js +2 -1
  239. package/lib/rules/semi-spacing.js +2 -1
  240. package/lib/rules/semi-style.js +2 -1
  241. package/lib/rules/semi.js +2 -1
  242. package/lib/rules/sort-imports.js +2 -1
  243. package/lib/rules/sort-keys.js +2 -1
  244. package/lib/rules/sort-vars.js +2 -1
  245. package/lib/rules/space-before-blocks.js +2 -1
  246. package/lib/rules/space-before-function-paren.js +2 -1
  247. package/lib/rules/space-in-parens.js +2 -1
  248. package/lib/rules/space-infix-ops.js +2 -1
  249. package/lib/rules/space-unary-ops.js +2 -1
  250. package/lib/rules/spaced-comment.js +2 -1
  251. package/lib/rules/strict.js +2 -1
  252. package/lib/rules/switch-colon-spacing.js +2 -1
  253. package/lib/rules/symbol-description.js +2 -1
  254. package/lib/rules/template-curly-spacing.js +2 -1
  255. package/lib/rules/template-tag-spacing.js +2 -1
  256. package/lib/rules/unicode-bom.js +2 -1
  257. package/lib/rules/use-isnan.js +2 -1
  258. package/lib/rules/valid-jsdoc.js +2 -1
  259. package/lib/rules/valid-typeof.js +2 -1
  260. package/lib/rules/vars-on-top.js +2 -1
  261. package/lib/rules/wrap-iife.js +2 -1
  262. package/lib/rules/wrap-regex.js +2 -1
  263. package/lib/rules/yield-star-spacing.js +2 -1
  264. package/lib/rules/yoda.js +2 -1
  265. package/lib/testers/rule-tester.js +63 -30
  266. package/lib/util/interpolate.js +24 -0
  267. package/lib/util/source-code.js +41 -6
  268. package/lib/util/traverser.js +163 -15
  269. package/package.json +3 -3
@@ -20,7 +20,8 @@ module.exports = {
20
20
  docs: {
21
21
  description: "enforce consistent linebreak style",
22
22
  category: "Stylistic Issues",
23
- recommended: false
23
+ recommended: false,
24
+ url: "https://eslint.org/docs/rules/linebreak-style"
24
25
  },
25
26
 
26
27
  fixable: "whitespace",
@@ -55,7 +55,8 @@ module.exports = {
55
55
  docs: {
56
56
  description: "require empty lines around comments",
57
57
  category: "Stylistic Issues",
58
- recommended: false
58
+ recommended: false,
59
+ url: "https://eslint.org/docs/rules/lines-around-comment"
59
60
  },
60
61
 
61
62
  fixable: "whitespace",
@@ -18,7 +18,8 @@ module.exports = {
18
18
  description: "require or disallow newlines around directives",
19
19
  category: "Stylistic Issues",
20
20
  recommended: false,
21
- replacedBy: ["padding-line-between-statements"]
21
+ replacedBy: ["padding-line-between-statements"],
22
+ url: "https://eslint.org/docs/rules/lines-around-directive"
22
23
  },
23
24
  schema: [{
24
25
  oneOf: [
@@ -15,7 +15,8 @@ module.exports = {
15
15
  docs: {
16
16
  description: "require or disallow an empty line between class members",
17
17
  category: "Stylistic Issues",
18
- recommended: false
18
+ recommended: false,
19
+ url: "https://eslint.org/docs/rules/lines-between-class-members"
19
20
  },
20
21
 
21
22
  fixable: "whitespace",
@@ -55,7 +56,56 @@ module.exports = {
55
56
  * @returns {boolean} True if there is at least a line between the tokens
56
57
  */
57
58
  function isPaddingBetweenTokens(first, second) {
58
- return second.loc.start.line - first.loc.end.line >= 2;
59
+ const comments = sourceCode.getCommentsBefore(second);
60
+ const len = comments.length;
61
+
62
+ // If there is no comments
63
+ if (len === 0) {
64
+ const linesBetweenFstAndSnd = second.loc.start.line - first.loc.end.line - 1;
65
+
66
+ return linesBetweenFstAndSnd >= 1;
67
+ }
68
+
69
+
70
+ // If there are comments
71
+ let sumOfCommentLines = 0; // the numbers of lines of comments
72
+ let prevCommentLineNum = -1; // line number of the end of the previous comment
73
+
74
+ for (let i = 0; i < len; i++) {
75
+ const commentLinesOfThisComment = comments[i].loc.end.line - comments[i].loc.start.line + 1;
76
+
77
+ sumOfCommentLines += commentLinesOfThisComment;
78
+
79
+ /*
80
+ * If this comment and the previous comment are in the same line,
81
+ * the count of comment lines is duplicated. So decrement sumOfCommentLines.
82
+ */
83
+ if (prevCommentLineNum === comments[i].loc.start.line) {
84
+ sumOfCommentLines -= 1;
85
+ }
86
+
87
+ prevCommentLineNum = comments[i].loc.end.line;
88
+ }
89
+
90
+ /*
91
+ * If the first block and the first comment are in the same line,
92
+ * the count of comment lines is duplicated. So decrement sumOfCommentLines.
93
+ */
94
+ if (first.loc.end.line === comments[0].loc.start.line) {
95
+ sumOfCommentLines -= 1;
96
+ }
97
+
98
+ /*
99
+ * If the last comment and the second block are in the same line,
100
+ * the count of comment lines is duplicated. So decrement sumOfCommentLines.
101
+ */
102
+ if (comments[len - 1].loc.end.line === second.loc.start.line) {
103
+ sumOfCommentLines -= 1;
104
+ }
105
+
106
+ const linesBetweenFstAndSnd = second.loc.start.line - first.loc.end.line - 1;
107
+
108
+ return linesBetweenFstAndSnd - sumOfCommentLines >= 1;
59
109
  }
60
110
 
61
111
  return {
@@ -65,8 +115,7 @@ module.exports = {
65
115
  for (let i = 0; i < body.length - 1; i++) {
66
116
  const curFirst = sourceCode.getFirstToken(body[i]);
67
117
  const curLast = sourceCode.getLastToken(body[i]);
68
- const comments = sourceCode.getCommentsBefore(body[i + 1]);
69
- const nextFirst = comments.length ? comments[0] : sourceCode.getFirstToken(body[i + 1]);
118
+ const nextFirst = sourceCode.getFirstToken(body[i + 1]);
70
119
  const isPadded = isPaddingBetweenTokens(curLast, nextFirst);
71
120
  const isMulti = !astUtils.isTokenOnSameLine(curFirst, curLast);
72
121
  const skip = !isMulti && options[1].exceptAfterSingleLine;
@@ -14,7 +14,8 @@ module.exports = {
14
14
  docs: {
15
15
  description: "enforce a maximum depth that blocks can be nested",
16
16
  category: "Stylistic Issues",
17
- recommended: false
17
+ recommended: false,
18
+ url: "https://eslint.org/docs/rules/max-depth"
18
19
  },
19
20
 
20
21
  schema: [
@@ -68,7 +68,8 @@ module.exports = {
68
68
  docs: {
69
69
  description: "enforce a maximum line length",
70
70
  category: "Stylistic Issues",
71
- recommended: false
71
+ recommended: false,
72
+ url: "https://eslint.org/docs/rules/max-len"
72
73
  },
73
74
 
74
75
  schema: [
@@ -20,7 +20,8 @@ module.exports = {
20
20
  docs: {
21
21
  description: "enforce a maximum number of lines per file",
22
22
  category: "Stylistic Issues",
23
- recommended: false
23
+ recommended: false,
24
+ url: "https://eslint.org/docs/rules/max-lines"
24
25
  },
25
26
 
26
27
  schema: [
@@ -14,7 +14,8 @@ module.exports = {
14
14
  docs: {
15
15
  description: "enforce a maximum depth that callbacks can be nested",
16
16
  category: "Stylistic Issues",
17
- recommended: false
17
+ recommended: false,
18
+ url: "https://eslint.org/docs/rules/max-nested-callbacks"
18
19
  },
19
20
 
20
21
  schema: [
@@ -22,7 +22,8 @@ module.exports = {
22
22
  docs: {
23
23
  description: "enforce a maximum number of parameters in function definitions",
24
24
  category: "Stylistic Issues",
25
- recommended: false
25
+ recommended: false,
26
+ url: "https://eslint.org/docs/rules/max-params"
26
27
  },
27
28
 
28
29
  schema: [
@@ -19,7 +19,8 @@ module.exports = {
19
19
  docs: {
20
20
  description: "enforce a maximum number of statements allowed per line",
21
21
  category: "Stylistic Issues",
22
- recommended: false
22
+ recommended: false,
23
+ url: "https://eslint.org/docs/rules/max-statements-per-line"
23
24
  },
24
25
 
25
26
  schema: [
@@ -22,7 +22,8 @@ module.exports = {
22
22
  docs: {
23
23
  description: "enforce a maximum number of statements allowed in function blocks",
24
24
  category: "Stylistic Issues",
25
- recommended: false
25
+ recommended: false,
26
+ url: "https://eslint.org/docs/rules/max-statements"
26
27
  },
27
28
 
28
29
  schema: [
@@ -15,7 +15,8 @@ module.exports = {
15
15
  docs: {
16
16
  description: "enforce a particular style for multiline comments",
17
17
  category: "Stylistic Issues",
18
- recommended: false
18
+ recommended: false,
19
+ url: "https://eslint.org/docs/rules/multiline-comment-style"
19
20
  },
20
21
  fixable: "whitespace",
21
22
  schema: [{ enum: ["starred-block", "separate-lines", "bare-block"] }]
@@ -16,7 +16,8 @@ module.exports = {
16
16
  docs: {
17
17
  description: "enforce newlines between operands of ternary expressions",
18
18
  category: "Stylistic Issues",
19
- recommended: false
19
+ recommended: false,
20
+ url: "https://eslint.org/docs/rules/multiline-ternary"
20
21
  },
21
22
  schema: [
22
23
  {
@@ -77,7 +77,8 @@ module.exports = {
77
77
  docs: {
78
78
  description: "require constructor names to begin with a capital letter",
79
79
  category: "Stylistic Issues",
80
- recommended: false
80
+ recommended: false,
81
+ url: "https://eslint.org/docs/rules/new-cap"
81
82
  },
82
83
 
83
84
  schema: [
@@ -24,7 +24,8 @@ module.exports = {
24
24
  docs: {
25
25
  description: "require parentheses when invoking a constructor with no arguments",
26
26
  category: "Stylistic Issues",
27
- recommended: false
27
+ recommended: false,
28
+ url: "https://eslint.org/docs/rules/new-parens"
28
29
  },
29
30
 
30
31
  schema: [],
@@ -22,7 +22,8 @@ module.exports = {
22
22
  description: "require or disallow an empty line after variable declarations",
23
23
  category: "Stylistic Issues",
24
24
  recommended: false,
25
- replacedBy: ["padding-line-between-statements"]
25
+ replacedBy: ["padding-line-between-statements"],
26
+ url: "https://eslint.org/docs/rules/newline-after-var"
26
27
  },
27
28
 
28
29
  schema: [
@@ -15,7 +15,8 @@ module.exports = {
15
15
  description: "require an empty line before `return` statements",
16
16
  category: "Stylistic Issues",
17
17
  recommended: false,
18
- replacedBy: ["padding-line-between-statements"]
18
+ replacedBy: ["padding-line-between-statements"],
19
+ url: "https://eslint.org/docs/rules/newline-before-return"
19
20
  },
20
21
  fixable: "whitespace",
21
22
  schema: [],
@@ -17,7 +17,8 @@ module.exports = {
17
17
  docs: {
18
18
  description: "require a newline after each call in a method chain",
19
19
  category: "Stylistic Issues",
20
- recommended: false
20
+ recommended: false,
21
+ url: "https://eslint.org/docs/rules/newline-per-chained-call"
21
22
  },
22
23
  fixable: "whitespace",
23
24
  schema: [{
@@ -88,7 +88,8 @@ module.exports = {
88
88
  docs: {
89
89
  description: "disallow the use of `alert`, `confirm`, and `prompt`",
90
90
  category: "Best Practices",
91
- recommended: false
91
+ recommended: false,
92
+ url: "https://eslint.org/docs/rules/no-alert"
92
93
  },
93
94
 
94
95
  schema: []
@@ -14,7 +14,8 @@ module.exports = {
14
14
  docs: {
15
15
  description: "disallow `Array` constructors",
16
16
  category: "Stylistic Issues",
17
- recommended: false
17
+ recommended: false,
18
+ url: "https://eslint.org/docs/rules/no-array-constructor"
18
19
  },
19
20
 
20
21
  schema: []
@@ -28,7 +28,8 @@ module.exports = {
28
28
  docs: {
29
29
  description: "disallow `await` inside of loops",
30
30
  category: "Possible Errors",
31
- recommended: false
31
+ recommended: false,
32
+ url: "https://eslint.org/docs/rules/no-await-in-loop"
32
33
  },
33
34
  schema: []
34
35
  },
@@ -25,7 +25,8 @@ module.exports = {
25
25
  docs: {
26
26
  description: "disallow bitwise operators",
27
27
  category: "Stylistic Issues",
28
- recommended: false
28
+ recommended: false,
29
+ url: "https://eslint.org/docs/rules/no-bitwise"
29
30
  },
30
31
 
31
32
  schema: [
@@ -13,7 +13,8 @@ module.exports = {
13
13
  docs: {
14
14
  description: "disallow use of the Buffer() constructor",
15
15
  category: "Node.js and CommonJS",
16
- recommended: false
16
+ recommended: false,
17
+ url: "https://eslint.org/docs/rules/no-buffer-constructor"
17
18
  },
18
19
  schema: []
19
20
  },
@@ -14,7 +14,8 @@ module.exports = {
14
14
  docs: {
15
15
  description: "disallow the use of `arguments.caller` or `arguments.callee`",
16
16
  category: "Best Practices",
17
- recommended: false
17
+ recommended: false,
18
+ url: "https://eslint.org/docs/rules/no-caller"
18
19
  },
19
20
 
20
21
  schema: []
@@ -13,7 +13,8 @@ module.exports = {
13
13
  docs: {
14
14
  description: "disallow lexical declarations in case clauses",
15
15
  category: "Best Practices",
16
- recommended: true
16
+ recommended: true,
17
+ url: "https://eslint.org/docs/rules/no-case-declarations"
17
18
  },
18
19
 
19
20
  schema: []
@@ -20,7 +20,8 @@ module.exports = {
20
20
  docs: {
21
21
  description: "disallow `catch` clause parameters from shadowing variables in the outer scope",
22
22
  category: "Variables",
23
- recommended: false
23
+ recommended: false,
24
+ url: "https://eslint.org/docs/rules/no-catch-shadow"
24
25
  },
25
26
 
26
27
  schema: []
@@ -16,7 +16,8 @@ module.exports = {
16
16
  docs: {
17
17
  description: "disallow reassigning class members",
18
18
  category: "ECMAScript 6",
19
- recommended: true
19
+ recommended: true,
20
+ url: "https://eslint.org/docs/rules/no-class-assign"
20
21
  },
21
22
 
22
23
  schema: []
@@ -13,7 +13,8 @@ module.exports = {
13
13
  docs: {
14
14
  description: "disallow comparing against -0",
15
15
  category: "Possible Errors",
16
- recommended: true
16
+ recommended: true,
17
+ url: "https://eslint.org/docs/rules/no-compare-neg-zero"
17
18
  },
18
19
  fixable: null,
19
20
  schema: []
@@ -22,7 +22,8 @@ module.exports = {
22
22
  docs: {
23
23
  description: "disallow assignment operators in conditional expressions",
24
24
  category: "Possible Errors",
25
- recommended: true
25
+ recommended: true,
26
+ url: "https://eslint.org/docs/rules/no-cond-assign"
26
27
  },
27
28
 
28
29
  schema: [
@@ -30,7 +30,8 @@ module.exports = {
30
30
  docs: {
31
31
  description: "disallow arrow functions where they could be confused with comparisons",
32
32
  category: "ECMAScript 6",
33
- recommended: false
33
+ recommended: false,
34
+ url: "https://eslint.org/docs/rules/no-confusing-arrow"
34
35
  },
35
36
 
36
37
  fixable: "code",
@@ -20,7 +20,8 @@ module.exports = {
20
20
  docs: {
21
21
  description: "disallow the use of `console`",
22
22
  category: "Possible Errors",
23
- recommended: true
23
+ recommended: true,
24
+ url: "https://eslint.org/docs/rules/no-console"
24
25
  },
25
26
 
26
27
  schema: [
@@ -16,7 +16,8 @@ module.exports = {
16
16
  docs: {
17
17
  description: "disallow reassigning `const` variables",
18
18
  category: "ECMAScript 6",
19
- recommended: true
19
+ recommended: true,
20
+ url: "https://eslint.org/docs/rules/no-const-assign"
20
21
  },
21
22
 
22
23
  schema: []
@@ -14,7 +14,8 @@ module.exports = {
14
14
  docs: {
15
15
  description: "disallow constant expressions in conditions",
16
16
  category: "Possible Errors",
17
- recommended: true
17
+ recommended: true,
18
+ url: "https://eslint.org/docs/rules/no-constant-condition"
18
19
  },
19
20
 
20
21
  schema: [
@@ -14,7 +14,8 @@ module.exports = {
14
14
  docs: {
15
15
  description: "disallow `continue` statements",
16
16
  category: "Stylistic Issues",
17
- recommended: false
17
+ recommended: false,
18
+ url: "https://eslint.org/docs/rules/no-continue"
18
19
  },
19
20
 
20
21
  schema: []
@@ -14,7 +14,8 @@ module.exports = {
14
14
  docs: {
15
15
  description: "disallow control characters in regular expressions",
16
16
  category: "Possible Errors",
17
- recommended: true
17
+ recommended: true,
18
+ url: "https://eslint.org/docs/rules/no-control-regex"
18
19
  },
19
20
 
20
21
  schema: []
@@ -16,7 +16,8 @@ module.exports = {
16
16
  docs: {
17
17
  description: "disallow the use of `debugger`",
18
18
  category: "Possible Errors",
19
- recommended: true
19
+ recommended: true,
20
+ url: "https://eslint.org/docs/rules/no-debugger"
20
21
  },
21
22
  fixable: "code",
22
23
  schema: []
@@ -14,7 +14,8 @@ module.exports = {
14
14
  docs: {
15
15
  description: "disallow deleting variables",
16
16
  category: "Variables",
17
- recommended: true
17
+ recommended: true,
18
+ url: "https://eslint.org/docs/rules/no-delete-var"
18
19
  },
19
20
 
20
21
  schema: []
@@ -14,7 +14,8 @@ module.exports = {
14
14
  docs: {
15
15
  description: "disallow division operators explicitly at the beginning of regular expressions",
16
16
  category: "Best Practices",
17
- recommended: false
17
+ recommended: false,
18
+ url: "https://eslint.org/docs/rules/no-div-regex"
18
19
  },
19
20
 
20
21
  schema: []
@@ -14,7 +14,8 @@ module.exports = {
14
14
  docs: {
15
15
  description: "disallow duplicate arguments in `function` definitions",
16
16
  category: "Possible Errors",
17
- recommended: true
17
+ recommended: true,
18
+ url: "https://eslint.org/docs/rules/no-dupe-args"
18
19
  },
19
20
 
20
21
  schema: []
@@ -14,7 +14,8 @@ module.exports = {
14
14
  docs: {
15
15
  description: "disallow duplicate class members",
16
16
  category: "ECMAScript 6",
17
- recommended: true
17
+ recommended: true,
18
+ url: "https://eslint.org/docs/rules/no-dupe-class-members"
18
19
  },
19
20
 
20
21
  schema: []
@@ -87,7 +87,8 @@ module.exports = {
87
87
  docs: {
88
88
  description: "disallow duplicate keys in object literals",
89
89
  category: "Possible Errors",
90
- recommended: true
90
+ recommended: true,
91
+ url: "https://eslint.org/docs/rules/no-dupe-keys"
91
92
  },
92
93
 
93
94
  schema: []
@@ -15,7 +15,8 @@ module.exports = {
15
15
  docs: {
16
16
  description: "disallow duplicate case labels",
17
17
  category: "Possible Errors",
18
- recommended: true
18
+ recommended: true,
19
+ url: "https://eslint.org/docs/rules/no-duplicate-case"
19
20
  },
20
21
 
21
22
  schema: []
@@ -104,7 +104,8 @@ module.exports = {
104
104
  docs: {
105
105
  description: "disallow duplicate module imports",
106
106
  category: "ECMAScript 6",
107
- recommended: false
107
+ recommended: false,
108
+ url: "https://eslint.org/docs/rules/no-duplicate-imports"
108
109
  },
109
110
 
110
111
  schema: [{
@@ -21,7 +21,8 @@ module.exports = {
21
21
  docs: {
22
22
  description: "disallow `else` blocks after `return` statements in `if` statements",
23
23
  category: "Best Practices",
24
- recommended: false
24
+ recommended: false,
25
+ url: "https://eslint.org/docs/rules/no-else-return"
25
26
  },
26
27
 
27
28
  schema: [{
@@ -32,7 +32,8 @@ module.exports = {
32
32
  docs: {
33
33
  description: "disallow empty character classes in regular expressions",
34
34
  category: "Possible Errors",
35
- recommended: true
35
+ recommended: true,
36
+ url: "https://eslint.org/docs/rules/no-empty-character-class"
36
37
  },
37
38
 
38
39
  schema: []
@@ -93,7 +93,8 @@ module.exports = {
93
93
  docs: {
94
94
  description: "disallow empty functions",
95
95
  category: "Best Practices",
96
- recommended: false
96
+ recommended: false,
97
+ url: "https://eslint.org/docs/rules/no-empty-function"
97
98
  },
98
99
 
99
100
  schema: [
@@ -13,7 +13,8 @@ module.exports = {
13
13
  docs: {
14
14
  description: "disallow empty destructuring patterns",
15
15
  category: "Best Practices",
16
- recommended: true
16
+ recommended: true,
17
+ url: "https://eslint.org/docs/rules/no-empty-pattern"
17
18
  },
18
19
 
19
20
  schema: []
@@ -19,7 +19,8 @@ module.exports = {
19
19
  docs: {
20
20
  description: "disallow empty block statements",
21
21
  category: "Possible Errors",
22
- recommended: true
22
+ recommended: true,
23
+ url: "https://eslint.org/docs/rules/no-empty"
23
24
  },
24
25
 
25
26
  schema: [
@@ -15,7 +15,8 @@ module.exports = {
15
15
  docs: {
16
16
  description: "disallow `null` comparisons without type-checking operators",
17
17
  category: "Best Practices",
18
- recommended: false
18
+ recommended: false,
19
+ url: "https://eslint.org/docs/rules/no-eq-null"
19
20
  },
20
21
 
21
22
  schema: []
@@ -79,7 +79,8 @@ module.exports = {
79
79
  docs: {
80
80
  description: "disallow the use of `eval()`",
81
81
  category: "Best Practices",
82
- recommended: false
82
+ recommended: false,
83
+ url: "https://eslint.org/docs/rules/no-eval"
83
84
  },
84
85
 
85
86
  schema: [
@@ -16,7 +16,8 @@ module.exports = {
16
16
  docs: {
17
17
  description: "disallow reassigning exceptions in `catch` clauses",
18
18
  category: "Possible Errors",
19
- recommended: true
19
+ recommended: true,
20
+ url: "https://eslint.org/docs/rules/no-ex-assign"
20
21
  },
21
22
 
22
23
  schema: []