Skip to content

Commit 76d9155

Browse files
committed
integrated aegir as lint
1 parent 31bce86 commit 76d9155

24 files changed

+57
-4
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
"main": "src/index.js",
88
"scripts": {
99
"start": "cross-env NODE_ENV=development electron .",
10-
"lint": "ts-standard && standard",
11-
"aegir": "aegir lint",
10+
"lint": "aegir lint",
1211
"lint:fix": "ts-standard --fix && standard --fix",
1312
"test": "cross-env NODE_ENV=test playwright test 'test/unit/.*.spec.js'",
1413
"test:e2e": "xvfb-maybe cross-env NODE_ENV=test playwright test -c test/e2e/playwright.config.js",

src/add-to-ipfs.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ async function addFileOrDirectory (ipfs, filepath) {
9090
let cid = null
9191

9292
if (stat.isDirectory()) {
93+
// @ts-ignore
9394
const files = globSource(filepath, '**/*', { recursive: true, cidVersion: 1 })
9495
const res = await last(ipfs.addAll(files, {
9596
pin: false,
@@ -129,6 +130,7 @@ module.exports = async function (files) {
129130
const res = await addFileOrDirectory(ipfsd.api, file)
130131
successes.push(res)
131132
} catch (e) {
133+
// @ts-ignore
132134
failures.push(e.toString())
133135
}
134136
}))

src/app-menu.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ if (process.platform === 'darwin') {
6868

6969
// Edit menu
7070
template[1].submenu.push(
71+
// @ts-ignore
7172
{ type: 'separator' },
7273
{
7374
label: 'Speech',
@@ -90,6 +91,7 @@ if (process.platform === 'darwin') {
9091

9192
module.exports = function () {
9293
logger.info('[appMenu] init...')
94+
// @ts-ignore
9395
const menu = Menu.buildFromTemplate(template)
9496
Menu.setApplicationMenu(menu)
9597
logger.info('[appMenu] init done...')

src/auto-launch.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ module.exports = async function () {
9292

9393
return true
9494
} catch (err) {
95+
// @ts-ignore
9596
logger.error(`[launch on startup] ${err.toString()}`)
9697

9798
if (feedback) {
@@ -105,6 +106,7 @@ module.exports = async function () {
105106
}
106107
}
107108

109+
// @ts-ignore
108110
activate({ newValue: store.get(CONFIG_KEY, false) })
109111
createToggler(CONFIG_KEY, activate)
110112
}

src/auto-updater/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ function setup () {
5454
try {
5555
await autoUpdater.downloadUpdate()
5656
} catch (err) {
57+
// @ts-ignore
5758
logger.error(`[updater] ${err.toString()}`)
5859
}
5960

src/automatic-gc.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,13 @@ module.exports = async function () {
4747

4848
return true
4949
} catch (err) {
50+
// @ts-ignore
5051
logger.error(`[automatic gc] ${err.toString()}`)
5152

5253
return false
5354
}
5455
}
56+
// @ts-ignore
5557
activate({ newValue: store.get(CONFIG_KEY, true) })
5658
createToggler(CONFIG_KEY, activate)
5759
logger.info(`[automatic gc] ${store.get(CONFIG_KEY, true) ? 'enabled' : 'disabled'}`)

src/common/config-keys.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ const CONFIG_KEYS = {
1111
OPEN_WEBUI_LAUNCH: 'openWebUIAtLaunch',
1212
MONOCHROME_TRAY_ICON: 'monochromeTrayIcon',
1313
EXPERIMENT_PUBSUB: 'experiments.pubsub',
14-
EXPERIMENT_PUBSUB_NAMESYS: 'experiments.pubsubNamesys'
14+
EXPERIMENT_PUBSUB_NAMESYS: 'experiments.pubsubNamesys',
15+
AUTO_UPDATE: ''
1516
}
1617

1718
module.exports = CONFIG_KEYS

src/context.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ class Context {
6363
this._properties.set(propertyName, value)
6464
this._resolvePropToValue(propertyName, value)
6565
} catch (e) {
66+
// @ts-ignore
6667
logger.error(e)
6768
}
6869
}
@@ -105,6 +106,7 @@ class Context {
105106
return await originalFn(...args)
106107
} catch (err) {
107108
logger.error(`[ctx] Error calling ${String(propertyName)}`)
109+
// @ts-ignore
108110
logger.error(err)
109111
throw err
110112
}

src/daemon/config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ function migrateConfig (ipfsd) {
167167
config = readConfigFile(ipfsd)
168168
} catch (err) {
169169
// This is a best effort check, dont blow up here, that should happen else where.
170+
// @ts-ignore
170171
logger.error(`[daemon] migrateConfig: error reading config file: ${err.message || err}`)
171172
return
172173
}
@@ -251,6 +252,7 @@ function migrateConfig (ipfsd) {
251252
writeConfigFile(ipfsd, config)
252253
store.safeSet(REVISION_KEY, REVISION)
253254
} catch (err) {
255+
// @ts-ignore
254256
logger.error(`[daemon] migrateConfig: error writing config file: ${err.message || err}`)
255257
return
256258
}
@@ -467,6 +469,7 @@ function checkRepositoryAndConfiguration (ipfsd) {
467469
return true
468470
} catch (e) {
469471
// Save to error.log
472+
// @ts-ignore
470473
logger.error(e)
471474
dialogs.repositoryIsInvalidDialog(ipfsd.path)
472475
return false

src/daemon/daemon.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ async function startIpfsWithLogs (ipfsd) {
188188
}
189189
logger.error(logs)
190190
if (migrationPrompt) {
191+
// @ts-ignore
191192
migrationPrompt.loadWindow(logs, isErrored, isFinished)
192193
} else {
193194
showMigrationPrompt(logs, isErrored, isFinished)

0 commit comments

Comments
 (0)