diff options
author | dan <dan.abramov@gmail.com> | 2024-06-18 17:27:40 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-18 17:27:40 +0300 |
commit | 08cfb0958907408933982ece4a16d59625b423b0 (patch) | |
tree | ce99de75c36d26f03affd6c6163feab0263c311a /eslint | |
parent | f142339e0638aaa8b2d6297fec536eff08dab539 (diff) | |
download | voidsky-08cfb0958907408933982ece4a16d59625b423b0.tar.zst |
Unconditionally polyfill Intl.PluralRules for native (#4554)
* Revert "Fix Android startup perf regression (#4544)" This reverts commit e6213d7aa56faa6994a27bf127c63ded69e67d6f. * Force polyfill
Diffstat (limited to 'eslint')
-rw-r--r-- | eslint/index.js | 1 | ||||
-rw-r--r-- | eslint/keep-i18n-patch-in-sync.js | 28 |
2 files changed, 0 insertions, 29 deletions
diff --git a/eslint/index.js b/eslint/index.js index cb6291d79..cf5d41225 100644 --- a/eslint/index.js +++ b/eslint/index.js @@ -2,7 +2,6 @@ module.exports = { rules: { - 'keep-i18n-patch-in-sync': require('./keep-i18n-patch-in-sync'), 'avoid-unwrapped-text': require('./avoid-unwrapped-text'), 'use-exact-imports': require('./use-exact-imports'), 'use-typed-gates': require('./use-typed-gates'), diff --git a/eslint/keep-i18n-patch-in-sync.js b/eslint/keep-i18n-patch-in-sync.js deleted file mode 100644 index ee183a5c6..000000000 --- a/eslint/keep-i18n-patch-in-sync.js +++ /dev/null @@ -1,28 +0,0 @@ -/* eslint-disable bsky-internal/keep-i18n-patch-in-sync */ -const LOCALE_DATA_FOLDER = '@formatjs/intl-pluralrules/locale-data/' -const GEN_MODULE_PATH = - '@formatjs/intl-pluralrules/supported-locales.generated.js' - -exports.create = function create(context) { - delete require.cache[require.resolve(GEN_MODULE_PATH)] - const {supportedLocales} = require(GEN_MODULE_PATH) - return { - Literal(node) { - if (typeof node.value !== 'string') { - return - } - if (!node.value.startsWith(LOCALE_DATA_FOLDER)) { - return - } - const code = node.value.slice(LOCALE_DATA_FOLDER.length) - if (!supportedLocales.includes(code)) { - context.report({ - node, - message: - 'Edit .patches/@formatjs+intl-pluralrules+XXX.patch to include ' + - code, - }) - } - }, - } -} |