eslint 7.0.0-alpha.1 → 7.0.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 (84) hide show
  1. package/CHANGELOG.md +329 -0
  2. package/README.md +7 -7
  3. package/bin/eslint.js +115 -77
  4. package/conf/category-list.json +2 -3
  5. package/conf/environments.js +2 -1
  6. package/conf/eslint-recommended.js +3 -0
  7. package/lib/api.js +2 -0
  8. package/lib/cli-engine/cascading-config-array-factory.js +16 -2
  9. package/lib/cli-engine/cli-engine.js +53 -47
  10. package/lib/cli-engine/config-array/config-array.js +30 -1
  11. package/lib/cli-engine/config-array/ignore-pattern.js +7 -1
  12. package/lib/cli-engine/config-array-factory.js +244 -235
  13. package/lib/cli.js +181 -95
  14. package/lib/eslint/eslint.js +656 -0
  15. package/lib/eslint/index.js +7 -0
  16. package/lib/init/autoconfig.js +4 -4
  17. package/lib/init/config-file.js +2 -2
  18. package/lib/init/config-initializer.js +2 -4
  19. package/lib/init/source-code-utils.js +2 -2
  20. package/lib/linter/node-event-generator.js +2 -2
  21. package/lib/options.js +0 -1
  22. package/lib/rule-tester/rule-tester.js +178 -23
  23. package/lib/rules/accessor-pairs.js +2 -2
  24. package/lib/rules/array-callback-return.js +3 -18
  25. package/lib/rules/arrow-body-style.js +26 -15
  26. package/lib/rules/callback-return.js +4 -0
  27. package/lib/rules/camelcase.js +38 -1
  28. package/lib/rules/comma-style.js +3 -8
  29. package/lib/rules/computed-property-spacing.js +2 -2
  30. package/lib/rules/curly.js +124 -40
  31. package/lib/rules/func-call-spacing.js +4 -3
  32. package/lib/rules/func-names.js +31 -24
  33. package/lib/rules/getter-return.js +2 -12
  34. package/lib/rules/global-require.js +4 -0
  35. package/lib/rules/handle-callback-err.js +4 -0
  36. package/lib/rules/id-blacklist.js +140 -64
  37. package/lib/rules/id-length.js +14 -4
  38. package/lib/rules/indent-legacy.js +0 -16
  39. package/lib/rules/key-spacing.js +1 -1
  40. package/lib/rules/new-cap.js +1 -1
  41. package/lib/rules/newline-per-chained-call.js +6 -3
  42. package/lib/rules/no-alert.js +5 -3
  43. package/lib/rules/no-buffer-constructor.js +4 -0
  44. package/lib/rules/no-dupe-else-if.js +1 -1
  45. package/lib/rules/no-empty-function.js +4 -2
  46. package/lib/rules/no-eval.js +3 -2
  47. package/lib/rules/no-extra-bind.js +1 -1
  48. package/lib/rules/no-extra-boolean-cast.js +168 -38
  49. package/lib/rules/no-extra-parens.js +9 -5
  50. package/lib/rules/no-implied-eval.js +83 -101
  51. package/lib/rules/no-import-assign.js +1 -1
  52. package/lib/rules/no-inner-declarations.js +31 -39
  53. package/lib/rules/no-lone-blocks.js +1 -1
  54. package/lib/rules/no-magic-numbers.js +72 -37
  55. package/lib/rules/no-mixed-requires.js +4 -0
  56. package/lib/rules/no-new-object.js +15 -3
  57. package/lib/rules/no-new-require.js +4 -0
  58. package/lib/rules/no-new-wrappers.js +1 -1
  59. package/lib/rules/no-obj-calls.js +24 -5
  60. package/lib/rules/no-path-concat.js +4 -0
  61. package/lib/rules/no-plusplus.js +39 -3
  62. package/lib/rules/no-process-env.js +4 -0
  63. package/lib/rules/no-process-exit.js +4 -0
  64. package/lib/rules/no-prototype-builtins.js +1 -1
  65. package/lib/rules/no-restricted-modules.js +52 -18
  66. package/lib/rules/no-setter-return.js +1 -1
  67. package/lib/rules/no-sync.js +4 -0
  68. package/lib/rules/no-underscore-dangle.js +1 -1
  69. package/lib/rules/no-unexpected-multiline.js +22 -12
  70. package/lib/rules/no-useless-concat.js +1 -1
  71. package/lib/rules/operator-assignment.js +3 -3
  72. package/lib/rules/operator-linebreak.js +4 -16
  73. package/lib/rules/prefer-numeric-literals.js +3 -3
  74. package/lib/rules/prefer-object-spread.js +2 -2
  75. package/lib/rules/require-await.js +1 -1
  76. package/lib/rules/space-before-function-paren.js +5 -2
  77. package/lib/rules/template-curly-spacing.js +59 -42
  78. package/lib/rules/utils/ast-utils.js +65 -4
  79. package/lib/rules/wrap-iife.js +54 -17
  80. package/lib/rules/yoda.js +101 -51
  81. package/lib/shared/relative-module-resolver.js +1 -0
  82. package/lib/shared/types.js +9 -2
  83. package/messages/plugin-conflict.txt +7 -0
  84. package/package.json +27 -26
