From 6a3dc40c31c92c906441e759a4d6f7eb7043182b Mon Sep 17 00:00:00 2001 From: dakkar Date: Sun, 20 Oct 2024 11:53:02 +0100 Subject: [PATCH] lint translations in embeds, too --- packages/frontend-embed/eslint.config.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/frontend-embed/eslint.config.js b/packages/frontend-embed/eslint.config.js index 2d617b3ade..f3fc59d288 100644 --- a/packages/frontend-embed/eslint.config.js +++ b/packages/frontend-embed/eslint.config.js @@ -4,6 +4,8 @@ import parser from 'vue-eslint-parser'; import pluginVue from 'eslint-plugin-vue'; import pluginMisskey from '@misskey-dev/eslint-plugin'; import sharedConfig from '../shared/eslint.config.js'; +import localeRule from '../../eslint/locale.js'; +import { build as buildLocales } from '../../locales/index.js'; export default [ ...sharedConfig, @@ -14,6 +16,7 @@ export default [ ...pluginVue.configs['flat/recommended'], { files: ['{src,test,js,@types}/**/*.{ts,vue}'], + plugins: { sharkey: { rules: { locale: localeRule } } }, languageOptions: { globals: { ...Object.fromEntries(Object.entries(globals.node).map(([key]) => [key, 'off'])), @@ -44,6 +47,8 @@ export default [ }, }, rules: { + 'sharkey/locale': ['error', buildLocales()['ja-JP']], + '@typescript-eslint/no-empty-interface': ['error', { allowSingleExtends: true, }],