Skip to content

Commit 2106782

Browse files
committed
* Import list of locales from another file
1 parent efe709c commit 2106782

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

eslint.config.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ import js from '@eslint/js'
1111
import { FlatCompat } from '@eslint/eslintrc'
1212
import { fixupConfigRules } from '@eslint/compat'
1313

14+
const { default: activeLocales } =
15+
await import('./static/locales/activeLocales.json', { with: { type: 'json' } })
16+
1417
const __filename = fileURLToPath(import.meta.url)
1518
const __dirname = path.dirname(__filename)
1619
const compat = new FlatCompat({
@@ -56,7 +59,7 @@ export default [
5659

5760
settings: {
5861
'vue-i18n': {
59-
localeDir: './static/locales/{en-US,en-GB,ar,bg,ca,cs,da,de-DE,el,es,es-AR,es-MX,et,eu,fa,fi,fr-FR,gl,he,hu,hr,id,is,it,ja,ko,lt,nb-NO,nl,nn,pl,pt,pt-BR,pt-PT,ro,ru,sk,sl,sr,sv,tr,uk,vi,zh-CN,zh-TW}.yaml',
62+
localeDir: `./static/locales/{${activeLocales.join(',')}}.yaml`,
6063
messageSyntaxVersion: '^8.0.0',
6164
},
6265
},

0 commit comments

Comments
 (0)