@@ -10,6 +10,21 @@
10
10
  //------------------------------------------------------------------------------
11
11
 
12
12
  const astUtils = require("./utils/ast-utils");
13
+ const eslintUtils = require("eslint-utils");
14
+
15
+ //----------------------------------------------------------------------
16
+ // Helpers
17
+ //----------------------------------------------------------------------
18
+
19
+ /**
20
+ * Check if the given node is callee of a `NewExpression` node
21
+ * @param {ASTNode} node node to check
22
+ * @returns {boolean} True if the node is callee of a `NewExpression` node
23
+ * @private
24
+ */
25
+ function isCalleeOfNewExpression(node) {
26
+ return node.parent.type === "NewExpression" && node.parent.callee === node;
27
+ }
13
28
 
14
29
  //------------------------------------------------------------------------------
15
30
  // Rule Definition
@@ -58,15 +73,25 @@ module.exports = {
58
73
  const sourceCode = context.getSourceCode();
59
74
 
60
75
  /**
61
- * Check if the node is wrapped in ()
76
+ * Check if the node is wrapped in any (). All parens count: grouping parens and parens for constructs such as if()
62
77
  * @param {ASTNode} node node to evaluate
63
- * @returns {boolean} True if it is wrapped
78
+ * @returns {boolean} True if it is wrapped in any parens
64
79
  * @private
65
80
  */
66
- function wrapped(node) {
81
+ function isWrappedInAnyParens(node) {
67
82
  return astUtils.isParenthesised(sourceCode, node);
68
83
  }
69
84
 
85
+ /**
86
+ * Check if the node is wrapped in grouping (). Parens for constructs such as if() don't count
87
+ * @param {ASTNode} node node to evaluate
88
+ * @returns {boolean} True if it is wrapped in grouping parens
89
+ * @private
90
+ */
91
+ function isWrappedInGroupingParens(node) {
92
+ return eslintUtils.isParenthesized(1, node, sourceCode);
93
+ }
94
+
70
95
  /**
71
96
  * Get the function node from an IIFE
72
97
  * @param {ASTNode} node node to evaluate
@@ -99,10 +124,10 @@ module.exports = {
99
124
  return;
100
125
  }
101
126
 
102
- const callExpressionWrapped = wrapped(node),
103
- functionExpressionWrapped = wrapped(innerNode);
127
+ const isCallExpressionWrapped = isWrappedInAnyParens(node),
128
+ isFunctionExpressionWrapped = isWrappedInAnyParens(innerNode);
104
129
 
105
- if (!callExpressionWrapped && !functionExpressionWrapped) {
130
+ if (!isCallExpressionWrapped && !isFunctionExpressionWrapped) {
106
131
  context.report({
107
132
  node,
108
133
  messageId: "wrapInvocation",
@@ -112,27 +137,39 @@ module.exports = {
112
137
  return fixer.replaceText(nodeToSurround, `(${sourceCode.getText(nodeToSurround)})`);
113
138
  }
114
139
  });
115
- } else if (style === "inside" && !functionExpressionWrapped) {
140
+ } else if (style === "inside" && !isFunctionExpressionWrapped) {
116
141
  context.report({
117
142
  node,
118
143
  messageId: "wrapExpression",
119
144
  fix(fixer) {
120
145
 
146
+ // The outer call expression will always be wrapped at this point.
147
+
148
+ if (isWrappedInGroupingParens(node) && !isCalleeOfNewExpression(node)) {
149
+
150
+ /*
151
+ * Parenthesize the function expression and remove unnecessary grouping parens around the call expression.
152
+ * Replace the range between the end of the function expression and the end of the call expression.
153
+ * for example, in `(function(foo) {}(bar))`, the range `(bar))` should get replaced with `)(bar)`.
154
+ */
155
+
156
+ const parenAfter = sourceCode.getTokenAfter(node);
157
+
158
+ return fixer.replaceTextRange(
159
+ [innerNode.range[1], parenAfter.range[1]],
160
+ `)${sourceCode.getText().slice(innerNode.range[1], parenAfter.range[0])}`
161
+ );
162
+ }
163
+
121
164
  /*
122
- * The outer call expression will always be wrapped at this point.
123
- * Replace the range between the end of the function expression and the end of the call expression.
124
- * for example, in `(function(foo) {}(bar))`, the range `(bar))` should get replaced with `)(bar)`.
125
- * Replace the parens from the outer expression, and parenthesize the function expression.
165
+ * Call expression is wrapped in mandatory parens such as if(), or in necessary grouping parens.
166
+ * These parens cannot be removed, so just parenthesize the function expression.
126
167
  */
127
- const parenAfter = sourceCode.getTokenAfter(node);
128
168
 
129
- return fixer.replaceTextRange(
130
- [innerNode.range[1], parenAfter.range[1]],
131
- `)${sourceCode.getText().slice(innerNode.range[1], parenAfter.range[0])}`
132
- );
169
+ return fixer.replaceText(innerNode, `(${sourceCode.getText(innerNode)})`);
133
170
  }
