Skip to content

Commit 253bb00

Browse files
committed
Add editorconfig file for consistent indentation
1 parent 526030f commit 253bb00

File tree

3 files changed

+30
-8
lines changed

3 files changed

+30
-8
lines changed

.editorconfig

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
root = true
2+
3+
[*]
4+
indent_style = tab
5+
indent_size = 4
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[*.min.js]
12+
insert_final_newline = false
13+
14+
# It's not ideal to have 2 different styles, but this is just codifying what
15+
# already existed in the project.
16+
[*.{md,ts}]
17+
indent_style = space
18+
19+
# Standard style for GitHub workflow files
20+
[*.yml]
21+
indent_style = space
22+
indent_size = 2

moment-timezone-utils.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
"use strict";
99

1010
/*global define*/
11-
if (typeof module === 'object' && module.exports) {
12-
module.exports = factory(require('./')); // Node
13-
} else if (typeof define === 'function' && define.amd) {
11+
if (typeof module === 'object' && module.exports) {
12+
module.exports = factory(require('./')); // Node
13+
} else if (typeof define === 'function' && define.amd) {
1414
define(['moment'], factory); // AMD
1515
} else {
1616
factory(root.moment); // Browser
@@ -201,8 +201,8 @@
201201
if (a.population > b.population) {
202202
group.unshift(a);
203203
} else if (a.population === b.population && groupLeaders && groupLeaders[a.name]) {
204-
group.unshift(a);
205-
} else {
204+
group.unshift(a);
205+
} else {
206206
group.push(a);
207207
}
208208
foundGroup = true;

moment-timezone.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,10 @@
159159
} else if (num >= arr[len - 1]) {
160160
return -1;
161161
}
162-
162+
163163
var mid;
164164
var lo = 0;
165-
var hi = len - 1;
165+
var hi = len - 1;
166166
while (hi - lo > 1) {
167167
mid = Math.floor((lo + hi) / 2);
168168
if (arr[mid] <= num) {
@@ -173,7 +173,7 @@
173173
}
174174
return hi;
175175
}
176-
176+
177177
Zone.prototype = {
178178
_set : function (unpacked) {
179179
this.name = unpacked.name;

0 commit comments

Comments
 (0)