feat: add CI pipeline with ESLint, refactor deploy with rollback + Telegram
- 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:
@@ -197,6 +197,7 @@ export const NoteCard = memo(function NoteCard({
|
||||
const sanitizedHtml = useMemo(() => {
|
||||
if (note.type !== 'richtext' || !note.content) return ''
|
||||
if (typeof window !== 'undefined') {
|
||||
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||
return require('isomorphic-dompurify').sanitize(note.content)
|
||||
}
|
||||
return note.content
|
||||
|
||||
@@ -85,6 +85,7 @@ function VersionPreview({ entry, language }: { entry: NoteHistoryEntry; language
|
||||
<MarkdownContent content={entry.content || ''} />
|
||||
</div>
|
||||
) : isRt ? (
|
||||
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||
<div dangerouslySetInnerHTML={{ __html: require('isomorphic-dompurify').sanitize(entry.content || '') }} />
|
||||
) : (
|
||||
<pre className="whitespace-pre-wrap font-sans">{entry.content || ''}</pre>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as React from "react"
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
export interface LabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {}
|
||||
export type LabelProps = React.LabelHTMLAttributes<HTMLLabelElement>
|
||||
|
||||
export function Label({ className, ...props }: LabelProps) {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user