CI/CD Pipeline Improvement - Add automated rollback on deployment failure and Telegram notifications for CI/deploy status. Changes: - scripts/deploy-prod.sh: Add rollback_save_image(), rollback_restore_image(), and telegram_notify() functions - scripts/deploy-prod.sh: Save current Docker image before building new one - scripts/deploy-prod.sh: Rollback to previous image on health check failure - .gitea/workflows/ci.yaml: Add Telegram notifications for CI failures - memento-note/eslint.config.mjs: Disable experimental React Compiler rules Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
72 lines
2.2 KiB
JavaScript
72 lines
2.2 KiB
JavaScript
import { createRequire } from "module";
|
|
import { defineConfig, globalIgnores } from "eslint/config";
|
|
|
|
const require = createRequire(import.meta.url);
|
|
|
|
// Manually configure Next.js ESLint without React Compiler plugin
|
|
const nextWebVitals = require("eslint-config-next/core-web-vitals");
|
|
const nextTypeScript = require("eslint-config-next/typescript");
|
|
|
|
// React Compiler rules to disable (from eslint-plugin-react-hooks v5+)
|
|
// See: https://react.dev/learn/react-compiler
|
|
const reactCompilerRules = {
|
|
"react-hooks/hooks": "off",
|
|
"react-hooks/capitalized-calls": "off",
|
|
"react-hooks/static-components": "off",
|
|
"react-hooks/use-memo": "off",
|
|
"react-hooks/void-use-memo": "off",
|
|
"react-hooks/preserve-manual-memoization": "off",
|
|
"react-hooks/memo-dependencies": "off",
|
|
"react-hooks/incompatible-library": "off",
|
|
"react-hooks/immutability": "off",
|
|
"react-hooks/globals": "off",
|
|
"react-hooks/refs": "off",
|
|
"react-hooks/memoized-effect-dependencies": "off",
|
|
"react-hooks/exhaustive-effect-dependencies": "off",
|
|
"react-hooks/set-state-in-effect": "off",
|
|
"react-hooks/no-deriving-state-in-effects": "off",
|
|
"react-hooks/error-boundaries": "off",
|
|
"react-hooks/purity": "off",
|
|
"react-hooks/set-state-in-render": "off",
|
|
"react-hooks/invariant": "off",
|
|
"react-hooks/todo": "off",
|
|
"react-hooks/syntax": "off",
|
|
"react-hooks/unsupported-syntax": "off",
|
|
"react-hooks/config": "off",
|
|
"react-hooks/gating": "off",
|
|
"react-hooks/rule-suppression": "off",
|
|
"react-hooks/fbt": "off",
|
|
"react-hooks/component-hook-factories": "off",
|
|
};
|
|
|
|
const eslintConfig = defineConfig([
|
|
...nextWebVitals,
|
|
...nextTypeScript,
|
|
globalIgnores([
|
|
".next/**",
|
|
".venv-i18n/**",
|
|
"out/**",
|
|
"build/**",
|
|
"next-env.d.ts",
|
|
"scripts/**",
|
|
"prisma/**",
|
|
"socket-server.ts",
|
|
"tests/**",
|
|
]),
|
|
{
|
|
rules: {
|
|
...reactCompilerRules,
|
|
"react-hooks/rules-of-hooks": "error",
|
|
"@typescript-eslint/no-unused-vars": "off",
|
|
"@typescript-eslint/no-explicit-any": "off",
|
|
"react/no-unescaped-entities": "off",
|
|
"@next/next/no-img-element": "off",
|
|
"jsx-a11y/role-has-required-aria-props": "off",
|
|
"@typescript-eslint/no-unused-expressions": "off",
|
|
"prefer-const": "error",
|
|
},
|
|
},
|
|
]);
|
|
|
|
export default eslintConfig;
|