Skip to content

Commit

Permalink
update biome config
Browse files Browse the repository at this point in the history
  • Loading branch information
KryptXBSA committed Dec 24, 2024
1 parent 1a24e63 commit 7d7c4de
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export function FrameworkCombobox() {
<PopoverTrigger asChild>
<Button
variant="outline"
// biome-ignore lint/a11y/useSemanticElements: <explanation>
role="combobox"
aria-expanded={open}
className="w-[200px] justify-between"
Expand Down
1 change: 0 additions & 1 deletion apps/web/src/app/builder/_components/SortableGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ export const SortableGrid = () => {
<div className="flex w-fit max-w-[1100px] flex-col gap-2 overflow-x-auto rounded-lg border-2 border-slate-500 bg-secondary p-4">
<SortableContext items={items.flat()} strategy={rectSwappingStrategy}>
{items.map((row, idx) => (
// biome-ignore lint/suspicious/noArrayIndexKey: <explanation>
<div key={idx} className="flex gap-2">
{row.map((id) => (
<SortableItem key={id} id={id} value={id} />
Expand Down
1 change: 0 additions & 1 deletion apps/web/src/core/FormBuilder/showCodeDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { UseFormReturn, useFormContext } from "react-hook-form";
type ShowCodeDialogProps = {
setDialogOpen: Dispatch<SetStateAction<boolean>>;
setGeneratedCode: Dispatch<SetStateAction<string>>;
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
toast: any;
};

Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/core/FormList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function FormList() {
<ul className="mt-20 flex flex-col gap-2">
{forms?.map((f, idx) => (
<li className="flex gap-2" key={idx}>
<Button className="w-32 flex flex-col" onClick={() => selectForm(idx)}>
<Button className="flex w-32 flex-col" onClick={() => selectForm(idx)}>
<p>{f.name}</p>
{f.framework}
</Button>
Expand Down
9 changes: 5 additions & 4 deletions apps/web/src/core/Preview/Preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ export function Preview() {
console.log("fff", form.getValues());

for (const key in values) {
// biome-ignore lint/suspicious/noPrototypeBuiltins: <explanation>
if (values.hasOwnProperty(key)) {
// @ts-ignore
result += `${key}: ${values[key]}\n`;
Expand All @@ -137,7 +138,7 @@ export function Preview() {
className="w-1/2 space-y-8"
>
{formFields.map((f) => (
<>
<div key={f.id}>
{f.kind === "string" && StringField(f)}
{f.kind === "number" && NumberField(f)}
{f.kind === "date" && DateField(f)}
Expand All @@ -146,7 +147,7 @@ export function Preview() {
{f.style === "select" && SelectField(f)}
{f.style === "combobox" && ComboboxField(f)}
{f.kind === "textarea" && TextareaField(f)}
</>
</div>
))}
<Button onClick={() => form.getValues()}>Submit</Button>

Expand Down Expand Up @@ -238,7 +239,7 @@ export function Preview() {
</FormControl>
<SelectContent>
{f.enumValues?.map((v, i) => (
<SelectItem key={i} value={v.value}>
<SelectItem key={v.id} value={v.value}>
{v.label}
</SelectItem>
))}
Expand Down Expand Up @@ -267,7 +268,7 @@ export function Preview() {
>
{f.enumValues?.map((v, i) => (
<FormItem
key={i}
key={v.id}
className="flex items-center space-x-3 space-y-0"
>
<FormControl>
Expand Down
9 changes: 8 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,21 @@
"linter": {
"ignore": ["node_modules", ".next", "drizzle-migrations"],
"rules": {
"complexity": { "noForEach": "off" },
"style": {
"noNonNullAssertion": { "level": "off" },
"useImportType": { "level": "warn" }
},
"suspicious": {
"noArrayIndexKey": { "level": "warn" }
"noExplicitAny": "off",
"noArrayIndexKey": { "level": "off" }
},
"correctness": {
"useJsxKeyInIterable": "off",
"useExhaustiveDependencies": "off"
},
"a11y": {
"useSemanticElements": "off",
"noSvgWithoutTitle": {
"level": "off"
}
Expand Down

0 comments on commit 7d7c4de

Please sign in to comment.