Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vue-i18n (#116) #673

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions refarch-frontend/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import js from "@eslint/js";
import vueI18n from "@intlify/eslint-plugin-vue-i18n";
import vuePrettierEslintConfigSkipFormatting from "@vue/eslint-config-prettier/skip-formatting";
import vueTsEslintConfig from "@vue/eslint-config-typescript";
import { ESLint } from "eslint";
Expand All @@ -11,6 +12,7 @@ export default [
...vueTsEslintConfig({
extends: ["strict", "stylistic"],
}),
...vueI18n.configs["flat/recommended"],
vuePrettierEslintConfigSkipFormatting,
{
ignores: ["dist", "target", "node_modules", "env.d.ts"],
Expand All @@ -23,6 +25,24 @@ export default [
"kebab-case",
{ registeredComponentsOnly: false },
],
"@intlify/vue-i18n/no-raw-text": ["warn"], // encourage usage of i18n for static text
"@intlify/vue-i18n/key-format-style": ["error", "camelCase"], // enforce camelCase for message keys
"@intlify/vue-i18n/no-duplicate-keys-in-locale": ["error"],
"@intlify/vue-i18n/no-unused-keys": [
"error",
{
src: "./src",
extensions: [".ts", ".vue"],
ignores: [],
enableFix: false,
},
],
},
settings: {
"vue-i18n": {
localeDir: "./src/locales/*.yaml",
messageSyntaxVersion: "^10.0.0",
},
},
},
];
Loading
Loading