Skip to content

Commit cc4ba93

Browse files
🚨 Linting: add biome
1 parent 1ee5ef8 commit cc4ba93

File tree

4 files changed

+231
-0
lines changed

4 files changed

+231
-0
lines changed

biome.json

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.1.2/schema.json",
3+
"vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true },
4+
"files": { "ignoreUnknown": false },
5+
"formatter": { "enabled": true, "indentStyle": "space" },
6+
"linter": {
7+
"enabled": true,
8+
"rules": {
9+
"recommended": false,
10+
"complexity": { "noUselessTypeConstraint": "error" },
11+
"correctness": { "noUnusedVariables": "error" },
12+
"style": {
13+
"noCommonJs": "error",
14+
"noNamespace": "error",
15+
"useArrayLiterals": "error",
16+
"useAsConstAssertion": "error"
17+
},
18+
"suspicious": {
19+
"noExplicitAny": "error",
20+
"noExtraNonNullAssertion": "error",
21+
"noMisleadingInstantiator": "error",
22+
"noUnsafeDeclarationMerging": "error",
23+
"useNamespaceKeyword": "error"
24+
}
25+
}
26+
},
27+
"javascript": { "formatter": { "quoteStyle": "double" } },
28+
"overrides": [
29+
{
30+
"includes": ["*.ts", "*.tsx", "*.mts", "*.cts"],
31+
"linter": {
32+
"rules": {
33+
"complexity": { "noArguments": "error" },
34+
"correctness": {
35+
"noConstAssign": "off",
36+
"noGlobalObjectCalls": "off",
37+
"noInvalidBuiltinInstantiation": "off",
38+
"noInvalidConstructorSuper": "off",
39+
"noSetterReturn": "off",
40+
"noUndeclaredVariables": "off",
41+
"noUnreachable": "off",
42+
"noUnreachableSuper": "off"
43+
},
44+
"style": { "useConst": "error" },
45+
"suspicious": {
46+
"noClassAssign": "off",
47+
"noDuplicateClassMembers": "off",
48+
"noDuplicateObjectKeys": "off",
49+
"noDuplicateParameters": "off",
50+
"noFunctionAssign": "off",
51+
"noImportAssign": "off",
52+
"noRedeclare": "off",
53+
"noUnsafeNegation": "off",
54+
"noVar": "error",
55+
"useGetterReturn": "off"
56+
}
57+
}
58+
}
59+
}
60+
],
61+
"assist": {
62+
"enabled": true,
63+
"actions": { "source": { "organizeImports": "on" } }
64+
}
65+
}

package-lock.json

Lines changed: 164 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"x-forwarded-fetch": "^0.2.0"
2121
},
2222
"devDependencies": {
23+
"@biomejs/biome": "2.1.2",
2324
"@types/node": "^20",
2425
"@types/react": "^18",
2526
"@types/react-dom": "^18",

util/fetchPost.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const documentLoader = await context.getDocumentLoader({
1717

1818
// Save locally for testing (and to avoid spamming servers)
1919
// "Note" is ActivityPub speak for "Mastodon Post"
20+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
2021
async function saveNoteLocally(post: Note | null, author: Actor | null) {
2122
fs.writeFileSync(
2223
"post.json",

0 commit comments

Comments
 (0)