Skip to content
This repository was archived by the owner on Apr 14, 2021. It is now read-only.

Commit 41e1bb2

Browse files
committed
improving linting configuration
1 parent 8c2b349 commit 41e1bb2

File tree

6 files changed

+16
-11
lines changed

6 files changed

+16
-11
lines changed

Gruntfile.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,12 @@ module.exports = function (grunt) {
5454
},
5555

5656
jshint: {
57-
all: ['index.js', 'src/*.js', '*.json']
57+
options: {
58+
eqeqeq: true
59+
},
60+
src: ['src/*.js'],
61+
node: ['index.js', '*.json'],
62+
build: ['tasks/**/*.js']
5863
},
5964

6065
bundle_jsnext: {

dist/Intl.complete.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/Intl.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/Intl.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/Intl.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ function /* 6.2.3 */CanonicalizeLanguageTag (locale) {
292292
parts[i] = parts[i].charAt(0).toUpperCase() + parts[i].slice(1);
293293

294294
// Is it a singleton?
295-
else if (parts[i].length === 1 && parts[i] != 'x')
295+
else if (parts[i].length === 1 && parts[i] !== 'x')
296296
break;
297297
}
298298
locale = arrJoin.call(parts, '-');
@@ -489,7 +489,7 @@ function /* 9.2.2 */BestAvailableLocale (availableLocales, locale) {
489489

490490
// c. If pos ≥ 2 and the character "-" occurs at index pos-2 of candidate,
491491
// then decrease pos by 2.
492-
if (pos >= 2 && candidate.charAt(pos - 2) == '-')
492+
if (pos >= 2 && candidate.charAt(pos - 2) === '-')
493493
pos -= 2;
494494

495495
// d. Let candidate be the substring of candidate from position 0, inclusive,
@@ -2746,7 +2746,7 @@ function addLocaleData (data, tag) {
27462746
parts = tag.split('-');
27472747

27482748
// Create fallbacks for locale data with scripts, e.g. Latn, Hans, Vaii, etc
2749-
if (parts.length > 2 && parts[1].length == 4)
2749+
if (parts.length > 2 && parts[1].length === 4)
27502750
arrPush.call(locales, parts[0] + '-' + parts[2]);
27512751

27522752
while (locale = arrShift.call(locales)) {

0 commit comments

Comments
 (0)