From 5f48aa5690f0fa16c60090f4bf5c595efaef6661 Mon Sep 17 00:00:00 2001 From: Julien Calixte Date: Sat, 28 Mar 2026 09:38:55 +0100 Subject: [PATCH] chore: lint and fmt --- .agents/.claude-plugin/plugin.json | 8 ++ .oxfmtrc.json | 2 +- _scripts/change-theme-dark.ts | 20 ++-- _scripts/change-theme-light.ts | 24 ++--- _scripts/change-theme.ts | 10 +- babel.config.js | 2 +- docs/bugs/rolldown-while-in-globalThis.md | 2 +- postcss.config.js | 2 +- pwa-assets.config.ts | 4 +- src/analytics/openpanel.ts | 2 +- src/bus/backlinkEventBus.ts | 2 +- src/bus/noteEventBus.ts | 2 +- src/components/AuthorizeUser.vue | 12 +-- src/components/BackButton.vue | 4 +- src/components/FluxNote.vue | 16 ++-- src/components/FontChange.vue | 2 +- src/components/GoBack.vue | 4 +- src/components/LoginGithub.vue | 8 +- src/components/PublicNoteList.vue | 11 ++- src/components/RepoList.vue | 4 +- src/components/SignInAtproto.vue | 7 +- src/components/StackedNote.vue | 22 +++-- src/components/StackedPublicNote.vue | 31 ++++--- src/components/WelcomeWorld.vue | 2 +- src/constants/note-width.ts | 4 +- src/data/DataType.enum.ts | 18 ++-- src/data/data.ts | 16 ++-- src/data/models/AtprotoSession.ts | 4 +- src/data/models/GithubAccessToken.ts | 4 +- src/data/models/History.ts | 4 +- src/data/models/Model.ts | 2 +- src/hooks/useATProtoLinks.hook.ts | 10 +- src/hooks/useATProtoLogin.hook.ts | 34 ++++--- src/hooks/useBacklinks.hook.ts | 12 +-- src/hooks/useCheckboxCommit.hook.ts | 15 +-- src/hooks/useComputeBacklinks.hook.ts | 38 ++++---- src/hooks/useEditionMode.ts | 10 +- src/hooks/useFile.hook.ts | 10 +- src/hooks/useFollowingNoteList.hook.ts | 13 +-- src/hooks/useFollows.hook.ts | 6 +- src/hooks/useForm.hook.ts | 10 +- src/hooks/useGitHubContent.hook.ts | 10 +- src/hooks/useGitHubLogin.hook.ts | 12 +-- src/hooks/useImages.hook.ts | 16 ++-- src/hooks/useLinks.hook.ts | 6 +- src/hooks/useMarkdown.hook.ts | 36 ++++---- src/hooks/useNoteOverlay.hook.ts | 18 ++-- src/hooks/useNoteView.hook.ts | 8 +- src/hooks/useOfflineNotes.hook.ts | 16 ++-- src/hooks/useOverlay.hook.ts | 6 +- src/hooks/usePublicNoteList.hook.ts | 7 +- src/hooks/useRepos.hook.ts | 10 +- src/hooks/useResizeContainer.hook.ts | 8 +- src/hooks/useRouteQueryStackedNotes.hook.ts | 12 +-- src/hooks/useTitleNotes.hook.ts | 16 ++-- src/locales/message.ts | 4 +- src/main.ts | 4 +- src/modules/atproto/getAuthor.ts | 20 ++-- src/modules/atproto/service/atprotoOAuth.ts | 4 +- src/modules/atproto/service/atprotoSession.ts | 13 ++- src/modules/atproto/service/getFollows.ts | 13 ++- src/modules/atproto/withATProtoImages.ts | 2 +- src/modules/card/components/FlipCardList.vue | 16 ++-- src/modules/card/hooks/useNeedReviewCards.ts | 8 +- .../card/hooks/useSpacedRepetitionCards.ts | 30 +++--- src/modules/card/models/RepetitionCard.ts | 4 +- .../history/components/LastVisited.vue | 2 +- .../history/hooks/useLastVisitedRepos.hook.ts | 14 +-- .../history/hooks/useVisitRepo.hook.ts | 10 +- src/modules/note/cache/prepareNoteCache.ts | 16 ++-- src/modules/note/hooks/useFolderNotes.ts | 9 +- src/modules/note/hooks/useNotes.ts | 4 +- src/modules/note/models/BacklinkNote.ts | 6 +- src/modules/post/data/client.ts | 28 +++--- .../repo/hooks/useFavoriteRepos.hook.ts | 12 +-- src/modules/repo/hooks/useRepoList.hook.ts | 8 +- src/modules/repo/models/FavoriteRepo.ts | 4 +- src/modules/repo/models/SavedRepo.ts | 6 +- src/modules/repo/services/octo.ts | 6 +- src/modules/repo/services/repo.ts | 20 ++-- src/modules/repo/services/resolvePath.spec.ts | 44 ++++----- src/modules/repo/services/resolvePath.ts | 16 ++-- src/modules/repo/store/userRepo.store.ts | 24 ++--- src/modules/user/interfaces/GithubToken.ts | 2 +- src/modules/user/service/signIn.ts | 10 +- src/router/router.ts | 40 ++++---- src/theme.config.ts | 4 +- src/utils/decodeBase64ToUTF8.ts | 6 +- src/utils/displayLanguage.ts | 2 +- src/utils/markdown/markdown-html5-media.ts | 76 +++++++-------- src/utils/markdown/markdown-it-regexp.ts | 14 +-- .../markdown/markdown-it-tabler-icons.ts | 11 +-- src/utils/noteTitle.ts | 16 ++-- src/utils/notif.ts | 12 +-- src/views/FleetingNotes.vue | 7 +- src/views/FluxNoteView.vue | 6 +- src/views/HistoricNotes.vue | 6 +- src/views/HomeApp.vue | 4 +- src/views/NeedReviewCards.vue | 8 +- src/views/PublicNoteListByDidView.vue | 5 +- src/views/PublicNoteListView.vue | 15 +-- src/views/PublicNoteView.vue | 51 +++++----- src/views/RepoList.vue | 8 +- src/views/SpaceCowboy.vue | 3 +- src/views/SpacedRepetitionCard.vue | 6 +- src/views/TodoNotes.vue | 11 ++- tailwind.config.js | 50 +++++----- vite.config.mts | 92 +++++++++---------- 108 files changed, 726 insertions(+), 680 deletions(-) create mode 100644 .agents/.claude-plugin/plugin.json diff --git a/.agents/.claude-plugin/plugin.json b/.agents/.claude-plugin/plugin.json new file mode 100644 index 0000000..4bd1b21 --- /dev/null +++ b/.agents/.claude-plugin/plugin.json @@ -0,0 +1,8 @@ +{ + "name": "remanso-skills", + "version": "1.0.0", + "description": "Local skills for the Remanso project", + "author": { + "name": "julien" + } +} diff --git a/.oxfmtrc.json b/.oxfmtrc.json index 2d1b127..62ace94 100644 --- a/.oxfmtrc.json +++ b/.oxfmtrc.json @@ -1,7 +1,7 @@ { "$schema": "./node_modules/oxfmt/configuration_schema.json", "semi": false, - "singleQuote": true, + "singleQuote": false, "trailingComma": "none", "printWidth": 80, "sortPackageJson": false, diff --git a/_scripts/change-theme-dark.ts b/_scripts/change-theme-dark.ts index 293fa01..65ce595 100644 --- a/_scripts/change-theme-dark.ts +++ b/_scripts/change-theme-dark.ts @@ -3,28 +3,28 @@ // Script pour changer facilement le thème sombre de l'application Remanso // Usage: pnpm run theme:dark [theme-name] -import { readFileSync, writeFileSync } from 'fs' -import { join } from 'path' +import { readFileSync, writeFileSync } from "fs" +import { join } from "path" -import { commitTheme } from './change-theme' +import { commitTheme } from "./change-theme" // Chemins vers les fichiers -const themeConfigPath = join(__dirname, '..', 'src', 'theme.config.ts') -const appCssPath = join(__dirname, '..', 'src', 'styles', 'app.css') +const themeConfigPath = join(__dirname, "..", "src", "theme.config.ts") +const appCssPath = join(__dirname, "..", "src", "styles", "app.css") // Vérifier les arguments if (process.argv.length < 3) { - console.log('Usage: pnpm run theme:dark [theme-name]') - console.log('Exemple: pnpm run theme:dark business') + console.log("Usage: pnpm run theme:dark [theme-name]") + console.log("Exemple: pnpm run theme:dark business") process.exit(1) } // Mode fixé à dark pour ce script -const mode = 'dark' +const mode = "dark" const newTheme = process.argv[2] // nom du nouveau thème // Lire le contenu actuel du fichier de configuration -let themeConfigContent = readFileSync(themeConfigPath, 'utf8') +let themeConfigContent = readFileSync(themeConfigPath, "utf8") // Remplacer la valeur du thème sombre themeConfigContent = themeConfigContent.replace( @@ -36,7 +36,7 @@ themeConfigContent = themeConfigContent.replace( writeFileSync(themeConfigPath, themeConfigContent) // Mettre à jour également le fichier app.css pour le thème --prefersdark -let appCssContent = readFileSync(appCssPath, 'utf8') +let appCssContent = readFileSync(appCssPath, "utf8") appCssContent = appCssContent.replace( /(\s+)([a-zA-Z0-9-]+)(\s+--prefersdark;)/, `$1${newTheme}$3` diff --git a/_scripts/change-theme-light.ts b/_scripts/change-theme-light.ts index b3d703a..6f9fcb8 100644 --- a/_scripts/change-theme-light.ts +++ b/_scripts/change-theme-light.ts @@ -3,29 +3,29 @@ // Script pour changer facilement le thème clair de l'application Remanso // Usage: pnpm run theme:light [theme-name] -import { readFileSync, writeFileSync } from 'fs' -import { join } from 'path' +import { readFileSync, writeFileSync } from "fs" +import { join } from "path" -import { commitTheme } from './change-theme' +import { commitTheme } from "./change-theme" // Chemins vers les fichiers -const themeConfigPath = join(__dirname, '..', 'src', 'theme.config.ts') -const indexPath = join(__dirname, '..', 'index.html') -const appCssPath = join(__dirname, '..', 'src', 'styles', 'app.css') +const themeConfigPath = join(__dirname, "..", "src", "theme.config.ts") +const indexPath = join(__dirname, "..", "index.html") +const appCssPath = join(__dirname, "..", "src", "styles", "app.css") // Vérifier les arguments if (process.argv.length < 3) { - console.log('Usage: pnpm run theme:light [theme-name]') - console.log('Exemple: pnpm run theme:light cupcake') + console.log("Usage: pnpm run theme:light [theme-name]") + console.log("Exemple: pnpm run theme:light cupcake") process.exit(1) } // Mode fixé à light pour ce script -const mode = 'light' +const mode = "light" const newTheme = process.argv[2] // nom du nouveau thème // Lire le contenu actuel du fichier de configuration -let themeConfigContent = readFileSync(themeConfigPath, 'utf8') +let themeConfigContent = readFileSync(themeConfigPath, "utf8") // Remplacer la valeur du thème clair themeConfigContent = themeConfigContent.replace( @@ -37,7 +37,7 @@ themeConfigContent = themeConfigContent.replace( writeFileSync(themeConfigPath, themeConfigContent) // Mettre à jour également le fichier index.html -let indexContent = readFileSync(indexPath, 'utf8') +let indexContent = readFileSync(indexPath, "utf8") indexContent = indexContent.replace( /data-theme="[^"]*"/, `data-theme="${newTheme}"` @@ -45,7 +45,7 @@ indexContent = indexContent.replace( writeFileSync(indexPath, indexContent) // Mettre à jour également le fichier app.css pour le thème --default -let appCssContent = readFileSync(appCssPath, 'utf8') +let appCssContent = readFileSync(appCssPath, "utf8") appCssContent = appCssContent.replace( /(\s+)([a-zA-Z0-9-]+)(\s+--default,)/, `$1${newTheme}$3` diff --git a/_scripts/change-theme.ts b/_scripts/change-theme.ts index 556d263..56be997 100644 --- a/_scripts/change-theme.ts +++ b/_scripts/change-theme.ts @@ -1,22 +1,22 @@ -import { execSync } from 'child_process' +import { execSync } from "child_process" export const commitTheme = (mode: string, newTheme: string) => { // Créer un commit avec les changements try { // Ajouter tous les fichiers modifiés - execSync('git add .', { stdio: 'inherit' }) + execSync("git add .", { stdio: "inherit" }) // Créer le commit avec le message approprié const commitMessage = `design: change ${mode} theme to ${newTheme}` - execSync(`git commit -m "${commitMessage}"`, { stdio: 'inherit' }) + execSync(`git commit -m "${commitMessage}"`, { stdio: "inherit" }) console.log(`Commit créé avec succès: "${commitMessage}"`) - execSync(`git push`, { stdio: 'inherit' }) + execSync(`git push`, { stdio: "inherit" }) console.log(`Push sur origin`) } catch (error) { - console.error('Erreur lors de la création du commit:', error) + console.error("Erreur lors de la création du commit:", error) process.exit(1) } } diff --git a/babel.config.js b/babel.config.js index 716b023..db68ff1 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,3 +1,3 @@ module.exports = { - presets: ['@vue/cli-plugin-babel/preset'] + presets: ["@vue/cli-plugin-babel/preset"] } diff --git a/docs/bugs/rolldown-while-in-globalThis.md b/docs/bugs/rolldown-while-in-globalThis.md index f977cf1..b0b2dd4 100644 --- a/docs/bugs/rolldown-while-in-globalThis.md +++ b/docs/bugs/rolldown-while-in-globalThis.md @@ -26,7 +26,7 @@ Rolldown's minifier drops the `while(`/`for(;` keyword when a `while (x in globa File: `node_modules/@ark/schema/out/shared/registry.js` ```js -let _registryName = '$ark' +let _registryName = "$ark" let suffix = 2 while (_registryName in globalThis) _registryName = `$ark${suffix++}` export const registryName = _registryName diff --git a/postcss.config.js b/postcss.config.js index 375342d..586b12c 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,3 +1,3 @@ module.exports = { - plugins: { '@tailwindcss/postcss': {}, autoprefixer: {} } + plugins: { "@tailwindcss/postcss": {}, autoprefixer: {} } } diff --git a/pwa-assets.config.ts b/pwa-assets.config.ts index 145bd5f..d661d2a 100644 --- a/pwa-assets.config.ts +++ b/pwa-assets.config.ts @@ -1,9 +1,9 @@ import { defineConfig, minimal2023Preset as preset -} from '@vite-pwa/assets-generator/config' +} from "@vite-pwa/assets-generator/config" export default defineConfig({ preset, - images: ['public/favicon.png'] + images: ["public/favicon.png"] }) diff --git a/src/analytics/openpanel.ts b/src/analytics/openpanel.ts index 241f100..2470997 100644 --- a/src/analytics/openpanel.ts +++ b/src/analytics/openpanel.ts @@ -5,5 +5,5 @@ export const op = new OpenPanel({ clientId: "038a6aac-19bb-4a7f-9aae-2d0201fead5b", trackScreenViews: true, trackOutgoingLinks: true, - trackAttributes: true, + trackAttributes: true }) diff --git a/src/bus/backlinkEventBus.ts b/src/bus/backlinkEventBus.ts index 94b1133..6de6873 100644 --- a/src/bus/backlinkEventBus.ts +++ b/src/bus/backlinkEventBus.ts @@ -1,4 +1,4 @@ -import { createEventBus } from 'retrobus' +import { createEventBus } from "retrobus" interface EventBusParams { fileSha: string diff --git a/src/bus/noteEventBus.ts b/src/bus/noteEventBus.ts index 0cd507a..62698a4 100644 --- a/src/bus/noteEventBus.ts +++ b/src/bus/noteEventBus.ts @@ -1,4 +1,4 @@ -import { createEventBus } from 'retrobus' +import { createEventBus } from "retrobus" interface EventBusParams { user: string diff --git a/src/components/AuthorizeUser.vue b/src/components/AuthorizeUser.vue index f46a861..2aed7f0 100644 --- a/src/components/AuthorizeUser.vue +++ b/src/components/AuthorizeUser.vue @@ -1,9 +1,9 @@ diff --git a/src/components/BackButton.vue b/src/components/BackButton.vue index d8e3471..22a385f 100644 --- a/src/components/BackButton.vue +++ b/src/components/BackButton.vue @@ -1,9 +1,9 @@ diff --git a/src/components/GoBack.vue b/src/components/GoBack.vue index 507b691..2ed98c5 100644 --- a/src/components/GoBack.vue +++ b/src/components/GoBack.vue @@ -1,11 +1,11 @@ diff --git a/src/components/LoginGithub.vue b/src/components/LoginGithub.vue index 7fb0371..3ab8551 100644 --- a/src/components/LoginGithub.vue +++ b/src/components/LoginGithub.vue @@ -1,8 +1,8 @@