fix: Resolve all ESLint errors and warnings in web package
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Fixes all 542 ESLint problems in the web package to achieve 0 errors and 0 warnings. Changes: - Fixed 144 issues: nullish coalescing, return types, unused variables - Fixed 118 issues: unnecessary conditions, type safety, template literals - Fixed 79 issues: non-null assertions, unsafe assignments, empty functions - Fixed 67 issues: explicit return types, promise handling, enum comparisons - Fixed 45 final warnings: missing return types, optional chains - Fixed 25 typecheck-related issues: async/await, type assertions, formatting - Fixed JSX.Element namespace errors across 90+ files All Quality Rails violations resolved. Lint and typecheck both pass with 0 problems. Files modified: 118 components, tests, hooks, and utilities Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -10,17 +10,17 @@ interface TeamSettingsProps {
|
||||
onDelete: () => Promise<void>;
|
||||
}
|
||||
|
||||
export function TeamSettings({ team, onUpdate, onDelete }: TeamSettingsProps) {
|
||||
export function TeamSettings({ team, onUpdate, onDelete }: TeamSettingsProps): React.JSX.Element {
|
||||
const [name, setName] = useState(team.name);
|
||||
const [description, setDescription] = useState(team.description || "");
|
||||
const [description, setDescription] = useState(team.description ?? "");
|
||||
const [isEditing, setIsEditing] = useState(false);
|
||||
const [isSaving, setIsSaving] = useState(false);
|
||||
const [isDeleting, setIsDeleting] = useState(false);
|
||||
const [showDeleteConfirm, setShowDeleteConfirm] = useState(false);
|
||||
|
||||
const hasChanges = name !== team.name || description !== (team.description || "");
|
||||
const hasChanges = name !== team.name || description !== (team.description ?? "");
|
||||
|
||||
const handleSave = async () => {
|
||||
const handleSave = async (): Promise<void> => {
|
||||
if (!hasChanges) return;
|
||||
|
||||
setIsSaving(true);
|
||||
@@ -29,7 +29,7 @@ export function TeamSettings({ team, onUpdate, onDelete }: TeamSettingsProps) {
|
||||
if (name !== team.name) {
|
||||
updates.name = name;
|
||||
}
|
||||
if (description !== (team.description || "")) {
|
||||
if (description !== (team.description ?? "")) {
|
||||
updates.description = description;
|
||||
}
|
||||
await onUpdate(updates);
|
||||
@@ -42,13 +42,13 @@ export function TeamSettings({ team, onUpdate, onDelete }: TeamSettingsProps) {
|
||||
}
|
||||
};
|
||||
|
||||
const handleCancel = () => {
|
||||
const handleCancel = (): void => {
|
||||
setName(team.name);
|
||||
setDescription(team.description || "");
|
||||
setDescription(team.description ?? "");
|
||||
setIsEditing(false);
|
||||
};
|
||||
|
||||
const handleDelete = async () => {
|
||||
const handleDelete = async (): Promise<void> => {
|
||||
setIsDeleting(true);
|
||||
try {
|
||||
await onDelete();
|
||||
|
||||
Reference in New Issue
Block a user