mirror of
https://github.com/multica-ai/multica.git
synced 2026-06-16 19:29:26 +02:00
CI was running build + typecheck + test, but never lint. The i18n guardrail (eslint-plugin-i18next on packages/views/**/*.tsx) was configured but not enforced, so PRs kept landing user-facing English strings (chat session delete, project resources, mermaid fallback, invitations batch page). Changes: - .github/workflows/ci.yml: add `lint` to the turbo command - packages/eslint-config/react.js: split React rules (JSX-only) from react-hooks rules (apply to .ts too) — hooks live in .ts modules like use-agent-presence.ts, and inline-disable comments need the rule registered to resolve - Translate the 10 lint errors that surfaced: - editor/readonly-content.tsx mermaid render-error + rendering - issues/issue-detail.tsx Archive tooltip - invitations/invitations-page.tsx full page (new invite.batch.*) - invitations-page.test.tsx wrap with I18nProvider so getByRole queries match translated button labels - core/auth/utils.ts intentional control-char regex: add eslint-disable Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
33 lines
967 B
JavaScript
33 lines
967 B
JavaScript
import baseConfig from "./base.js";
|
|
import reactPlugin from "eslint-plugin-react";
|
|
import reactHooksPlugin from "eslint-plugin-react-hooks";
|
|
|
|
/** @type {import("eslint").Linter.Config[]} */
|
|
export default [
|
|
...baseConfig,
|
|
// React rules (JSX only)
|
|
{
|
|
files: ["**/*.{jsx,tsx}"],
|
|
plugins: { react: reactPlugin },
|
|
rules: {
|
|
...reactPlugin.configs.recommended.rules,
|
|
...reactPlugin.configs["jsx-runtime"].rules,
|
|
"react/prop-types": "off",
|
|
"react/no-unknown-property": "off",
|
|
},
|
|
settings: {
|
|
react: { version: "detect" },
|
|
},
|
|
},
|
|
// React Hooks rules apply to .ts files too — hooks (useEffect, useCallback,
|
|
// useMemo) can live in plain .ts modules and we want exhaustive-deps to
|
|
// run + inline disable comments to resolve.
|
|
{
|
|
files: ["**/*.{ts,tsx,js,jsx}"],
|
|
plugins: { "react-hooks": reactHooksPlugin },
|
|
rules: {
|
|
...reactHooksPlugin.configs["recommended-latest"].rules,
|
|
},
|
|
},
|
|
];
|