Handy/eslint.config.js
CJ Pais f87051f464
Add Internationalization Support (#437)
* basic i18n

* tweak

* translate app

* add linting to make sure we have translations

* run linter on pr

* format
2025-12-12 11:16:54 +07:00

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
},
],
},
},
];