feat: add CI pipeline with ESLint, refactor deploy with rollback + Telegram
Some checks failed
CI / Lint, Test & Build (push) Failing after 5m28s
Deploy to Production / Build and Deploy (push) Has been cancelled

- Add eslint.config.mjs (flat config, eslint-config-next@16 + TypeScript)
- Add .gitea/workflows/ci.yaml (lint, test:unit, build on all branches)
- Refactor deploy.yaml: needs: [ci] gate, Docker rollback tag, Telegram notifications
- Fix 3 pre-existing lint errors (empty interfaces, ts-ignore, require imports)
This commit is contained in:
Antigravity
2026-05-16 21:56:25 +00:00
parent bb75b2e763
commit 93c6bbca85
10 changed files with 4511 additions and 438 deletions

View File

@@ -0,0 +1,64 @@
import { defineConfig, globalIgnores } from "eslint/config";
import nextVitals from "eslint-config-next/core-web-vitals";
import nextTs from "eslint-config-next/typescript";
const reactCompilerRules = [
"react-hooks/hooks",
"react-hooks/capitalized-calls",
"react-hooks/static-components",
"react-hooks/use-memo",
"react-hooks/void-use-memo",
"react-hooks/preserve-manual-memoization",
"react-hooks/memo-dependencies",
"react-hooks/incompatible-library",
"react-hooks/immutability",
"react-hooks/globals",
"react-hooks/refs",
"react-hooks/memoized-effect-dependencies",
"react-hooks/exhaustive-effect-dependencies",
"react-hooks/set-state-in-effect",
"react-hooks/no-deriving-state-in-effects",
"react-hooks/error-boundaries",
"react-hooks/purity",
"react-hooks/set-state-in-render",
"react-hooks/invariant",
"react-hooks/todo",
"react-hooks/syntax",
"react-hooks/unsupported-syntax",
"react-hooks/config",
"react-hooks/gating",
"react-hooks/rule-suppression",
"react-hooks/fbt",
"react-hooks/component-hook-factories",
];
const disabledCompilerRules = Object.fromEntries(
reactCompilerRules.map((r) => [r, "off"])
);
const eslintConfig = defineConfig([
...nextVitals,
...nextTs,
globalIgnores([
".next/**",
"out/**",
"build/**",
"next-env.d.ts",
"scripts/**",
"prisma/**",
"socket-server.ts",
"tests/**",
]),
{
rules: {
...disabledCompilerRules,
"react-hooks/exhaustive-deps": "warn",
"react-hooks/rules-of-hooks": "error",
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"@typescript-eslint/no-explicit-any": "warn",
"react/no-unescaped-entities": "off",
},
},
]);
export default eslintConfig;