diff --git a/lib/LocalizedStrings.js b/lib/LocalizedStrings.js index a006283..eefa6c8 100644 --- a/lib/LocalizedStrings.js +++ b/lib/LocalizedStrings.js @@ -52,9 +52,11 @@ var LocalizedStrings = function () { function LocalizedStrings(props, options) { _classCallCheck(this, LocalizedStrings); - //Compatibility fix with previous version + // Compatibility fix with previous version if (typeof options === "function") { + /* eslint-disable no-param-reassign */ options = { customLanguageInterface: options }; + /* eslint-enable */ } this._opts = _extends({}, { customLanguageInterface: utils.getInterfaceLanguage, diff --git a/src/LocalizedStrings.js b/src/LocalizedStrings.js index 77ca319..a73d8d5 100644 --- a/src/LocalizedStrings.js +++ b/src/LocalizedStrings.js @@ -29,9 +29,11 @@ export default class LocalizedStrings { * @param {Boolean} options.logsEnabled - Enable/Disable console.log outputs (default=true) */ constructor(props, options) { - //Compatibility fix with previous version + // Compatibility fix with previous version if (typeof options === "function") { + /* eslint-disable no-param-reassign */ options = { customLanguageInterface: options }; + /* eslint-enable */ } this._opts = Object.assign( {}, @@ -153,9 +155,7 @@ export default class LocalizedStrings { strings[key] = defaultStrings[key]; // eslint-disable-line no-param-reassign if (this._opts.logsEnabled) { console.log( - `🚧 👷 key '${key}' not found in localizedStrings for language ${ - this._language - } 🚧` + `🚧 👷 key '${key}' not found in localizedStrings for language ${this._language} 🚧` ); } } else if (typeof strings[key] !== "string") { @@ -267,9 +267,7 @@ export default class LocalizedStrings { } catch (ex) { if (!omitWarning && this._opts.logsEnabled) { console.log( - `No localization found for key '${key}' and language '${language}', failed on ${ - ex.message - }` + `No localization found for key '${key}' and language '${language}', failed on ${ex.message}` ); } } diff --git a/yarn.lock b/yarn.lock index cb258f5..7bf7fa5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2404,9 +2404,9 @@ set-value@^0.4.3: is-plain-object "^2.0.1" to-object-path "^0.3.0" -set-value@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274" +set-value@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" dependencies: extend-shallow "^2.0.1" is-extendable "^0.1.1"