eslint 7.30.0 → 7.31.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ v7.31.0 - July 17, 2021
2
+
3
+ * [`efdbb12`](https://github.com/eslint/eslint/commit/efdbb1227019427ec2d968a8d6e9151dd8a77c35) Upgrade: @eslint/eslintrc to v0.4.3 (#14808) (Brandon Mills)
4
+ * [`a96b05f`](https://github.com/eslint/eslint/commit/a96b05f6c5649cfee112d605c91d95aa191e2f78) Update: add end location to report in `consistent-return` (refs #12334) (#14798) (Nitin Kumar)
5
+ * [`e0e8e30`](https://github.com/eslint/eslint/commit/e0e8e308929c9c66612505f2da89043f8592eea7) Docs: update BUG_REPORT template (#14787) (Nitin Kumar)
6
+ * [`39115c8`](https://github.com/eslint/eslint/commit/39115c8b71d2629161359f6456f47fdbd552fddd) Docs: provide more context to no-eq-null (#14801) (gfyoung)
7
+ * [`9a3c73c`](https://github.com/eslint/eslint/commit/9a3c73c130d437a65f4edba0dcb63390e68cac41) Docs: fix a broken link (#14790) (Sam Chen)
8
+ * [`ddffa8a`](https://github.com/eslint/eslint/commit/ddffa8ad58b4b124b08061e9045fdb5370cbdbe3) Update: Indicating the operator in question (#14764) (Paul Smith)
9
+ * [`bba714c`](https://github.com/eslint/eslint/commit/bba714c2ed813821ed288fbc07722cdde6e534fe) Update: Clarifying what changes need to be made in no-mixed-operators (#14765) (Paul Smith)
10
+ * [`b0d22e3`](https://github.com/eslint/eslint/commit/b0d22e3eff18ea7f08189134c07cddceaec69a09) Docs: Mention benefit of providing `meta.docs.url` (#14774) (Bryan Mishkin)
11
+ * [`000cc79`](https://github.com/eslint/eslint/commit/000cc796fd487e7b9ba8bcc5857dd691044479cc) Sponsors: Sync README with website (ESLint Jenkins)
12
+ * [`a6a7438`](https://github.com/eslint/eslint/commit/a6a7438502abc6a1e29ec35cfbe2058ffc0803b1) Chore: pin fs-teardown@0.1.1 (#14771) (Milos Djermanovic)
13
+
1
14
  v7.30.0 - July 2, 2021
2
15
 
3
16
  * [`5f74642`](https://github.com/eslint/eslint/commit/5f746420700d457b92dd86659de588d272937b79) Chore: don't check Program.start in SourceCode#getComments (refs #14744) (#14748) (Milos Djermanovic)
package/README.md CHANGED
@@ -288,7 +288,7 @@ The following companies, organizations, and individuals support ESLint's ongoing
288
288
  <p><a href="https://automattic.com"><img src="https://images.opencollective.com/photomatt/d0ef3e1/logo.png" alt="Automattic" height="undefined"></a></p><h3>Gold Sponsors</h3>
289
289
  <p><a href="https://nx.dev"><img src="https://images.opencollective.com/nx/0efbe42/logo.png" alt="Nx (by Nrwl)" height="96"></a> <a href="https://google.com/chrome"><img src="https://images.opencollective.com/chrome/dc55bd4/logo.png" alt="Chrome's Web Framework & Tools Performance Fund" height="96"></a> <a href="https://www.salesforce.com"><img src="https://images.opencollective.com/salesforce/ca8f997/logo.png" alt="Salesforce" height="96"></a> <a href="https://www.airbnb.com/"><img src="https://images.opencollective.com/airbnb/d327d66/logo.png" alt="Airbnb" height="96"></a> <a href="https://coinbase.com"><img src="https://avatars.githubusercontent.com/u/1885080?v=4" alt="Coinbase" height="96"></a> <a href="https://substack.com/"><img src="https://avatars.githubusercontent.com/u/53023767?v=4" alt="Substack" height="96"></a></p><h3>Silver Sponsors</h3>
290
290
  <p><a href="https://retool.com/"><img src="https://images.opencollective.com/retool/98ea68e/logo.png" alt="Retool" height="64"></a> <a href="https://liftoff.io/"><img src="https://images.opencollective.com/liftoff/5c4fa84/logo.png" alt="Liftoff" height="64"></a></p><h3>Bronze Sponsors</h3>
291
- <p><a href="https://www.crosswordsolver.org/anagram-solver/"><img src="https://images.opencollective.com/anagram-solver/2666271/logo.png" alt="Anagram Solver" height="32"></a> <a href="null"><img src="https://images.opencollective.com/bugsnag-stability-monitoring/c2cef36/logo.png" alt="Bugsnag Stability Monitoring" height="32"></a> <a href="https://mixpanel.com"><img src="https://images.opencollective.com/mixpanel/cd682f7/logo.png" alt="Mixpanel" height="32"></a> <a href="https://www.vpsserver.com"><img src="https://images.opencollective.com/vpsservercom/logo.png" alt="VPS Server" height="32"></a> <a href="https://icons8.com"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8: free icons, photos, illustrations, and music" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/7e3d9a9/logo.png" alt="Discord" height="32"></a> <a href="https://themeisle.com"><img src="https://images.opencollective.com/themeisle/d5592fe/logo.png" alt="ThemeIsle" height="32"></a> <a href="https://www.firesticktricks.com"><img src="https://images.opencollective.com/fire-stick-tricks/b8fbe2c/logo.png" alt="Fire Stick Tricks" height="32"></a> <a href="https://www.practiceignition.com"><img src="https://avatars.githubusercontent.com/u/5753491?v=4" alt="Practice Ignition" height="32"></a></p>
291
+ <p><a href="https://www.crosswordsolver.org/anagram-solver/"><img src="https://images.opencollective.com/anagram-solver/2666271/logo.png" alt="Anagram Solver" height="32"></a> <a href="null"><img src="https://images.opencollective.com/bugsnag-stability-monitoring/c2cef36/logo.png" alt="Bugsnag Stability Monitoring" height="32"></a> <a href="https://mixpanel.com"><img src="https://images.opencollective.com/mixpanel/cd682f7/logo.png" alt="Mixpanel" height="32"></a> <a href="https://www.vpsserver.com"><img src="https://images.opencollective.com/vpsservercom/logo.png" alt="VPS Server" height="32"></a> <a href="https://icons8.com"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8: free icons, photos, illustrations, and music" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://themeisle.com"><img src="https://images.opencollective.com/themeisle/d5592fe/logo.png" alt="ThemeIsle" height="32"></a> <a href="https://www.firesticktricks.com"><img src="https://images.opencollective.com/fire-stick-tricks/b8fbe2c/logo.png" alt="Fire Stick Tricks" height="32"></a> <a href="https://www.practiceignition.com"><img src="https://avatars.githubusercontent.com/u/5753491?v=4" alt="Practice Ignition" height="32"></a></p>
292
292
  <!--sponsorsend-->
293
293
 
294
294
  ## <a name="technology-sponsors"></a>Technology Sponsors
@@ -104,18 +104,18 @@ module.exports = {
104
104
  } else if (node.type === "ArrowFunctionExpression") {
105
105
 
106
106
  // `=>` token
107
- loc = context.getSourceCode().getTokenBefore(node.body, astUtils.isArrowToken).loc.start;
107
+ loc = context.getSourceCode().getTokenBefore(node.body, astUtils.isArrowToken).loc;
108
108
  } else if (
109
109
  node.parent.type === "MethodDefinition" ||
110
110
  (node.parent.type === "Property" && node.parent.method)
111
111
  ) {
112
112
 
113
113
  // Method name.
114
- loc = node.parent.key.loc.start;
114
+ loc = node.parent.key.loc;
115
115
  } else {
116
116
 
117
117
  // Function name or `function` keyword.
118
- loc = (node.id || node).loc.start;
118
+ loc = (node.id || context.getSourceCode().getFirstToken(node)).loc;
119
119
  }
120
120
 
121
121
  if (!name) {
@@ -117,7 +117,7 @@ module.exports = {
117
117
  ],
118
118
 
119
119
  messages: {
120
- unexpectedMixedOperator: "Unexpected mix of '{{leftOperator}}' and '{{rightOperator}}'."
120
+ unexpectedMixedOperator: "Unexpected mix of '{{leftOperator}}' and '{{rightOperator}}'. Use parentheses to clarify the intended order of operations."
121
121
  }
122
122
  },
123
123
 
@@ -76,8 +76,8 @@ module.exports = {
76
76
 
77
77
  fixable: "code",
78
78
  messages: {
79
- replaced: "Assignment can be replaced with operator assignment.",
80
- unexpected: "Unexpected operator assignment shorthand."
79
+ replaced: "Assignment (=) can be replaced with operator assignment ({{operator}}=).",
80
+ unexpected: "Unexpected operator assignment ({{operator}}=) shorthand."
81
81
  }
82
82
  },
83
83
 
@@ -113,6 +113,7 @@ module.exports = {
113
113
  context.report({
114
114
  node,
115
115
  messageId: "replaced",
116
+ data: { operator },
116
117
  fix(fixer) {
117
118
  if (canBeFixed(left) && canBeFixed(expr.left)) {
118
119
  const equalsToken = getOperatorToken(node);
@@ -139,7 +140,8 @@ module.exports = {
139
140
  */
140
141
  context.report({
141
142
  node,
142
- messageId: "replaced"
143
+ messageId: "replaced",
144
+ data: { operator }
143
145
  });
144
146
  }
145
147
  }
@@ -155,6 +157,7 @@ module.exports = {
155
157
  context.report({
156
158
  node,
157
159
  messageId: "unexpected",
160
+ data: { operator: node.operator },
158
161
  fix(fixer) {
159
162
  if (canBeFixed(node.left)) {
160
163
  const firstToken = sourceCode.getFirstToken(node);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint",
3
- "version": "7.30.0",
3
+ "version": "7.31.0",
4
4
  "author": "Nicholas C. Zakas <nicholas+npm@nczconsulting.com>",
5
5
  "description": "An AST-based pattern checker for JavaScript.",
6
6
  "bin": {
@@ -44,7 +44,7 @@
44
44
  "bugs": "https://github.com/eslint/eslint/issues/",
45
45
  "dependencies": {
46
46
  "@babel/code-frame": "7.12.11",
47
- "@eslint/eslintrc": "^0.4.2",
47
+ "@eslint/eslintrc": "^0.4.3",
48
48
  "@humanwhocodes/config-array": "^0.5.0",
49
49
  "ajv": "^6.10.0",
50
50
  "chalk": "^4.0.0",
@@ -103,7 +103,7 @@
103
103
  "eslint-release": "^2.0.0",
104
104
  "eslump": "^3.0.0",
105
105
  "esprima": "^4.0.1",
106
- "fs-teardown": "^0.1.0",
106
+ "fs-teardown": "0.1.1",
107
107
  "glob": "^7.1.6",
108
108
  "jsdoc": "^3.5.5",
109
109
  "karma": "^6.1.1",