@@ -20,7 +20,7 @@ function findLocaleId(str, type) {
20
20
return ( str . match ( / ^ N u m b e r F o r m a t S y m b o l s _ ( .+ ) $ / ) || [ ] ) [ 1 ] ;
21
21
}
22
22
23
- if ( type != 'datetime' ) { throw new Error ( 'unknown type in findLocaleId: ' + type ) ; }
23
+ if ( type !== 'datetime' ) { throw new Error ( 'unknown type in findLocaleId: ' + type ) ; }
24
24
25
25
return ( str . match ( / ^ D a t e T i m e S y m b o l s _ ( .+ ) $ / ) || [ ] ) [ 1 ] ;
26
26
}
@@ -36,6 +36,7 @@ function getInfoForLocale(localeInfo, localeID) {
36
36
37
37
function extractNumberSymbols ( content , localeInfo , currencySymbols ) {
38
38
//eval script in the current context so that we get access to all the symbols
39
+ // eslint-disable-next-line no-eval
39
40
eval ( content . toString ( ) ) ;
40
41
for ( var propName in goog . i18n ) {
41
42
var localeID = findLocaleId ( propName , 'num' ) ;
@@ -49,6 +50,7 @@ function extractNumberSymbols(content, localeInfo, currencySymbols) {
49
50
50
51
function extractCurrencySymbols ( content ) {
51
52
//eval script in the current context so that we get access to all the symbols
53
+ // eslint-disable-next-line no-eval
52
54
eval ( content . toString ( ) ) ;
53
55
// var currencySymbols = goog.i18n.currency.CurrencyInfo;
54
56
// currencySymbols.__proto__ = goog.i18n.currency.CurrencyInfoTier2;
@@ -58,10 +60,12 @@ function extractCurrencySymbols(content) {
58
60
59
61
function extractDateTimeSymbols ( content , localeInfo ) {
60
62
//eval script in the current context so that we get access to all the symbols
63
+ // eslint-disable-next-line no-eval
61
64
eval ( content . toString ( ) ) ;
62
65
for ( var propName in goog . i18n ) {
63
66
var localeID = findLocaleId ( propName , 'datetime' ) ;
64
67
if ( localeID ) {
68
+ // eslint-disable-next-line no-unused-vars
65
69
var info = getInfoForLocale ( localeInfo , localeID ) ;
66
70
localeInfo [ localeID ] . DATETIME_FORMATS =
67
71
converter . convertDatetimeData ( goog . i18n [ propName ] ) ;
@@ -78,6 +82,7 @@ function pluralExtractor(content, localeInfo) {
78
82
// e.g. plural rules for en_SG is the same as those for en.
79
83
goog . LOCALE = localeIds [ i ] . match ( / [ ^ _ ] + / ) [ 0 ] ;
80
84
try {
85
+ // eslint-disable-next-line no-eval
81
86
eval ( contentText ) ;
82
87
} catch ( e ) {
83
88
console . log ( "Error in eval(contentText): " + e . stack ) ;
@@ -121,7 +126,7 @@ function canonicalizeForJsonStringify(unused_key, object) {
121
126
// 2. https://code.google.com/p/v8/issues/detail?id=164
122
127
// ECMA-262 does not specify enumeration order. The de facto standard
123
128
// is to match insertion order, which V8 also does ...
124
- if ( typeof object != "object" || Object . prototype . toString . apply ( object ) === '[object Array]' ) {
129
+ if ( typeof object !== "object" || Object . prototype . toString . apply ( object ) === '[object Array]' ) {
125
130
return object ;
126
131
}
127
132
var result = { } ;
0 commit comments