From 69ab42e703e89825477c9b3d32bb25ee70061d39 Mon Sep 17 00:00:00 2001 From: Rafael Xavier de Souza Date: Wed, 5 Aug 2020 09:18:14 -0300 Subject: [PATCH] Packages: Add eslint:fix --- build/compare-size.js | 4 ++-- package.json | 1 + src/core/remove_likely_subtags.js | 10 ++++++++-- src/item/lookup.js | 4 ++-- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/build/compare-size.js b/build/compare-size.js index 2d60d93..145e24c 100644 --- a/build/compare-size.js +++ b/build/compare-size.js @@ -260,8 +260,8 @@ function compareSizes(task) { // Obtain the current branch and continue... helpers.git_status(function(err, status) { var prefixes = compressors ? [""].concat(Object.keys(compressors)) : [""], - commonHeader = prefixes.map( - (label, i) => (i === 0 && compressors ? "raw" : label) + commonHeader = prefixes.map((label, i) => + i === 0 && compressors ? "raw" : label ); const tableOptions = { diff --git a/package.json b/package.json index cf4e181..29bdd27 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "build:all": "npm run build:dist && npm run build:esm", "validate": "npm run compare_size && npm run dco", "lint": "eslint src test build", + "lint:fix": "eslint --fix src test build", "prettier": "prettier --write '{src,test,build}/**/*.js'", "compare_size": "node build/compare-size.js", "dco": "node build/dco.js", diff --git a/src/core/remove_likely_subtags.js b/src/core/remove_likely_subtags.js index 13b6db7..ffb41bb 100644 --- a/src/core/remove_likely_subtags.js +++ b/src/core/remove_likely_subtags.js @@ -25,8 +25,14 @@ export default function(Cldr, cldr, maxLanguageId) { matchFound = arraySome( [ [[language, "Zzzz", "ZZ"], [language]], - [[language, "Zzzz", territory], [language, territory]], - [[language, script, "ZZ"], [language, script]] + [ + [language, "Zzzz", territory], + [language, territory] + ], + [ + [language, script, "ZZ"], + [language, script] + ] ], function(test) { var result = coreLikelySubtags(Cldr, cldr, test[0]); diff --git a/src/item/lookup.js b/src/item/lookup.js index 5bdd279..5c271e7 100644 --- a/src/item/lookup.js +++ b/src/item/lookup.js @@ -6,7 +6,7 @@ import jsonMerge from "../util/json/merge"; var lookup; -export default (lookup = function(Cldr, locale, path, attributes, childLocale) { +export default lookup = function(Cldr, locale, path, attributes, childLocale) { var normalizedPath, parent, value; // 1: Finish recursion @@ -47,4 +47,4 @@ export default (lookup = function(Cldr, locale, path, attributes, childLocale) { } return value; -}); +};