134
171
  });
135
- } else if (style === "outside" && !callExpressionWrapped) {
172
+ } else if (style === "outside" && !isCallExpressionWrapped) {
136
173
  context.report({
137
174
  node,
138
175
  messageId: "moveInvocation",
package/lib/rules/yoda.js CHANGED
@@ -20,7 +20,7 @@ const astUtils = require("./utils/ast-utils");
20
20
  * @returns {boolean} Whether or not it is a comparison operator.
21
21
  */
22
22
  function isComparisonOperator(operator) {
23
- return (/^(==|===|!=|!==|<|>|<=|>=)$/u).test(operator);
23
+ return /^(==|===|!=|!==|<|>|<=|>=)$/u.test(operator);
24
24
  }
25
25
 
26
26
  /**
@@ -29,7 +29,7 @@ function isComparisonOperator(operator) {
29
29
  * @returns {boolean} Whether or not it is an equality operator.
30
30
  */
31
31
  function isEqualityOperator(operator) {
32
- return (/^(==|===)$/u).test(operator);
32
+ return /^(==|===)$/u.test(operator);
33
33
  }
34
34
 
35
35
  /**
@@ -50,10 +50,12 @@ function isRangeTestOperator(operator) {
50
50
  * real literal and should be treated as such.
51
51
  */
52
52
  function isNegativeNumericLiteral(node) {
53
- return (node.type === "UnaryExpression" &&
53
+ return (
54
+ node.type === "UnaryExpression" &&
54
55
  node.operator === "-" &&
55
56
  node.prefix &&
56
- astUtils.isNumericLiteral(node.argument));
57
+ astUtils.isNumericLiteral(node.argument)
58
+ );
57
59
  }
58
60
 
59
61
  /**
@@ -71,25 +73,21 @@ function isStaticTemplateLiteral(node) {
71
73
  * @returns {boolean} True if the node should be treated as a single Literal node.
72
74
  */
73
75
  function looksLikeLiteral(node) {
74
- return isNegativeNumericLiteral(node) ||
75
- isStaticTemplateLiteral(node);
76
+ return isNegativeNumericLiteral(node) || isStaticTemplateLiteral(node);
76
77
  }
77
78
 
78
79
  /**
79
80
  * Attempts to derive a Literal node from nodes that are treated like literals.
80
81
  * @param {ASTNode} node Node to normalize.
81
- * @param {number} [defaultValue] The default value to be returned if the node
82
- * is not a Literal.
83
82
  * @returns {ASTNode} One of the following options.
84
83
  * 1. The original node if the node is already a Literal
85
84
  * 2. A normalized Literal node with the negative number as the value if the
86
85
  * node represents a negative number literal.
87
86
  * 3. A normalized Literal node with the string as the value if the node is
88
87
  * a Template Literal without expression.
89
- * 4. The Literal node which has the `defaultValue` argument if it exists.
90
- * 5. Otherwise `null`.
88
+ * 4. Otherwise `null`.
91
89
  */
92
- function getNormalizedLiteral(node, defaultValue) {
90
+ function getNormalizedLiteral(node) {
93
91
  if (node.type === "Literal") {
94
92
  return node;
95
93
  }
@@ -110,14 +108,6 @@ function getNormalizedLiteral(node, defaultValue) {
110
108
  };
111
109
  }
112
110
 
113
- if (defaultValue) {
114
- return {
115
- type: "Literal",
116
- value: defaultValue,
117
- raw: String(defaultValue)
118
- };
119
- }
120
-
121
111
  return null;
122
112
  }
123
113
 
@@ -183,7 +173,7 @@ module.exports = {
183
173
  type: "suggestion",
184
174
 
185
175
  docs: {
186
- description: "require or disallow \"Yoda\" conditions",
176
+ description: 'require or disallow "Yoda" conditions',
187
177
  category: "Best Practices",
188
178
  recommended: false,
189
179
  url: "https://eslint.org/docs/rules/yoda"
@@ -211,16 +201,19 @@ module.exports = {
211
201
 
212
202
  fixable: "code",
213
203
  messages: {
214
- expected: "Expected literal to be on the {{expectedSide}} side of {{operator}}."
204
+ expected:
205
+ "Expected literal to be on the {{expectedSide}} side of {{operator}}."
215
206
  }
216
207
  },
217
208
 
218
209
  create(context) {
219
210
 
220
211
  // Default to "never" (!always) if no option
221
- const always = (context.options[0] === "always");
222
- const exceptRange = (context.options[1] && context.options[1].exceptRange);
223
- const onlyEquality = (context.options[1] && context.options[1].onlyEquality);
212
+ const always = context.options[0] === "always";
213
+ const exceptRange =
214
+ context.options[1] && context.options[1].exceptRange;
215
+ const onlyEquality =
216
+ context.options[1] && context.options[1].onlyEquality;
224
217
 
225
218
  const sourceCode = context.getSourceCode();
226
219
 
@@ -243,13 +236,23 @@ module.exports = {
243
236
  * @returns {boolean} Whether node is a "between" range test.
244
237
  */
245
238
  function isBetweenTest() {
246
- let leftLiteral, rightLiteral;
239
+ if (node.operator === "&&" && same(left.right, right.left)) {
240
+ const leftLiteral = getNormalizedLiteral(left.left);
241
+ const rightLiteral = getNormalizedLiteral(right.right);
242
+
243
+ if (leftLiteral === null && rightLiteral === null) {
244
+ return false;
245
+ }
247
246
 
248
- return (node.operator === "&&" &&
249
- (leftLiteral = getNormalizedLiteral(left.left)) &&
250
- (rightLiteral = getNormalizedLiteral(right.right, Number.POSITIVE_INFINITY)) &&
251
- leftLiteral.value <= rightLiteral.value &&
252
- same(left.right, right.left));
247
+ if (rightLiteral === null || leftLiteral === null) {
248
+ return true;
249
+ }
250
+
251
+ if (leftLiteral.value <= rightLiteral.value) {
252
+ return true;
253
+ }
254
+ }
255
+ return false;
253
256
  }
254
257
 
255
258
  /**
@@ -257,13 +260,24 @@ module.exports = {
257
260
  * @returns {boolean} Whether node is an "outside" range test.
258
261
  */
259
262
  function isOutsideTest() {
260
- let leftLiteral, rightLiteral;
263
+ if (node.operator === "||" && same(left.left, right.right)) {
264
+ const leftLiteral = getNormalizedLiteral(left.right);
265
+ const rightLiteral = getNormalizedLiteral(right.left);
266
+
267
+ if (leftLiteral === null && rightLiteral === null) {
268
+ return false;
269
+ }
270
+
271
+ if (rightLiteral === null || leftLiteral === null) {
272
+ return true;
273
+ }
274
+
275
+ if (leftLiteral.value <= rightLiteral.value) {
276
+ return true;
277
+ }
278
+ }
261
279
 
262
- return (node.operator === "||" &&
263
- (leftLiteral = getNormalizedLiteral(left.right, Number.NEGATIVE_INFINITY)) &&
264
- (rightLiteral = getNormalizedLiteral(right.left)) &&
265
- leftLiteral.value <= rightLiteral.value &&
266
- same(left.left, right.right));
280
+ return false;
267
281
  }
268
282
 
269
283
  /**
@@ -276,13 +290,15 @@ module.exports = {
276
290
  return astUtils.isParenthesised(sourceCode, node);
277
291
  }
278
292
 
279
- return (node.type === "LogicalExpression" &&
293
+ return (
294
+ node.type === "LogicalExpression" &&
280
295
  left.type === "BinaryExpression" &&
281
296
  right.type === "BinaryExpression" &&
282
297
  isRangeTestOperator(left.operator) &&
283
298
  isRangeTestOperator(right.operator) &&
284
299
  (isBetweenTest() || isOutsideTest()) &&
285
- isParenWrapped());
300
+ isParenWrapped()
301
+ );
286
302
  }
287
303
 
288
304
  const OPERATOR_FLIP_MAP = {
@@ -303,21 +319,52 @@ module.exports = {
303
319
  */
304
320
  function getFlippedString(node) {
305
321
  const tokenBefore = sourceCode.getTokenBefore(node);
306
- const operatorToken = sourceCode.getFirstTokenBetween(node.left, node.right, token => token.value === node.operator);
307
- const textBeforeOperator = sourceCode.getText().slice(sourceCode.getTokenBefore(operatorToken).range[1], operatorToken.range[0]);
308
- const textAfterOperator = sourceCode.getText().slice(operatorToken.range[1], sourceCode.getTokenAfter(operatorToken).range[0]);
309
- const leftText = sourceCode.getText().slice(node.range[0], sourceCode.getTokenBefore(operatorToken).range[1]);
322
+ const operatorToken = sourceCode.getFirstTokenBetween(
323
+ node.left,
324
+ node.right,
325
+ token => token.value === node.operator
326
+ );
327
+ const textBeforeOperator = sourceCode
328
+ .getText()
329
+ .slice(
330
+ sourceCode.getTokenBefore(operatorToken).range[1],
331
+ operatorToken.range[0]
332
+ );
333
+ const textAfterOperator = sourceCode
334
+ .getText()
335
+ .slice(
336
+ operatorToken.range[1],
337
+ sourceCode.getTokenAfter(operatorToken).range[0]
338
+ );
339
+ const leftText = sourceCode
340
+ .getText()
341
+ .slice(
342
+ node.range[0],
343
+ sourceCode.getTokenBefore(operatorToken).range[1]
344
+ );
310
345
  const firstRightToken = sourceCode.getTokenAfter(operatorToken);
311
- const rightText = sourceCode.getText().slice(firstRightToken.range[0], node.range[1]);
346
+ const rightText = sourceCode
347
+ .getText()
348
+ .slice(firstRightToken.range[0], node.range[1]);
312
349
 
313
350
  let prefix = "";
314
351
 
315
- if (tokenBefore && tokenBefore.range[1] === node.range[0] &&
316
- !astUtils.canTokensBeAdjacent(tokenBefore, firstRightToken)) {
352
+ if (
353
+ tokenBefore &&
354
+ tokenBefore.range[1] === node.range[0] &&
355
+ !astUtils.canTokensBeAdjacent(tokenBefore, firstRightToken)
356
+ ) {
317
357
  prefix = " ";
318
358
  }
319
359
 
320
- return prefix + rightText + textBeforeOperator + OPERATOR_FLIP_MAP[operatorToken.value] + textAfterOperator + leftText;
360
+ return (
361
+ prefix +
362
+ rightText +
363
+ textBeforeOperator +
364
+ OPERATOR_FLIP_MAP[operatorToken.value] +
365
+ textAfterOperator +
366
+ leftText
367
+ );
321
368
  }
322
369
 
323
370
  //--------------------------------------------------------------------------
@@ -331,8 +378,12 @@ module.exports = {
331
378
 
332
379
  // If `expectedLiteral` is not a literal, and `expectedNonLiteral` is a literal, raise an error.
333
380
  if (
334
- (expectedNonLiteral.type === "Literal" || looksLikeLiteral(expectedNonLiteral)) &&
335
- !(expectedLiteral.type === "Literal" || looksLikeLiteral(expectedLiteral)) &&
381
+ (expectedNonLiteral.type === "Literal" ||
382
+ looksLikeLiteral(expectedNonLiteral)) &&
383
+ !(
384
+ expectedLiteral.type === "Literal" ||
385
+ looksLikeLiteral(expectedLiteral)
386
+ ) &&
336
387
  !(!isEqualityOperator(node.operator) && onlyEquality) &&
337
388
  isComparisonOperator(node.operator) &&
338
389
  !(exceptRange && isRangeTest(context.getAncestors().pop()))
@@ -344,12 +395,11 @@ module.exports = {
344
395
  operator: node.operator,
345
396
  expectedSide: always ? "left" : "right"
346
397
  },
347
- fix: fixer => fixer.replaceText(node, getFlippedString(node))
398
+ fix: fixer =>
399
+ fixer.replaceText(node, getFlippedString(node))
348
400
  });
349
401
  }
350
-
351
402
  }
352
403
  };
353
-
354
404
  }
355
405
  };
@@ -11,6 +11,7 @@ const Module = require("module");
11
11
  * `Module.createRequire` is added in v12.2.0. It supports URL as well.
12
12
  * We only support the case where the argument is a filepath, not a URL.
13
13
  */
14
+ // eslint-disable-next-line node/no-unsupported-features/node-builtins, node/no-deprecated-api
14
15
  const createRequire = Module.createRequire || Module.createRequireFromPath;
15
16
 
16
17
  module.exports = {
@@ -37,7 +37,7 @@ module.exports = {};
37
37
  * @property {ParserOptions} [parserOptions] The parser options.
38
38
  * @property {string[]} [plugins] The plugin specifiers.
39
39
  * @property {string} [processor] The processor specifier.
40
- * @property {boolean|undefined} reportUnusedDisableDirectives The flag to report unused `eslint-disable` comments.
40
+ * @property {boolean} [reportUnusedDisableDirectives] The flag to report unused `eslint-disable` comments.
41
41
  * @property {boolean} [root] The root flag.
42
42
  * @property {Record<string, RuleConf>} [rules] The rule settings.
43
43
  * @property {Object} [settings] The shared settings.
@@ -56,7 +56,7 @@ module.exports = {};
56
56
  * @property {ParserOptions} [parserOptions] The parser options.
57
57
  * @property {string[]} [plugins] The plugin specifiers.
58
58
  * @property {string} [processor] The processor specifier.
59
- * @property {boolean|undefined} reportUnusedDisableDirectives The flag to report unused `eslint-disable` comments.
59
+ * @property {boolean} [reportUnusedDisableDirectives] The flag to report unused `eslint-disable` comments.
60
60
  * @property {Record<string, RuleConf>} [rules] The rule settings.
61
61
  * @property {Object} [settings] The shared settings.
62
62
  */
@@ -141,3 +141,10 @@ module.exports = {};
141
141
  * @property {Record<string, Processor>} [processors] The definition of plugin processors.
142
142
  * @property {Record<string, Function | Rule>} [rules] The definition of plugin rules.
143
143
  */
144
+
145
+ /**
146
+ * Information of deprecated rules.
147
+ * @typedef {Object} DeprecatedRuleInfo
148
+ * @property {string} ruleId The rule ID.
149
+ * @property {string[]} replacedBy The rule IDs that replace this deprecated rule.
150
+ */
@@ -0,0 +1,7 @@
1
+ ESLint couldn't determine the plugin "<%- pluginId %>" uniquely.
2
+ <% for (const { filePath, importerName } of plugins) { %>
3
+ - <%= filePath %> (loaded in "<%= importerName %>")<% } %>
4
+
5
+ Please remove the "plugins" setting from either config or remove either plugin installation.
6
+
7
+ If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint",
3
- "version": "7.0.0-alpha.1",
3
+ "version": "7.0.0",
4
4
  "author": "Nicholas C. Zakas <nicholas+npm@nczconsulting.com>",
5
5
  "description": "An AST-based pattern checker for JavaScript.",
6
6
  "bin": {
@@ -48,15 +48,15 @@
48
48
  "dependencies": {
49
49
  "@babel/code-frame": "^7.0.0",
50
50
  "ajv": "^6.10.0",
51
- "chalk": "^3.0.0",
52
- "cross-spawn": "^7.0.1",
51
+ "chalk": "^4.0.0",
52
+ "cross-spawn": "^7.0.2",
53
53
  "debug": "^4.0.1",
54
54
  "doctrine": "^3.0.0",
55
55
  "eslint-scope": "^5.0.0",
56
- "eslint-utils": "^1.4.3",
56
+ "eslint-utils": "^2.0.0",
57
57
  "eslint-visitor-keys": "^1.1.0",
58
- "espree": "^6.1.2",
59
- "esquery": "^1.0.1",
58
+ "espree": "^7.0.0",
59
+ "esquery": "^1.2.0",
60
60
  "esutils": "^2.0.2",
61
61
  "file-entry-cache": "^5.0.1",
62
62
  "functional-red-black-tree": "^1.0.1",
@@ -69,16 +69,16 @@
69
69
  "is-glob": "^4.0.0",
70
70
  "js-yaml": "^3.13.1",
71
71
  "json-stable-stringify-without-jsonify": "^1.0.1",
72
- "levn": "^0.3.0",
72
+ "levn": "^0.4.1",
73
73
  "lodash": "^4.17.14",
74
74
  "minimatch": "^3.0.4",
75
75
  "natural-compare": "^1.4.0",
76
- "optionator": "^0.8.3",
76
+ "optionator": "^0.9.1",
77
77
  "progress": "^2.0.0",
78
- "regexpp": "^3.0.0",
79
- "semver": "^7.1.1",
78
+ "regexpp": "^3.1.0",
79
+ "semver": "^7.2.1",
80
80
  "strip-ansi": "^6.0.0",
81
- "strip-json-comments": "^3.0.1",
81
+ "strip-json-comments": "^3.1.0",
82
82
  "table": "^5.2.3",
83
83
  "text-table": "^0.2.0",
84
84
  "v8-compile-cache": "^2.0.3"
@@ -86,46 +86,47 @@
86
86
  "devDependencies": {
87
87
  "@babel/core": "^7.4.3",
88
88
  "@babel/preset-env": "^7.4.3",
89
- "acorn": "^7.1.0",
89
+ "acorn": "^7.1.1",
90
90
  "babel-loader": "^8.0.5",
91
91
  "chai": "^4.0.1",
92
92
  "cheerio": "^0.22.0",
93
93
  "common-tags": "^1.8.0",
94
94
  "core-js": "^3.1.3",
95
95
  "dateformat": "^3.0.3",
96
- "ejs": "^2.6.1",
96
+ "ejs": "^3.0.2",
97
+ "escape-string-regexp": "^3.0.0",
97
98
  "eslint": "file:.",
98
99
  "eslint-config-eslint": "file:packages/eslint-config-eslint",
99
100
  "eslint-plugin-eslint-plugin": "^2.2.1",
100
101
  "eslint-plugin-internal-rules": "file:tools/internal-rules",
101
- "eslint-plugin-jsdoc": "^15.9.5",
102
- "eslint-plugin-node": "^9.0.0",
103
- "eslint-release": "^1.2.0",
102
+ "eslint-plugin-jsdoc": "^22.1.0",
103
+ "eslint-plugin-node": "^11.1.0",
104
+ "eslint-release": "^2.0.0",
104
105
  "eslump": "^2.0.0",
105
106
  "esprima": "^4.0.1",
106
- "glob": "^7.1.3",
107
+ "glob": "^7.1.6",
107
108
  "jsdoc": "^3.5.5",
108
109
  "karma": "^4.0.1",
109
- "karma-chrome-launcher": "^2.2.0",
110
+ "karma-chrome-launcher": "^3.1.0",
110
111
  "karma-mocha": "^1.3.0",
111
112
  "karma-mocha-reporter": "^2.2.3",
112
113
  "karma-webpack": "^4.0.0-rc.6",
113
114
  "leche": "^2.2.3",
114
- "lint-staged": "^8.1.5",
115
+ "lint-staged": "^10.1.2",
115
116
  "load-perf": "^0.2.0",
116
- "markdownlint": "^0.15.0",
117
- "markdownlint-cli": "^0.17.0",
117
+ "markdownlint": "^0.19.0",
118
+ "markdownlint-cli": "^0.22.0",
118
119
  "memfs": "^3.0.1",
119
- "mocha": "^6.1.2",
120
+ "mocha": "^7.1.1",
120
121
  "mocha-junit-reporter": "^1.23.0",
121
122
  "npm-license": "^0.3.3",
122
- "nyc": "^14.1.1",
123
+ "nyc": "^15.0.1",
123
124
  "proxyquire": "^2.0.1",
124
- "puppeteer": "^1.18.0",
125
- "recast": "^0.18.1",
125
+ "puppeteer": "^2.1.1",
126
+ "recast": "^0.19.0",
126
127
  "regenerator-runtime": "^0.13.2",
127
128
  "shelljs": "^0.8.2",
128
- "sinon": "^7.3.2",
129
+ "sinon": "^9.0.1",
129
130
  "temp": "^0.9.0",
130
131
  "webpack": "^4.35.0",
131
132
  "webpack-cli": "^3.3.5",