From 3e967657c68c4f886407b3058266a3fc65b41b35 Mon Sep 17 00:00:00 2001 From: hywax Date: Sun, 31 Dec 2023 19:38:07 +0500 Subject: [PATCH] style(eslint): run --- README.md | 4 ++-- nuxt.config.ts | 8 ++++---- package.json | 2 +- server/plugins/0.update-checker.ts | 5 +++-- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index ff9fe42..6ac7c84 100644 --- a/README.md +++ b/README.md @@ -30,14 +30,14 @@ Mafl is an intuitive service for organizing your homepage. Customize Mafl to you This Docker image is published to both Docker Hub and the GitHub container registry. Depending on your preferences and needs, you can reference both `hywax/mafl` as well as `ghcr.io/hywax/mafl`. ```yaml -version: "3.8" +version: '3.8' services: mafl: image: hywax/mafl restart: unless-stopped ports: - - "3000:3000" + - '3000:3000' volumes: - ./config.yml:/app/data/config.yml - ./icons:/app/public/icons diff --git a/nuxt.config.ts b/nuxt.config.ts index c3b34b7..000e765 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -43,8 +43,8 @@ export default defineNuxtConfig({ storage: { data: { driver: 'fs', - base: './data' - } - } - } + base: './data', + }, + }, + }, }) diff --git a/package.json b/package.json index 4f59d3b..69384e0 100644 --- a/package.json +++ b/package.json @@ -42,4 +42,4 @@ "lint-staged": { "*.ts": "yarn run lint" } -} \ No newline at end of file +} diff --git a/server/plugins/0.update-checker.ts b/server/plugins/0.update-checker.ts index 5178a14..778252f 100644 --- a/server/plugins/0.update-checker.ts +++ b/server/plugins/0.update-checker.ts @@ -1,3 +1,4 @@ +import process from 'node:process' import currentPackage from '~/package.json' export default defineNitroPlugin(async () => { @@ -7,10 +8,10 @@ export default defineNitroPlugin(async () => { try { const latestPackage = await $fetch('https://raw.githubusercontent.com/hywax/mafl/main/package.json', { - parseResponse: (json) => JSON.parse(json) + parseResponse: (json) => JSON.parse(json), }) - const parseVersion = (version: string): number => parseInt(version.replace(/\./g, ''), 10); + const parseVersion = (version: string): number => Number.parseInt(version.replace(/\./g, ''), 10) const difference = parseVersion(latestPackage.version) - parseVersion(currentPackage.version) if (difference > 0) {