Fix linter errors
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
'use client';
|
||||
|
||||
import { useState, useEffect } from 'react';
|
||||
import { useState } from 'react';
|
||||
import { api } from '~/trpc/react';
|
||||
|
||||
export function RepoStatusButton() {
|
||||
@@ -23,7 +23,7 @@ export function RepoStatusButton() {
|
||||
if (data.success) {
|
||||
// Refetch status after successful update
|
||||
setTimeout(() => {
|
||||
refetchStatus();
|
||||
void refetchStatus();
|
||||
}, 1000);
|
||||
|
||||
// Clear message after 5 seconds for success
|
||||
@@ -90,7 +90,7 @@ export function RepoStatusButton() {
|
||||
</div>
|
||||
{repoStatus?.isRepo && (
|
||||
<div className="text-sm text-gray-500">
|
||||
Branch: {repoStatus.branch || 'unknown'} |
|
||||
Branch: {repoStatus.branch ?? 'unknown'} |
|
||||
Last commit: {repoStatus.lastCommit ? repoStatus.lastCommit.substring(0, 8) : 'unknown'}
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -102,7 +102,7 @@ export class GitManager {
|
||||
// Step 2: npm install
|
||||
steps.push('📦 Installing/updating dependencies...');
|
||||
try {
|
||||
const { stdout, stderr } = await execAsync('npm install', { cwd: this.repoPath });
|
||||
const { stderr } = await execAsync('npm install', { cwd: this.repoPath });
|
||||
if (stderr && !stderr.includes('npm WARN')) {
|
||||
console.warn('npm install warnings:', stderr);
|
||||
}
|
||||
@@ -120,7 +120,7 @@ export class GitManager {
|
||||
// Step 3: Build the application
|
||||
steps.push('🔨 Building application...');
|
||||
try {
|
||||
const { stdout, stderr } = await execAsync('npm run build', { cwd: this.repoPath });
|
||||
const { stderr } = await execAsync('npm run build', { cwd: this.repoPath });
|
||||
if (stderr && !stderr.includes('npm WARN')) {
|
||||
console.warn('npm build warnings:', stderr);
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ export class GitHubJsonService {
|
||||
try {
|
||||
const script = await this.downloadJsonFile(`${this.jsonFolder}/${slug}.json`);
|
||||
return script;
|
||||
} catch (error) {
|
||||
} catch {
|
||||
console.log(`Script ${slug} not found in repository`);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ export class LocalScriptsService {
|
||||
try {
|
||||
const content = await readFile(filePath, 'utf-8');
|
||||
return JSON.parse(content) as Script;
|
||||
} catch (fileError) {
|
||||
} catch {
|
||||
// If file doesn't exist, return null instead of throwing
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user