your personal website on atproto - mirror blento.app

Merge pull request #26 from jycouet/feat/format-lint

authored by

Florian and committed by
GitHub
462685a0 725395dc

+75 -14
+28
.github/workflows/ci.yml
··· 1 + name: CI 2 + 3 + on: 4 + push: 5 + branches: 6 + - main 7 + pull_request: 8 + 9 + # cancel in-progress runs on new commits to same PR (gitub.event.number) 10 + concurrency: 11 + group: ${{ github.workflow }}-${{ github.event.number || github.sha }} 12 + cancel-in-progress: true 13 + 14 + permissions: 15 + contents: read # to fetch code (actions/checkout) 16 + 17 + jobs: 18 + lint: 19 + runs-on: ubuntu-latest 20 + steps: 21 + - uses: actions/checkout@v4 22 + - uses: pnpm/action-setup@v4 23 + - uses: actions/setup-node@v4 24 + with: 25 + node-version: 24 26 + cache: pnpm 27 + - run: pnpm install --frozen-lockfile 28 + - run: pnpm lint
+29 -2
eslint.config.js
··· 7 7 import ts from 'typescript-eslint'; 8 8 const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url)); 9 9 10 - export default ts.config( 10 + export default [ 11 11 includeIgnoreFile(gitignorePath), 12 12 js.configs.recommended, 13 13 ...ts.configs.recommended, ··· 30 30 parser: ts.parser 31 31 } 32 32 } 33 + }, 34 + { 35 + files: ['**/*.svelte.ts'], 36 + 37 + languageOptions: { 38 + parser: ts.parser 39 + } 40 + }, 41 + { 42 + rules: { 43 + 'svelte/no-navigation-without-resolve': 'off', 44 + 'svelte/no-at-html-tags': 'off', 45 + '@typescript-eslint/no-explicit-any': 'off', 46 + 'no-unused-vars': 'off', 47 + '@typescript-eslint/no-unused-vars': [ 48 + 'warn', 49 + { 50 + vars: 'all', 51 + varsIgnorePattern: '.*', 52 + args: 'none', 53 + caughtErrors: 'none', 54 + enableAutofixRemoval: { 55 + imports: true 56 + } 57 + } 58 + ] 59 + } 33 60 } 34 - ); 61 + ];
+2 -1
package.json
··· 10 10 "prepare": "svelte-kit sync || echo ''", 11 11 "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", 12 12 "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", 13 - "format": "prettier --write .", 14 13 "lint": "prettier --check . && eslint .", 14 + "format": "eslint --fix . && prettier --write .", 15 15 "deploy": "pnpm run build && wrangler deploy", 16 16 "cf-typegen": "wrangler types ./src/worker-configuration.d.ts" 17 17 }, ··· 80 80 "turndown": "^7.2.2", 81 81 "wrangler": "^4.60.0" 82 82 }, 83 + "packageManager": "pnpm@9", 83 84 "license": "MIT" 84 85 }
+3 -2
src/lib/atproto/auth.svelte.ts
··· 7 7 deleteStoredSession 8 8 } from '@atcute/oauth-browser-client'; 9 9 import { AppBskyActorDefs } from '@atcute/bluesky'; 10 - import type { ActorIdentifier, Did } from '@atcute/lexicons'; 11 10 import { 12 11 CompositeDidDocumentResolver, 13 12 CompositeHandleResolver, ··· 18 17 WellKnownHandleResolver 19 18 } from '@atcute/identity-resolver'; 20 19 import { Client } from '@atcute/client'; 20 + import type { ActorIdentifier, Did } from '@atcute/lexicons'; 21 21 22 22 import { dev } from '$app/environment'; 23 23 import { replaceState } from '$app/navigation'; ··· 25 25 import { metadata } from './metadata'; 26 26 import { getDetailedProfile } from './methods'; 27 27 import { signUpPDS } from './settings'; 28 + import { SvelteURLSearchParams } from 'svelte/reactivity'; 28 29 29 30 export const user = $state({ 30 31 agent: null as OAuthUserAgent | null, ··· 67 68 }) 68 69 }); 69 70 70 - const params = new URLSearchParams(location.hash.slice(1)); 71 + const params = new SvelteURLSearchParams(location.hash.slice(1)); 71 72 72 73 const did = (localStorage.getItem('current-login') as Did) ?? undefined; 73 74
+1 -3
src/lib/cards/BaseCard/BaseEditingCard.svelte
··· 229 229 230 230 <div class="flex min-w-36 flex-col gap-1"> 231 231 <Label class="mb-2">Card type</Label> 232 - {#each changeOptions as changeDef} 232 + {#each changeOptions as changeDef, i (i)} 233 233 <Button 234 234 class="justify-start" 235 235 variant={changeDef.type === item.cardType ? 'primary' : 'ghost'} ··· 405 405 406 406 {#if cardDef.canResize !== false} 407 407 <!-- Resize handle at bottom right corner --> 408 - <!-- svelte-ignore a11y_no_static_element_interactions --> 409 - 410 408 <div 411 409 onpointerdown={handleResizeStart} 412 410 class="bg-base-300/70 dark:bg-base-900/70 pointer-events-auto absolute right-0.5 bottom-0.5 hidden cursor-se-resize rounded-md rounded-br-3xl p-1 group-hover/card:block"
+8
src/lib/cards/FluidTextCard/FluidTextCard.svelte
··· 187 187 // Redraw overlay when text settings change (only after initialization) 188 188 $effect(() => { 189 189 // Access all reactive values to track them 190 + // eslint-disable-next-line @typescript-eslint/no-unused-expressions 190 191 text; 192 + // eslint-disable-next-line @typescript-eslint/no-unused-expressions 191 193 fontSize; 192 194 // Only redraw if already initialized 193 195 if (isInitialized) { ··· 1253 1255 1254 1256 switch (i % 6) { 1255 1257 case 0: 1258 + // eslint-disable-next-line @typescript-eslint/no-unused-expressions 1256 1259 ((r = v), (g = t), (b = p)); 1257 1260 break; 1258 1261 case 1: 1262 + // eslint-disable-next-line @typescript-eslint/no-unused-expressions 1259 1263 ((r = q), (g = v), (b = p)); 1260 1264 break; 1261 1265 case 2: 1266 + // eslint-disable-next-line @typescript-eslint/no-unused-expressions 1262 1267 ((r = p), (g = v), (b = t)); 1263 1268 break; 1264 1269 case 3: 1270 + // eslint-disable-next-line @typescript-eslint/no-unused-expressions 1265 1271 ((r = p), (g = q), (b = v)); 1266 1272 break; 1267 1273 case 4: 1274 + // eslint-disable-next-line @typescript-eslint/no-unused-expressions 1268 1275 ((r = t), (g = p), (b = v)); 1269 1276 break; 1270 1277 case 5: 1278 + // eslint-disable-next-line @typescript-eslint/no-unused-expressions 1271 1279 ((r = v), (g = p), (b = q)); 1272 1280 break; 1273 1281 }
+1 -1
src/lib/cards/GameCards/DinoGameCard/DinoGameCard.svelte
··· 525 525 }); 526 526 </script> 527 527 528 - <!-- svelte-ignore a11y_no_noninteractive_tabindex a11y_no_noninteractive_element_interactions --> 528 + <!-- svelte-ignore a11y_no_noninteractive_tabindex --> 529 529 <!-- svelte-ignore a11y_no_noninteractive_element_interactions --> 530 530 <div 531 531 bind:this={container}
+2 -1
src/lib/cards/GameCards/TetrisCard/TetrisCard.svelte
··· 227 227 } 228 228 } 229 229 230 + type OscillatorType = 'sine' | 'square' | 'sawtooth' | 'triangle'; 230 231 function playTone( 231 232 frequency: number, 232 233 duration: number, ··· 1003 1004 }); 1004 1005 </script> 1005 1006 1006 - <!-- svelte-ignore a11y_no_noninteractive_tabindex a11y_no_noninteractive_element_interactions --> 1007 1007 <!-- svelte-ignore a11y_no_noninteractive_element_interactions --> 1008 + <!-- svelte-ignore a11y_no_noninteractive_tabindex --> 1008 1009 <div 1009 1010 bind:this={container} 1010 1011 class="relative h-full w-full overflow-hidden outline-none"
+1 -1
src/lib/cards/MapCard/Map.svelte
··· 8 8 9 9 let { item = $bindable() }: { item: Item } = $props(); 10 10 11 - $inspect(item); 11 + // $inspect(item); 12 12 13 13 let mapContainer: HTMLElement | undefined = $state(); 14 14 let map: mapboxgl.Map | undefined = $state();
-2
src/lib/helper.ts
··· 323 323 new URL(link); 324 324 325 325 return link; 326 - // eslint-disable-next-line @typescript-eslint/no-unused-vars 327 326 } catch (e) { 328 327 if (!tryAdding) return; 329 328 ··· 332 331 new URL(link); 333 332 334 333 return link; 335 - // eslint-disable-next-line @typescript-eslint/no-unused-vars 336 334 } catch (e) { 337 335 return; 338 336 }
-1
src/lib/types.ts
··· 18 18 19 19 color?: string; 20 20 21 - // eslint-disable-next-line @typescript-eslint/no-explicit-any 22 21 cardData: any; 23 22 24 23 updatedAt?: string;