eslint 5.7.0 → 5.11.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 (284) hide show
  1. package/CHANGELOG.md +76 -0
  2. package/README.md +2 -2
  3. package/conf/eslint-recommended.js +1 -0
  4. package/lib/cli-engine.js +129 -32
  5. package/lib/cli.js +6 -1
  6. package/lib/config/autoconfig.js +0 -1
  7. package/lib/config/config-rule.js +4 -4
  8. package/lib/config/config-validator.js +2 -2
  9. package/lib/config.js +15 -2
  10. package/lib/linter.js +17 -120
  11. package/lib/options.js +5 -0
  12. package/lib/rules/accessor-pairs.js +4 -0
  13. package/lib/rules/array-bracket-newline.js +5 -0
  14. package/lib/rules/array-bracket-spacing.js +5 -0
  15. package/lib/rules/array-callback-return.js +2 -0
  16. package/lib/rules/array-element-newline.js +4 -1
  17. package/lib/rules/arrow-body-style.js +2 -0
  18. package/lib/rules/arrow-parens.js +2 -0
  19. package/lib/rules/arrow-spacing.js +2 -0
  20. package/lib/rules/block-scoped-var.js +2 -0
  21. package/lib/rules/block-spacing.js +2 -0
  22. package/lib/rules/brace-style.js +2 -0
  23. package/lib/rules/callback-return.js +2 -0
  24. package/lib/rules/camelcase.js +26 -14
  25. package/lib/rules/capitalized-comments.js +4 -0
  26. package/lib/rules/class-methods-use-this.js +3 -0
  27. package/lib/rules/comma-dangle.js +4 -0
  28. package/lib/rules/comma-spacing.js +2 -0
  29. package/lib/rules/comma-style.js +12 -2
  30. package/lib/rules/complexity.js +2 -0
  31. package/lib/rules/computed-property-spacing.js +2 -0
  32. package/lib/rules/consistent-return.js +2 -0
  33. package/lib/rules/consistent-this.js +2 -0
  34. package/lib/rules/constructor-super.js +2 -0
  35. package/lib/rules/curly.js +2 -0
  36. package/lib/rules/default-case.js +2 -0
  37. package/lib/rules/dot-location.js +2 -0
  38. package/lib/rules/dot-notation.js +2 -0
  39. package/lib/rules/eol-last.js +5 -0
  40. package/lib/rules/eqeqeq.js +2 -1
  41. package/lib/rules/for-direction.js +4 -0
  42. package/lib/rules/func-call-spacing.js +4 -0
  43. package/lib/rules/func-name-matching.js +3 -0
  44. package/lib/rules/func-names.js +3 -0
  45. package/lib/rules/func-style.js +3 -0
  46. package/lib/rules/function-paren-newline.js +5 -0
  47. package/lib/rules/generator-star-spacing.js +3 -0
  48. package/lib/rules/getter-return.js +5 -0
  49. package/lib/rules/global-require.js +2 -0
  50. package/lib/rules/guard-for-in.js +2 -0
  51. package/lib/rules/handle-callback-err.js +3 -1
  52. package/lib/rules/id-blacklist.js +2 -0
  53. package/lib/rules/id-length.js +2 -0
  54. package/lib/rules/id-match.js +101 -27
  55. package/lib/rules/implicit-arrow-linebreak.js +147 -2
  56. package/lib/rules/indent-legacy.js +4 -4
  57. package/lib/rules/indent.js +31 -23
  58. package/lib/rules/init-declarations.js +2 -0
  59. package/lib/rules/jsx-quotes.js +2 -0
  60. package/lib/rules/key-spacing.js +4 -3
  61. package/lib/rules/keyword-spacing.js +7 -1
  62. package/lib/rules/line-comment-position.js +2 -0
  63. package/lib/rules/linebreak-style.js +2 -0
  64. package/lib/rules/lines-around-comment.js +2 -0
  65. package/lib/rules/lines-around-directive.js +6 -2
  66. package/lib/rules/lines-between-class-members.js +2 -0
  67. package/lib/rules/max-classes-per-file.js +4 -0
  68. package/lib/rules/max-depth.js +2 -0
  69. package/lib/rules/max-len.js +2 -0
  70. package/lib/rules/max-lines-per-function.js +2 -0
  71. package/lib/rules/max-lines.js +2 -0
  72. package/lib/rules/max-nested-callbacks.js +2 -0
  73. package/lib/rules/max-params.js +2 -0
  74. package/lib/rules/max-statements-per-line.js +2 -0
  75. package/lib/rules/max-statements.js +2 -0
  76. package/lib/rules/multiline-comment-style.js +3 -0
  77. package/lib/rules/multiline-ternary.js +3 -0
  78. package/lib/rules/new-cap.js +2 -0
  79. package/lib/rules/new-parens.js +2 -1
  80. package/lib/rules/newline-after-var.js +5 -2
  81. package/lib/rules/newline-before-return.js +6 -3
  82. package/lib/rules/newline-per-chained-call.js +4 -0
  83. package/lib/rules/no-alert.js +2 -0
  84. package/lib/rules/no-array-constructor.js +2 -0
  85. package/lib/rules/no-async-promise-executor.js +3 -0
  86. package/lib/rules/no-await-in-loop.js +4 -0
  87. package/lib/rules/no-bitwise.js +2 -0
  88. package/lib/rules/no-buffer-constructor.js +4 -0
  89. package/lib/rules/no-caller.js +2 -0
  90. package/lib/rules/no-case-declarations.js +2 -0
  91. package/lib/rules/no-catch-shadow.js +6 -3
  92. package/lib/rules/no-class-assign.js +2 -0
  93. package/lib/rules/no-compare-neg-zero.js +4 -0
  94. package/lib/rules/no-cond-assign.js +2 -0
  95. package/lib/rules/no-confusing-arrow.js +2 -0
  96. package/lib/rules/no-console.js +2 -0
  97. package/lib/rules/no-const-assign.js +2 -0
  98. package/lib/rules/no-constant-condition.js +2 -1
  99. package/lib/rules/no-continue.js +2 -0
  100. package/lib/rules/no-control-regex.js +4 -2
  101. package/lib/rules/no-debugger.js +4 -0
  102. package/lib/rules/no-delete-var.js +2 -0
  103. package/lib/rules/no-div-regex.js +2 -0
  104. package/lib/rules/no-dupe-args.js +2 -0
  105. package/lib/rules/no-dupe-class-members.js +2 -0
  106. package/lib/rules/no-dupe-keys.js +2 -0
  107. package/lib/rules/no-duplicate-case.js +2 -0
  108. package/lib/rules/no-duplicate-imports.js +2 -0
  109. package/lib/rules/no-else-return.js +2 -1
  110. package/lib/rules/no-empty-character-class.js +2 -0
  111. package/lib/rules/no-empty-function.js +2 -0
  112. package/lib/rules/no-empty-pattern.js +2 -0
  113. package/lib/rules/no-empty.js +2 -0
  114. package/lib/rules/no-eq-null.js +2 -0
  115. package/lib/rules/no-eval.js +2 -0
  116. package/lib/rules/no-ex-assign.js +2 -0
  117. package/lib/rules/no-extend-native.js +2 -0
  118. package/lib/rules/no-extra-bind.js +2 -1
  119. package/lib/rules/no-extra-boolean-cast.js +2 -1
  120. package/lib/rules/no-extra-label.js +2 -1
  121. package/lib/rules/no-extra-parens.js +5 -6
  122. package/lib/rules/no-extra-semi.js +2 -0
  123. package/lib/rules/no-fallthrough.js +2 -0
  124. package/lib/rules/no-floating-decimal.js +2 -1
  125. package/lib/rules/no-func-assign.js +2 -0
  126. package/lib/rules/no-global-assign.js +2 -0
  127. package/lib/rules/no-implicit-coercion.js +3 -0
  128. package/lib/rules/no-implicit-globals.js +2 -0
  129. package/lib/rules/no-implied-eval.js +3 -1
  130. package/lib/rules/no-inline-comments.js +2 -0
  131. package/lib/rules/no-inner-declarations.js +2 -0
  132. package/lib/rules/no-invalid-regexp.js +2 -0
  133. package/lib/rules/no-invalid-this.js +2 -0
  134. package/lib/rules/no-irregular-whitespace.js +7 -9
  135. package/lib/rules/no-iterator.js +2 -0
  136. package/lib/rules/no-label-var.js +2 -0
  137. package/lib/rules/no-labels.js +2 -0
  138. package/lib/rules/no-lone-blocks.js +2 -0
  139. package/lib/rules/no-lonely-if.js +2 -1
  140. package/lib/rules/no-loop-func.js +2 -0
  141. package/lib/rules/no-magic-numbers.js +3 -0
  142. package/lib/rules/no-misleading-character-class.js +4 -0
  143. package/lib/rules/no-mixed-operators.js +3 -0
  144. package/lib/rules/no-mixed-requires.js +2 -0
  145. package/lib/rules/no-mixed-spaces-and-tabs.js +2 -0
  146. package/lib/rules/no-multi-assign.js +3 -0
  147. package/lib/rules/no-multi-spaces.js +2 -0
  148. package/lib/rules/no-multi-str.js +2 -0
  149. package/lib/rules/no-multiple-empty-lines.js +2 -0
  150. package/lib/rules/no-native-reassign.js +4 -1
  151. package/lib/rules/no-negated-condition.js +2 -0
  152. package/lib/rules/no-negated-in-lhs.js +5 -2
  153. package/lib/rules/no-nested-ternary.js +2 -0
  154. package/lib/rules/no-new-func.js +2 -0
  155. package/lib/rules/no-new-object.js +2 -0
  156. package/lib/rules/no-new-require.js +2 -0
  157. package/lib/rules/no-new-symbol.js +2 -0
  158. package/lib/rules/no-new-wrappers.js +2 -0
  159. package/lib/rules/no-new.js +2 -0
  160. package/lib/rules/no-obj-calls.js +2 -0
  161. package/lib/rules/no-octal-escape.js +2 -0
  162. package/lib/rules/no-octal.js +2 -0
  163. package/lib/rules/no-param-reassign.js +2 -0
  164. package/lib/rules/no-path-concat.js +2 -0
  165. package/lib/rules/no-plusplus.js +2 -0
  166. package/lib/rules/no-process-env.js +2 -0
  167. package/lib/rules/no-process-exit.js +2 -0
  168. package/lib/rules/no-proto.js +2 -0
  169. package/lib/rules/no-prototype-builtins.js +2 -0
  170. package/lib/rules/no-redeclare.js +2 -0
  171. package/lib/rules/no-regex-spaces.js +2 -1
  172. package/lib/rules/no-restricted-globals.js +2 -0
  173. package/lib/rules/no-restricted-imports.js +41 -23
  174. package/lib/rules/no-restricted-modules.js +2 -0
  175. package/lib/rules/no-restricted-properties.js +2 -0
  176. package/lib/rules/no-restricted-syntax.js +2 -0
  177. package/lib/rules/no-return-assign.js +2 -0
  178. package/lib/rules/no-return-await.js +4 -0
  179. package/lib/rules/no-script-url.js +2 -0
  180. package/lib/rules/no-self-assign.js +2 -0
  181. package/lib/rules/no-self-compare.js +2 -0
  182. package/lib/rules/no-sequences.js +2 -0
  183. package/lib/rules/no-shadow-restricted-names.js +2 -0
  184. package/lib/rules/no-shadow.js +2 -0
  185. package/lib/rules/no-spaced-func.js +4 -1
  186. package/lib/rules/no-sparse-arrays.js +2 -0
  187. package/lib/rules/no-sync.js +2 -0
  188. package/lib/rules/no-tabs.js +2 -0
  189. package/lib/rules/no-template-curly-in-string.js +2 -0
  190. package/lib/rules/no-ternary.js +2 -0
  191. package/lib/rules/no-this-before-super.js +2 -1
  192. package/lib/rules/no-throw-literal.js +2 -0
  193. package/lib/rules/no-trailing-spaces.js +2 -0
  194. package/lib/rules/no-undef-init.js +2 -1
  195. package/lib/rules/no-undef.js +2 -0
  196. package/lib/rules/no-undefined.js +2 -0
  197. package/lib/rules/no-underscore-dangle.js +2 -0
  198. package/lib/rules/no-unexpected-multiline.js +2 -0
  199. package/lib/rules/no-unmodified-loop-condition.js +2 -0
  200. package/lib/rules/no-unneeded-ternary.js +2 -0
  201. package/lib/rules/no-unreachable.js +2 -1
  202. package/lib/rules/no-unsafe-finally.js +2 -0
  203. package/lib/rules/no-unsafe-negation.js +3 -0
  204. package/lib/rules/no-unused-expressions.js +2 -0
  205. package/lib/rules/no-unused-labels.js +2 -1
  206. package/lib/rules/no-unused-vars.js +36 -12
  207. package/lib/rules/no-use-before-define.js +2 -0
  208. package/lib/rules/no-useless-call.js +2 -0
  209. package/lib/rules/no-useless-catch.js +51 -0
  210. package/lib/rules/no-useless-computed-key.js +2 -1
  211. package/lib/rules/no-useless-concat.js +2 -0
  212. package/lib/rules/no-useless-constructor.js +2 -0
  213. package/lib/rules/no-useless-escape.js +2 -0
  214. package/lib/rules/no-useless-rename.js +4 -0
  215. package/lib/rules/no-useless-return.js +3 -0
  216. package/lib/rules/no-var.js +2 -0
  217. package/lib/rules/no-void.js +2 -0
  218. package/lib/rules/no-warning-comments.js +2 -0
  219. package/lib/rules/no-whitespace-before-property.js +2 -0
  220. package/lib/rules/no-with.js +2 -0
  221. package/lib/rules/nonblock-statement-body-position.js +4 -0
  222. package/lib/rules/object-curly-newline.js +4 -1
  223. package/lib/rules/object-curly-spacing.js +2 -0
  224. package/lib/rules/object-property-newline.js +3 -2
  225. package/lib/rules/object-shorthand.js +2 -0
  226. package/lib/rules/one-var-declaration-per-line.js +2 -0
  227. package/lib/rules/one-var.js +2 -1
  228. package/lib/rules/operator-assignment.js +2 -0
  229. package/lib/rules/operator-linebreak.js +2 -0
  230. package/lib/rules/padded-blocks.js +2 -0
  231. package/lib/rules/padding-line-between-statements.js +41 -0
  232. package/lib/rules/prefer-arrow-callback.js +2 -0
  233. package/lib/rules/prefer-const.js +116 -11
  234. package/lib/rules/prefer-destructuring.js +3 -0
  235. package/lib/rules/prefer-numeric-literals.js +2 -1
  236. package/lib/rules/prefer-object-spread.js +4 -0
  237. package/lib/rules/prefer-promise-reject-errors.js +4 -0
  238. package/lib/rules/prefer-reflect.js +4 -1
  239. package/lib/rules/prefer-rest-params.js +2 -0
  240. package/lib/rules/prefer-spread.js +2 -1
  241. package/lib/rules/prefer-template.js +2 -1
  242. package/lib/rules/quote-props.js +2 -0
  243. package/lib/rules/quotes.js +50 -25
  244. package/lib/rules/radix.js +2 -0
  245. package/lib/rules/require-atomic-updates.js +4 -0
  246. package/lib/rules/require-await.js +3 -0
  247. package/lib/rules/require-jsdoc.js +6 -1
  248. package/lib/rules/require-unicode-regexp.js +4 -0
  249. package/lib/rules/require-yield.js +2 -0
  250. package/lib/rules/rest-spread-spacing.js +4 -0
  251. package/lib/rules/semi-spacing.js +2 -0
  252. package/lib/rules/semi-style.js +3 -0
  253. package/lib/rules/semi.js +2 -0
  254. package/lib/rules/sort-imports.js +2 -0
  255. package/lib/rules/sort-keys.js +3 -0
  256. package/lib/rules/sort-vars.js +2 -0
  257. package/lib/rules/space-before-blocks.js +46 -35
  258. package/lib/rules/space-before-function-paren.js +2 -0
  259. package/lib/rules/space-in-parens.js +2 -1
  260. package/lib/rules/space-infix-ops.js +6 -1
  261. package/lib/rules/space-unary-ops.js +2 -0
  262. package/lib/rules/spaced-comment.js +2 -0
  263. package/lib/rules/strict.js +2 -0
  264. package/lib/rules/switch-colon-spacing.js +4 -0
  265. package/lib/rules/symbol-description.js +2 -0
  266. package/lib/rules/template-curly-spacing.js +2 -0
  267. package/lib/rules/template-tag-spacing.js +2 -0
  268. package/lib/rules/unicode-bom.js +2 -0
  269. package/lib/rules/use-isnan.js +2 -0
  270. package/lib/rules/valid-jsdoc.js +6 -1
  271. package/lib/rules/valid-typeof.js +2 -0
  272. package/lib/rules/vars-on-top.js +2 -0
  273. package/lib/rules/wrap-iife.js +2 -0
  274. package/lib/rules/wrap-regex.js +3 -1
  275. package/lib/rules/yield-star-spacing.js +2 -0
  276. package/lib/rules/yoda.js +2 -0
  277. package/lib/testers/rule-tester.js +2 -2
  278. package/lib/util/config-comment-parser.js +144 -0
  279. package/lib/util/glob-utils.js +1 -1
  280. package/lib/{ignored-paths.js → util/ignored-paths.js} +4 -4
  281. package/lib/{report-translator.js → util/report-translator.js} +2 -2
  282. package/lib/util/source-code.js +2 -1
  283. package/messages/all-files-ignored.txt +1 -1
  284. package/package.json +10 -11
