your personal website on atproto - mirror blento.app

format and lint

jycouet e79ad47b 725395dc

+53 -6
+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
+21 -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 + rules: { 36 + 'svelte/no-at-html-tags': 'off', 37 + '@typescript-eslint/no-explicit-any': 'off', 38 + 'no-unused-vars': 'off', 39 + '@typescript-eslint/no-unused-vars': [ 40 + 'warn', 41 + { 42 + vars: 'all', 43 + varsIgnorePattern: '.*', 44 + args: 'none', 45 + caughtErrors: 'none', 46 + enableAutofixRemoval: { 47 + imports: true 48 + } 49 + } 50 + ] 51 + } 33 52 } 34 - ); 53 + ];
+1 -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 },
+2 -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 326 + 327 327 } catch (e) { 328 328 if (!tryAdding) return; 329 329 ··· 332 332 new URL(link); 333 333 334 334 return link; 335 - // eslint-disable-next-line @typescript-eslint/no-unused-vars 335 + 336 336 } catch (e) { 337 337 return; 338 338 }
+1 -1
src/lib/types.ts
··· 18 18 19 19 color?: string; 20 20 21 - // eslint-disable-next-line @typescript-eslint/no-explicit-any 21 + 22 22 cardData: any; 23 23 24 24 updatedAt?: string;