Translation resources live in packages/shared/i18n/<lang>/<ns>.json (common, errors) and ship with de and en. The web app initializes react-i18next with bundled resources (?lng= wins, then the browser language); all shell components use useTranslation and the temporary t() stub is gone. The api localizes its uniform error bodies via a minimal i18next instance negotiated from Accept-Language. `pnpm i18n:check` fails CI when any key is missing in any language, backed by tested helpers in @dorfteich/shared. Closes #5 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
34 lines
1.1 KiB
JavaScript
34 lines
1.1 KiB
JavaScript
// Repo-wide ESLint flat config. Packages inherit these rules; add
|
|
// package-specific overrides here (scoped by `files`) rather than with
|
|
// per-package config files, so rules stay consistent across the monorepo.
|
|
import js from '@eslint/js';
|
|
import tseslint from 'typescript-eslint';
|
|
import prettier from 'eslint-config-prettier';
|
|
|
|
export default tseslint.config(
|
|
{
|
|
ignores: ['**/dist/**', '**/node_modules/**', '**/coverage/**', '**/*.gen.ts'],
|
|
},
|
|
js.configs.recommended,
|
|
...tseslint.configs.recommended,
|
|
prettier,
|
|
{
|
|
// Plain-Node maintenance scripts (no TypeScript, no bundler).
|
|
files: ['scripts/**/*.mjs'],
|
|
languageOptions: {
|
|
globals: { console: 'readonly', process: 'readonly' },
|
|
},
|
|
},
|
|
{
|
|
rules: {
|
|
// Unused values are usually bugs; underscore-prefix marks intentional ones.
|
|
'@typescript-eslint/no-unused-vars': [
|
|
'error',
|
|
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
|
|
],
|
|
// `any` defeats the shared Zod/type contracts between client and server.
|
|
'@typescript-eslint/no-explicit-any': 'error',
|
|
},
|
|
},
|
|
);
|