package/lib/rules/yoda.js CHANGED
@@ -152,6 +152,8 @@ function same(a, b) {
152
152
 
153
153
  module.exports = {
154
154
  meta: {
155
+ type: "suggestion",
156
+
155
157
  docs: {
156
158
  description: "require or disallow \"Yoda\" conditions",
157
159
  category: "Best Practices",
@@ -397,7 +397,7 @@ class RuleTester {
397
397
  */
398
398
  function assertASTDidntChange(beforeAST, afterAST) {
399
399
  if (!lodash.isEqual(beforeAST, afterAST)) {
400
- assert.fail(null, null, "Rule should not modify AST.");
400
+ assert.fail("Rule should not modify AST.");
401
401
  }
402
402
  }
403
403
 
@@ -551,7 +551,7 @@ class RuleTester {
551
551
  } else {
552
552
 
553
553
  // Message was an unexpected type
554
- assert.fail(message, null, "Error should be a string, object, or RegExp.");
554
+ assert.fail(`Error should be a string, object, or RegExp, but found (${util.inspect(message)})`);
555
555
  }
556
556
  }
557
557
  }
@@ -0,0 +1,144 @@
1
+ /**
2
+ * @fileoverview Config Comment Parser
3
+ * @author Nicholas C. Zakas
4
+ */
5
+
6
+ /* eslint-disable class-methods-use-this*/
7
+ "use strict";
8
+
9
+ //------------------------------------------------------------------------------
10
+ // Requirements
11
+ //------------------------------------------------------------------------------
12
+
13
+ const levn = require("levn"),
14
+ ConfigOps = require("../config/config-ops");
15
+
16
+ const debug = require("debug")("eslint:config-comment-parser");
17
+
18
+ //------------------------------------------------------------------------------
19
+ // Public Interface
20
+ //------------------------------------------------------------------------------
21
+
22
+ /**
23
+ * Object to parse ESLint configuration comments inside JavaScript files.
24
+ * @name ConfigCommentParser
25
+ */
26
+ module.exports = class ConfigCommentParser {
27
+
28
+ /**
29
+ * Parses a list of "name:boolean_value" or/and "name" options divided by comma or
30
+ * whitespace. Used for "global" and "exported" comments.
31
+ * @param {string} string The string to parse.
32
+ * @param {Comment} comment The comment node which has the string.
33
+ * @returns {Object} Result map object of names and boolean values
34
+ */
35
+ parseBooleanConfig(string, comment) {
36
+ debug("Parsing Boolean config");
37
+
38
+ const items = {};
39
+
40
+ // Collapse whitespace around `:` and `,` to make parsing easier
41
+ const trimmedString = string.replace(/\s*([:,])\s*/g, "$1");
42
+
43
+ trimmedString.split(/\s|,+/).forEach(name => {
44
+ if (!name) {
45
+ return;
46
+ }
47
+
48
+ // value defaults to "false" (if not provided), e.g: "foo" => ["foo", "false"]
49
+ const [key, value = "false"] = name.split(":");
50
+
51
+ items[key] = {
52
+ value: value === "true",
53
+ comment
54
+ };
55
+ });
56
+ return items;
57
+ }
58
+
59
+ /**
60
+ * Parses a JSON-like config.
61
+ * @param {string} string The string to parse.
62
+ * @param {Object} location Start line and column of comments for potential error message.
63
+ * @returns {({success: true, config: Object}|{success: false, error: Problem})} Result map object
64
+ */
65
+ parseJsonConfig(string, location) {
66
+ debug("Parsing JSON config");
67
+
68
+ let items = {};
69
+
70
+ // Parses a JSON-like comment by the same way as parsing CLI option.
71
+ try {
72
+ items = levn.parse("Object", string) || {};
73
+
74
+ // Some tests say that it should ignore invalid comments such as `/*eslint no-alert:abc*/`.
75
+ // Also, commaless notations have invalid severity:
76
+ // "no-alert: 2 no-console: 2" --> {"no-alert": "2 no-console: 2"}
77
+ // Should ignore that case as well.
78
+ if (ConfigOps.isEverySeverityValid(items)) {
79
+ return {
80
+ success: true,
81
+ config: items
82
+ };
83
+ }
84
+ } catch (ex) {
85
+
86
+ debug("Levn parsing failed; falling back to manual parsing.");
87
+
88
+ // ignore to parse the string by a fallback.
89
+ }
90
+
91
+ /*
92
+ * Optionator cannot parse commaless notations.
93
+ * But we are supporting that. So this is a fallback for that.
94
+ */
95
+ items = {};
96
+ const normalizedString = string.replace(/([a-zA-Z0-9\-/]+):/g, "\"$1\":").replace(/(]|[0-9])\s+(?=")/, "$1,");
97
+
98
+ try {
99
+ items = JSON.parse(`{${normalizedString}}`);
100
+ } catch (ex) {
101
+ debug("Manual parsing failed.");
102
+
103
+ return {
104
+ success: false,
105
+ error: {
106
+ ruleId: null,
107
+ fatal: true,
108
+ severity: 2,
109
+ message: `Failed to parse JSON from '${normalizedString}': ${ex.message}`,
110
+ line: location.start.line,
111
+ column: location.start.column + 1
112
+ }
113
+ };
114
+
115
+ }
116
+
117
+ return {
118
+ success: true,
119
+ config: items
120
+ };
121
+ }
122
+
123
+ /**
124
+ * Parses a config of values separated by comma.
125
+ * @param {string} string The string to parse.
126
+ * @returns {Object} Result map of values and true values
127
+ */
128
+ parseListConfig(string) {
129
+ debug("Parsing list config");
130
+
131
+ const items = {};
132
+
133
+ // Collapse whitespace around commas
134
+ string.replace(/\s*,\s*/g, ",").split(/,+/).forEach(name => {
135
+ const trimmedName = name.trim();
136
+
137
+ if (trimmedName) {
138
+ items[trimmedName] = true;
139
+ }
140
+ });
141
+ return items;
142
+ }
143
+
144
+ };
@@ -14,7 +14,7 @@ const lodash = require("lodash"),
14
14
  GlobSync = require("./glob"),
15
15
 
16
16
  pathUtils = require("./path-utils"),
17
- IgnoredPaths = require("../ignored-paths");
17
+ IgnoredPaths = require("./ignored-paths");
18
18
 
19
19
  const debug = require("debug")("eslint:glob-utils");
20
20
 
@@ -12,7 +12,7 @@
12
12
  const fs = require("fs"),
13
13
  path = require("path"),
14
14
  ignore = require("ignore"),
15
- pathUtils = require("./util/path-utils");
15
+ pathUtils = require("./path-utils");
16
16
 
17
17
  const debug = require("debug")("eslint:ignored-paths");
18
18
 
@@ -296,7 +296,7 @@ class IgnoredPaths {
296
296
  /**
297
297
  * read ignore filepath
298
298
  * @param {string} filePath, file to add to ig
299
- * @returns {array} raw ignore rules
299
+ * @returns {Array} raw ignore rules
300
300
  */
301
301
  readIgnoreFile(filePath) {
302
302
  if (typeof this.cache[filePath] === "undefined") {
@@ -307,8 +307,8 @@ class IgnoredPaths {
307
307
 
308
308
  /**
309
309
  * add ignore file to node-ignore instance
310
- * @param {Object} ig, instance of node-ignore
311
- * @param {string} filePath, file to add to ig
310
+ * @param {Object} ig instance of node-ignore
311
+ * @param {string} filePath file to add to ig
312
312
  * @returns {void}
313
313
  */
314
314
  addIgnoreFile(ig, filePath) {
@@ -10,8 +10,8 @@
10
10
  //------------------------------------------------------------------------------
11
11
 
12
12
  const assert = require("assert");
13
- const ruleFixer = require("./util/rule-fixer");
14
- const interpolate = require("./util/interpolate");
13
+ const ruleFixer = require("./rule-fixer");
14
+ const interpolate = require("./interpolate");
15
15
 
16
16
  //------------------------------------------------------------------------------
17
17
  // Typedefs
@@ -87,7 +87,7 @@ class SourceCode extends TokenStore {
87
87
  * @param {string|Object} textOrConfig - The source code text or config object.
88
88
  * @param {string} textOrConfig.text - The source code text.
89
89
  * @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.
90
- * @param {Object|null} textOrConfig.parserServices - The parser srevices.
90
+ * @param {Object|null} textOrConfig.parserServices - The parser services.
91
91
  * @param {ScopeManager|null} textOrConfig.scopeManager - The scope of this source code.
92
92
  * @param {Object|null} textOrConfig.visitorKeys - The visitor keys to traverse AST.
93
93
  * @param {ASTNode} [astIfNoConfig] - The Program node of the AST representing the code. This AST should be created from the text that BOM was stripped.
@@ -316,6 +316,7 @@ class SourceCode extends TokenStore {
316
316
  * @returns {Token|null} The Block comment token containing the JSDoc comment
317
317
  * for the given node or null if not found.
318
318
  * @public
319
+ * @deprecated
319
320
  */
320
321
  getJSDocComment(node) {
321
322
 
@@ -1,4 +1,4 @@
1
- All of the files matching the glob pattern "<%= pattern %>" are ignored.
1
+ You are linting "<%= pattern %>", but all of the files matching the glob pattern "<%= pattern %>" are ignored.
2
2
 
3
3
  If you don't want to lint these files, remove the pattern "<%= pattern %>" from the list of arguments passed to ESLint.
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint",
3
- "version": "5.7.0",
3
+ "version": "5.11.0",
4
4
  "author": "Nicholas C. Zakas <nicholas+npm@nczconsulting.com>",
5
5
  "description": "An AST-based pattern checker for JavaScript.",
6
6
  "bin": {
@@ -11,11 +11,11 @@
11
11
  "test": "node Makefile.js test",
12
12
  "lint": "node Makefile.js lint",
13
13
  "fuzz": "node Makefile.js fuzz",
14
- "release": "node Makefile.js release",
15
- "ci-release": "node Makefile.js ciRelease",
16
- "alpharelease": "node Makefile.js prerelease -- alpha",
17
- "betarelease": "node Makefile.js prerelease -- beta",
18
- "rcrelease": "node Makefile.js prerelease -- rc",
14
+ "generate-release": "node Makefile.js generateRelease",
15
+ "generate-alpharelease": "node Makefile.js generatePrerelease -- alpha",
16
+ "generate-betarelease": "node Makefile.js generatePrerelease -- beta",
17
+ "generate-rcrelease": "node Makefile.js generatePrerelease -- rc",
18
+ "publish-release": "node Makefile.js publishRelease",
19
19
  "docs": "node Makefile.js docs",
20
20
  "gensite": "node Makefile.js gensite",
21
21
  "browserify": "node Makefile.js browserify",
@@ -44,7 +44,7 @@
44
44
  "eslint-scope": "^4.0.0",
45
45
  "eslint-utils": "^1.3.1",
46
46
  "eslint-visitor-keys": "^1.0.0",
47
- "espree": "^4.0.0",
47
+ "espree": "^5.0.0",
48
48
  "esquery": "^1.0.1",
49
49
  "esutils": "^2.0.2",
50
50
  "file-entry-cache": "^2.0.0",
@@ -54,7 +54,6 @@
54
54
  "ignore": "^4.0.6",
55
55
  "imurmurhash": "^0.1.4",
56
56
  "inquirer": "^6.1.0",
57
- "is-resolvable": "^1.1.0",
58
57
  "js-yaml": "^3.12.0",
59
58
  "json-stable-stringify-without-jsonify": "^1.0.1",
60
59
  "levn": "^0.3.0",
@@ -87,10 +86,10 @@
87
86
  "coveralls": "^3.0.1",
88
87
  "dateformat": "^3.0.3",
89
88
  "ejs": "^2.6.1",
90
- "eslint-plugin-eslint-plugin": "^1.2.0",
91
- "eslint-plugin-node": "^7.0.1",
89
+ "eslint-plugin-eslint-plugin": "^1.4.1",
90
+ "eslint-plugin-node": "^8.0.0",
92
91
  "eslint-plugin-rulesdir": "^0.1.0",
93
- "eslint-release": "^0.11.1",
92
+ "eslint-release": "^1.2.0",
94
93
  "eslint-rule-composer": "^0.3.0",
95
94
  "eslump": "^1.6.2",
96
95
  "esprima": "^4.0.1",