🐛 Fix(custom): fix an issue eslint not worked as expected

This commit is contained in:
Kuingsmile
2025-12-30 13:20:28 +08:00
parent 4fb5a26270
commit b53eccce13
185 changed files with 8014 additions and 7627 deletions

View File

@@ -42,8 +42,8 @@ function bootstrapEPIPESuppression() {
bootstrapEPIPESuppression()
function epipeBomb(stream: any, callback: any) {
if (stream == null) stream = process.stdout
if (callback == null) callback = process.exit
if (stream === null) stream = process.stdout
if (callback === null) callback = process.exit
function epipeFilter(err: any) {
if (err.code === 'EPIPE') return callback()

View File

@@ -62,7 +62,7 @@ const handleStartUpFiles = (argv: string[], cwd: string) => {
updater.autoUpdater.setFeedURL({
provider: 'generic',
url: 'https://release.piclist.cn/latest',
channel: 'latest'
channel: 'latest',
})
updater.autoUpdater.autoDownload = false
@@ -101,13 +101,13 @@ updater.autoUpdater.on('update-available', async (info: updater.UpdateInfo) => {
buttons: ['Yes', 'Go to download page'],
message:
$t('TIPS_FIND_NEW_VERSION', {
v: info.version
v: info.version,
}) +
'\n\n' +
displayLog +
truncatedNote,
checkboxLabel: $t('NO_MORE_NOTICE'),
checkboxChecked: false
checkboxChecked: false,
})
.then(result => {
if (result.response === 0) {
@@ -124,7 +124,7 @@ updater.autoUpdater.on('update-available', async (info: updater.UpdateInfo) => {
updater.autoUpdater.on('download-progress', progressObj => {
const percent = {
progress: progressObj.percent
progress: progressObj.percent,
}
const window = windowManager.get(IWindowList.SETTING_WINDOW)!
window.webContents.send('updateProgress', percent)
@@ -136,7 +136,7 @@ updater.autoUpdater.on('update-downloaded', () => {
type: 'info',
title: $t('UPDATE_DOWNLOADED'),
buttons: ['Yes', 'No'],
message: $t('TIPS_UPDATE_DOWNLOADED')
message: $t('TIPS_UPDATE_DOWNLOADED'),
})
.then(result => {
const window = windowManager.get(IWindowList.SETTING_WINDOW)!
@@ -243,7 +243,7 @@ class LifeCycle {
miniWindow.setPosition(width - miniWindow.getSize()[0], height - miniWindow.getSize()[1])
db.set(configPaths.settings.miniWindowPosition, [
width - miniWindow.getSize()[0],
height - miniWindow.getSize()[1]
height - miniWindow.getSize()[1],
])
} else {
miniWindow.setPosition(lastPosition[0], lastPosition[1])
@@ -297,7 +297,7 @@ class LifeCycle {
.then(actualAutoStartEnabled => {
if (actualAutoStartEnabled !== storedAutoStartEnabled) {
logger.warn(
`Auto-start state mismatch detected. Stored: ${storedAutoStartEnabled}, Actual: ${actualAutoStartEnabled}. Syncing...`
`Auto-start state mismatch detected. Stored: ${storedAutoStartEnabled}, Actual: ${actualAutoStartEnabled}. Syncing...`,
)
setAutoStart(storedAutoStartEnabled).catch(err => {
logger.error('Failed to sync auto-start:', err)