* basic i18n * tweak * translate app * add linting to make sure we have translations * run linter on pr * format
38 lines
820 B
JavaScript
38 lines
820 B
JavaScript
import i18next from "eslint-plugin-i18next";
|
|
import tsParser from "@typescript-eslint/parser";
|
|
|
|
export default [
|
|
{
|
|
files: ["src/**/*.{ts,tsx}"],
|
|
languageOptions: {
|
|
parser: tsParser,
|
|
parserOptions: {
|
|
ecmaFeatures: {
|
|
jsx: true,
|
|
},
|
|
},
|
|
},
|
|
plugins: {
|
|
i18next,
|
|
},
|
|
rules: {
|
|
// Catch text in JSX that should be translated
|
|
"i18next/no-literal-string": [
|
|
"error",
|
|
{
|
|
markupOnly: true, // Only check JSX content, not all strings
|
|
ignoreAttribute: [
|
|
"className",
|
|
"style",
|
|
"type",
|
|
"id",
|
|
"name",
|
|
"key",
|
|
"data-*",
|
|
"aria-*",
|
|
], // Ignore common non-translatable attributes
|
|
},
|
|
],
|
|
},
|
|
},
|
|
];
|