eslint 6.7.0 → 6.7.1
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 +5 -0
- package/README.md +9 -9
- package/lib/rules/key-spacing.js +2 -28
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
v6.7.1 - November 24, 2019
|
2
|
+
|
3
|
+
* [`dd1e9f4`](https://github.com/eslint/eslint/commit/dd1e9f4df2103c43509a54b0ad5f9106557997f9) Fix: revert changes to key-spacing due to regression (#12598) (Kai Cataldo)
|
4
|
+
* [`c644b54`](https://github.com/eslint/eslint/commit/c644b5429e5bc8a050afd70c99ec82035eb611fa) Docs: Update README team and sponsors (ESLint Jenkins)
|
5
|
+
|
1
6
|
v6.7.0 - November 22, 2019
|
2
7
|
|
3
8
|
* [`312a88f`](https://github.com/eslint/eslint/commit/312a88f2230082d898b7d8d82f8af63cb352e55a) New: Add grouped-accessor-pairs rule (fixes #12277) (#12331) (Milos Djermanovic)
|
package/README.md
CHANGED
@@ -206,9 +206,9 @@ Brandon Mills
|
|
206
206
|
Toru Nagashima
|
207
207
|
</a>
|
208
208
|
</td><td align="center" valign="top" width="11%">
|
209
|
-
<a href="https://github.com/
|
210
|
-
<img src="https://github.com/
|
211
|
-
|
209
|
+
<a href="https://github.com/kaicataldo">
|
210
|
+
<img src="https://github.com/kaicataldo.png?s=75" width="75" height="75"><br />
|
211
|
+
Kai Cataldo
|
212
212
|
</a>
|
213
213
|
</td><td align="center" valign="top" width="11%">
|
214
214
|
<a href="https://github.com/not-an-aardvark">
|
@@ -223,11 +223,6 @@ Teddy Katz
|
|
223
223
|
The people who review and implement new features.
|
224
224
|
|
225
225
|
<table><tbody><tr><td align="center" valign="top" width="11%">
|
226
|
-
<a href="https://github.com/kaicataldo">
|
227
|
-
<img src="https://github.com/kaicataldo.png?s=75" width="75" height="75"><br />
|
228
|
-
Kai Cataldo
|
229
|
-
</a>
|
230
|
-
</td><td align="center" valign="top" width="11%">
|
231
226
|
<a href="https://github.com/aladdin-add">
|
232
227
|
<img src="https://github.com/aladdin-add.png?s=75" width="75" height="75"><br />
|
233
228
|
薛定谔的猫
|
@@ -242,6 +237,11 @@ Kai Cataldo
|
|
242
237
|
The people who review and fix bugs and help triage issues.
|
243
238
|
|
244
239
|
<table><tbody><tr><td align="center" valign="top" width="11%">
|
240
|
+
<a href="https://github.com/gyandeeps">
|
241
|
+
<img src="https://github.com/gyandeeps.png?s=75" width="75" height="75"><br />
|
242
|
+
Gyandeep Singh
|
243
|
+
</a>
|
244
|
+
</td><td align="center" valign="top" width="11%">
|
245
245
|
<a href="https://github.com/g-plane">
|
246
246
|
<img src="https://github.com/g-plane.png?s=75" width="75" height="75"><br />
|
247
247
|
Pig Fang
|
@@ -265,7 +265,7 @@ The following companies, organizations, and individuals support ESLint's ongoing
|
|
265
265
|
<h3>Gold Sponsors</h3>
|
266
266
|
<p><a href="https://www.shopify.com"><img src="https://images.opencollective.com/shopify/eeb91aa/logo.png" alt="Shopify" height="96"></a> <a href="http://engineering.salesforce.com"><img src="https://images.opencollective.com/salesforce/ca8f997/logo.png" alt="Salesforce" height="96"></a> <a href="https://badoo.com/team?utm_source=eslint"><img src="https://images.opencollective.com/badoo/2826a3b/logo.png" alt="Badoo" 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://opensource.facebook.com"><img src="https://images.opencollective.com/fbopensource/fbb8a5b/logo.png" alt="Facebook Open Source" height="96"></a></p><h3>Silver Sponsors</h3>
|
267
267
|
<p><a href="https://www.ampproject.org/"><img src="https://images.opencollective.com/amp/c8a3b25/logo.png" alt="AMP Project" height="64"></a></p><h3>Bronze Sponsors</h3>
|
268
|
-
<p><a href="https://
|
268
|
+
<p><a href="https://www.bugsnag.com/platforms?utm_source=Open Collective&utm_medium=Website&utm_content=open-source&utm_campaign=2019-community&utm_term="><img src="https://images.opencollective.com/bugsnag-stability-monitoring/c2cef36/logo.png" alt="Bugsnag Stability Monitoring" height="32"></a> <a href="https://www.crosswordsolver.com"><img src="https://images.opencollective.com/crosswordsolver/d4481d6/logo.png" alt="Crosswordsolver" height="32"></a> <a href="https://www.codacy.com/?utm_source=eslint&utm_medium=cpm&utm_campaign=eslint-sponsorship"><img src="https://images.opencollective.com/codacy/ed22716/logo.png" alt="Codacy" 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/0b37d14/logo.png" alt="Free Icons by Icons8" height="32"></a> <a href="https://uxplanet.org/top-ui-ux-design-agencies-user-experience-firms-8c54697e290"><img src="https://images.opencollective.com/ui-ux-design-agencies/cae5dfe/logo.png" alt="UI UX Design Agencies" height="32"></a> <a href="https://clay.global"><img src="https://images.opencollective.com/clayglobal/2468f34/logo.png" alt="clay" height="32"></a> <a href="https://discordapp.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/logo.png" alt="ThemeIsle" height="32"></a> <a href="https://tekhattan.com"><img src="https://images.opencollective.com/tekhattan/bc73c28/logo.png" alt="TekHattan" height="32"></a> <a href="https://www.marfeel.com/"><img src="https://images.opencollective.com/marfeel/4b88e30/logo.png" alt="Marfeel" height="32"></a> <a href="http://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://jsheroes.io/"><img src="https://images.opencollective.com/jsheroes1/9fedf0b/logo.png" alt="JSHeroes " height="32"></a></p>
|
269
269
|
<!--sponsorsend-->
|
270
270
|
|
271
271
|
## <a name="technology-sponsors"></a>Technology Sponsors
|
package/lib/rules/key-spacing.js
CHANGED
@@ -42,30 +42,6 @@ function isSingleLine(node) {
|
|
42
42
|
return (node.loc.end.line === node.loc.start.line);
|
43
43
|
}
|
44
44
|
|
45
|
-
/**
|
46
|
-
* Checks whether both nodes are on the same line.
|
47
|
-
* @param {ASTNode} nodeA AST Node being evaluated.
|
48
|
-
* @param {ASTNode} nodeB AST Node being evaluated.
|
49
|
-
* @returns {boolean} True if both nodes are on the same line.
|
50
|
-
*/
|
51
|
-
function isOnSameLine(nodeA, nodeB) {
|
52
|
-
return (nodeA.loc.end.line === nodeB.loc.end.line);
|
53
|
-
}
|
54
|
-
|
55
|
-
/**
|
56
|
-
* Checks whether the properties of a node on the same line.
|
57
|
-
* @param {ASTNode} node node
|
58
|
-
* @returns {boolean} True if the properties of a node are on the same line.
|
59
|
-
*/
|
60
|
-
function isPropertiesOnSameLine(node) {
|
61
|
-
if (node.properties.length <= 1) {
|
62
|
-
return true;
|
63
|
-
}
|
64
|
-
const [firstProperty] = node.properties;
|
65
|
-
|
66
|
-
return node.properties.every(property => isOnSameLine(firstProperty, property));
|
67
|
-
}
|
68
|
-
|
69
45
|
/**
|
70
46
|
* Initializes a single option property from the configuration with defaults for undefined values
|
71
47
|
* @param {Object} toOptions Object to be initialized
|
@@ -654,7 +630,7 @@ module.exports = {
|
|
654
630
|
|
655
631
|
return {
|
656
632
|
ObjectExpression(node) {
|
657
|
-
if (isSingleLine(node)
|
633
|
+
if (isSingleLine(node)) {
|
658
634
|
verifyListSpacing(node.properties.filter(isKeyValueProperty));
|
659
635
|
} else {
|
660
636
|
verifyAlignment(node);
|
@@ -667,9 +643,7 @@ module.exports = {
|
|
667
643
|
// Obey beforeColon and afterColon in each property as configured
|
668
644
|
return {
|
669
645
|
Property(node) {
|
670
|
-
|
671
|
-
|
672
|
-
verifySpacing(node, option);
|
646
|
+
verifySpacing(node, isSingleLine(node.parent) ? singleLineOptions : multiLineOptions);
|
673
647
|
}
|
674
648
|
};
|
675
649
|
|