Skip to content

Commit 07cf9ac

Browse files
committed
Fix lint warnings
1 parent 9324ec6 commit 07cf9ac

File tree

3 files changed

+133
-2
lines changed

3 files changed

+133
-2
lines changed

app/(chat)/api/history/route.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export async function GET() {
88
return Response.json('Unauthorized!', { status: 401 });
99
}
1010

11+
// biome-ignore lint: Forbidden non-null assertion.
1112
const chats = await getChatsByUserId({ id: session.user.id! });
1213
return Response.json(chats);
1314
}

biome.json

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
3+
"files": {
4+
"ignoreUnknown": false,
5+
"ignore": [
6+
"**/pnpm-lock.yaml",
7+
"lib/db/migrations",
8+
"lib/editor/react-renderer.tsx",
9+
"node_modules",
10+
".next",
11+
"public",
12+
".vercel"
13+
]
14+
},
15+
"vcs": {
16+
"enabled": true,
17+
"clientKind": "git",
18+
"defaultBranch": "main",
19+
"useIgnoreFile": true
20+
},
21+
"formatter": {
22+
"enabled": true,
23+
"formatWithErrors": false,
24+
"indentStyle": "space",
25+
"indentWidth": 2,
26+
"lineEnding": "lf",
27+
"lineWidth": 80,
28+
"attributePosition": "auto"
29+
},
30+
"linter": {
31+
"enabled": true,
32+
"rules": {
33+
"recommended": true,
34+
"a11y": {
35+
"useHtmlLang": "warn",
36+
"noHeaderScope": "warn",
37+
"useValidAriaRole": {
38+
"level": "warn",
39+
"options": {
40+
"ignoreNonDom": false,
41+
"allowInvalidRoles": ["none", "text"]
42+
}
43+
},
44+
"useSemanticElements": "off",
45+
"noSvgWithoutTitle": "off",
46+
"useMediaCaption": "off",
47+
"noAutofocus": "off",
48+
"noBlankTarget": "off"
49+
},
50+
"complexity": {
51+
"noUselessStringConcat": "warn",
52+
"noForEach": "off",
53+
"noUselessSwitchCase": "off",
54+
"noUselessThisAlias": "off"
55+
},
56+
"correctness": {
57+
"noUnusedImports": "warn",
58+
"useArrayLiterals": "warn",
59+
"noNewSymbol": "warn",
60+
"useJsxKeyInIterable": "off",
61+
"useExhaustiveDependencies": "off",
62+
"noUnnecessaryContinue": "off"
63+
},
64+
"security": {
65+
"noDangerouslySetInnerHtml": "off"
66+
},
67+
"style": {
68+
"useFragmentSyntax": "warn",
69+
"noYodaExpression": "warn",
70+
"useDefaultParameterLast": "warn",
71+
"useExponentiationOperator": "off",
72+
"noUnusedTemplateLiteral": "off",
73+
"noUselessElse": "off"
74+
},
75+
"suspicious": {
76+
"noExplicitAny": "off"
77+
},
78+
"nursery": {
79+
"noStaticElementInteractions": "warn",
80+
"noHeadImportInDocument": "warn",
81+
"noDocumentImportInPage": "warn",
82+
"noDuplicateElseIf": "warn",
83+
"noIrregularWhitespace": "warn",
84+
"useValidAutocomplete": "warn"
85+
}
86+
}
87+
},
88+
"javascript": {
89+
"jsxRuntime": "reactClassic",
90+
"formatter": {
91+
"jsxQuoteStyle": "double",
92+
"quoteProperties": "asNeeded",
93+
"trailingCommas": "all",
94+
"semicolons": "always",
95+
"arrowParentheses": "always",
96+
"bracketSpacing": true,
97+
"bracketSameLine": false,
98+
"quoteStyle": "single",
99+
"attributePosition": "auto"
100+
}
101+
},
102+
"json": {
103+
"formatter": {
104+
"enabled": true,
105+
"trailingCommas": "none"
106+
},
107+
"parser": {
108+
"allowComments": true,
109+
"allowTrailingCommas": false
110+
}
111+
},
112+
"css": {
113+
"formatter": { "enabled": false },
114+
"linter": { "enabled": false }
115+
},
116+
"organizeImports": { "enabled": false },
117+
"overrides": [
118+
{
119+
"include": ["playwright/**", "tooling/playwright/src/test/test.ts"],
120+
"linter": {
121+
"rules": {
122+
"correctness": {
123+
"noEmptyPattern": "off"
124+
}
125+
}
126+
}
127+
}
128+
]
129+
}

components/document.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ export function DocumentToolResult({
3030
setBlock,
3131
}: DocumentToolResultProps) {
3232
return (
33-
<div
33+
<button
34+
type="button"
3435
className="bg-background cursor-pointer border py-2 px-3 rounded-xl w-fit flex flex-row gap-3 items-start"
3536
onClick={(event) => {
3637
const rect = event.currentTarget.getBoundingClientRect();
@@ -64,7 +65,7 @@ export function DocumentToolResult({
6465
<div className="">
6566
{getActionText(type)} {result.title}
6667
</div>
67-
</div>
68+
</button>
6869
);
6970
}
7071

0 commit comments

Comments
 (0)