tangled
alpha
login
or
join now
flo-bit.dev
/
blento
your personal website on atproto - mirror
blento.app
20
fork
atom
overview
issues
pulls
pipelines
format and lint
jycouet
2 weeks ago
e79ad47b
725395dc
+53
-6
5 changed files
expand all
collapse all
unified
split
.github
workflows
ci.yml
eslint.config.js
package.json
src
lib
helper.ts
types.ts
+28
.github/workflows/ci.yml
···
1
1
+
name: CI
2
2
+
3
3
+
on:
4
4
+
push:
5
5
+
branches:
6
6
+
- main
7
7
+
pull_request:
8
8
+
9
9
+
# cancel in-progress runs on new commits to same PR (gitub.event.number)
10
10
+
concurrency:
11
11
+
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
12
12
+
cancel-in-progress: true
13
13
+
14
14
+
permissions:
15
15
+
contents: read # to fetch code (actions/checkout)
16
16
+
17
17
+
jobs:
18
18
+
lint:
19
19
+
runs-on: ubuntu-latest
20
20
+
steps:
21
21
+
- uses: actions/checkout@v4
22
22
+
- uses: pnpm/action-setup@v4
23
23
+
- uses: actions/setup-node@v4
24
24
+
with:
25
25
+
node-version: 24
26
26
+
cache: pnpm
27
27
+
- run: pnpm install --frozen-lockfile
28
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
10
-
export default ts.config(
10
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
33
+
},
34
34
+
{
35
35
+
rules: {
36
36
+
'svelte/no-at-html-tags': 'off',
37
37
+
'@typescript-eslint/no-explicit-any': 'off',
38
38
+
'no-unused-vars': 'off',
39
39
+
'@typescript-eslint/no-unused-vars': [
40
40
+
'warn',
41
41
+
{
42
42
+
vars: 'all',
43
43
+
varsIgnorePattern: '.*',
44
44
+
args: 'none',
45
45
+
caughtErrors: 'none',
46
46
+
enableAutofixRemoval: {
47
47
+
imports: true
48
48
+
}
49
49
+
}
50
50
+
]
51
51
+
}
33
52
}
34
34
-
);
53
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
13
-
"format": "prettier --write .",
14
13
"lint": "prettier --check . && eslint .",
14
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
326
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
326
326
+
327
327
} catch (e) {
328
328
if (!tryAdding) return;
329
329
···
332
332
new URL(link);
333
333
334
334
return link;
335
335
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
335
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
21
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
21
21
+
22
22
cardData: any;
23
23
24
24
updatedAt?: string;