Skip to content

Commit 068b059

Browse files
committed
chore: switch the linter to biome
1 parent 9dbfbcf commit 068b059

File tree

141 files changed

+871
-2385
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+871
-2385
lines changed

.vscode/extensions.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
{
2-
"recommendations": [
3-
"dbaeumer.vscode-eslint"
4-
]
2+
"recommendations": ["biomejs.biome"]
53
}

.vscode/settings.json

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
{
2+
"cSpell.words": ["composify"],
3+
"editor.formatOnSave": true,
4+
"editor.tabSize": 2,
5+
"editor.insertSpaces": true,
6+
"editor.formatOnType": true,
7+
"editor.defaultFormatter": "biomejs.biome",
28
"editor.codeActionsOnSave": {
3-
"source.fixAll.eslint": "explicit"
9+
"source.fixAll.biome": "explicit",
10+
"source.organizeImports.biome": "explicit"
411
},
5-
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
6-
"editor.tabSize": 2,
7-
"eslint.codeActionsOnSave.mode": "problems",
8-
"eslint.format.enable": true,
9-
"eslint.validate": [
10-
"javascript",
11-
"javascriptreact",
12-
"typescript",
13-
"typescriptreact"
14-
],
15-
"cSpell.words": [
16-
"composify"
17-
],
18-
"typescript.tsdk": "node_modules/typescript/lib"
12+
"biome.requireConfiguration": true,
13+
"biome.lsp.bin": "./node_modules/.bin/biome",
14+
"biome.configurationPath": "./biome.json",
15+
"typescript.tsdk": "./node_modules/typescript/lib"
1916
}

biome.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.2.5/schema.json",
3+
"vcs": {
4+
"enabled": true,
5+
"clientKind": "git",
6+
"useIgnoreFile": true
7+
},
8+
"files": {
9+
"ignoreUnknown": true,
10+
"includes": ["**", "!node_modules", "!.next", "!dist", "!build"]
11+
},
12+
"formatter": {
13+
"enabled": true,
14+
"lineWidth": 100,
15+
"indentStyle": "space",
16+
"indentWidth": 2
17+
},
18+
"linter": {
19+
"enabled": true,
20+
"rules": {
21+
"recommended": true,
22+
"a11y": {
23+
"noSvgWithoutTitle": "off",
24+
"useFocusableInteractive": "off",
25+
"useKeyWithClickEvents": "off",
26+
"useSemanticElements": "off"
27+
},
28+
"suspicious": {
29+
"noUnknownAtRules": "off"
30+
}
31+
},
32+
"domains": {
33+
"next": "recommended",
34+
"react": "recommended"
35+
}
36+
},
37+
"javascript": {
38+
"formatter": {
39+
"quoteStyle": "single"
40+
}
41+
},
42+
"assist": {
43+
"actions": {
44+
"source": {
45+
"organizeImports": "on"
46+
}
47+
}
48+
}
49+
}

eslint.config.mjs

Lines changed: 0 additions & 3 deletions
This file was deleted.

examples/api/database.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
"content": "<VStack alignVertical=\"center\" alignHorizontal=\"stretch\" padding={{top: 16, bottom: 16, left: 16, right: 16}} gap={4}><Heading level={1} weight=\"extrabold\">Server Driven UI made easy</Heading><Body color=\"#1E1E1E\" weight=\"normal\">Bring visual editing to your components — no rewrites needed.</Body><HStack alignVertical=\"stretch\" alignHorizontal=\"flex-start\" gap={4} margin={{top: 16}}><Button variant=\"primary\">Learn More ›</Button><Button variant=\"outline\">Get started →</Button></HStack></VStack>"
66
}
77
]
8-
}
8+
}

examples/expo/app/[slug].tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default function Page() {
2222
<VStack flex={1} alignHorizontal="center" alignVertical="center">
2323
<Heading level={3} weight="semibold">Not Found</Heading>
2424
</VStack>
25-
`.trim()
25+
`.trim(),
2626
);
2727
};
2828

examples/expo/app/editor/[slug].tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default function EditorPage() {
4242
<Button variant="outline">Get started →</Button>
4343
</HStack>
4444
</VStack>
45-
`.trim()
45+
`.trim(),
4646
);
4747
};
4848

examples/expo/components/Body/Body.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { type FC, type PropsWithChildren } from 'react';
2-
import { Text, StyleSheet } from 'react-native';
1+
import type { FC, PropsWithChildren } from 'react';
2+
import { StyleSheet, Text } from 'react-native';
33

44
type Props = PropsWithChildren<{
55
color?: string;

examples/expo/components/Button/Button.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { type PropsWithChildren } from 'react';
2-
import { Pressable, Text, StyleSheet } from 'react-native';
1+
import type { PropsWithChildren } from 'react';
2+
import { Pressable, StyleSheet, Text } from 'react-native';
33

44
type Props = PropsWithChildren<{
55
variant: 'primary' | 'outline';
@@ -14,7 +14,9 @@ export const Button = ({ variant, children }: Props) => {
1414
variant === 'primary' ? styles.primary : styles.outline,
1515
]}
1616
>
17-
<Text style={[styles.buttonText, variant === 'primary' ? styles.primaryText : styles.outlineText]}>
17+
<Text
18+
style={[styles.buttonText, variant === 'primary' ? styles.primaryText : styles.outlineText]}
19+
>
1820
{children}
1921
</Text>
2022
</Pressable>

examples/expo/components/HStack/HStack.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
import { type FC, type PropsWithChildren } from 'react';
1+
import type { FC, PropsWithChildren } from 'react';
22
import { View } from 'react-native';
33

44
type Props = PropsWithChildren<{
5-
alignHorizontal?: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly';
5+
alignHorizontal?:
6+
| 'flex-start'
7+
| 'flex-end'
8+
| 'center'
9+
| 'space-between'
10+
| 'space-around'
11+
| 'space-evenly';
612
alignVertical?: 'flex-start' | 'flex-end' | 'center' | 'stretch';
713
size?: {
814
width?: number;

0 commit comments

Comments
 (0)