Skip to content

Commit 4ec9394

Browse files
chore(devdeps): update dependency @biomejs/biome to v2 (#5371)
* chore(devdeps): update dependency @biomejs/biome to v2 * fix: biome v2 * fix: biome rules align with other projects --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Matthias Prost <[email protected]>
1 parent a69dc73 commit 4ec9394

File tree

1,403 files changed

+12299
-12247
lines changed

Some content is hidden

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

1,403 files changed

+12299
-12247
lines changed

.oxlintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
],
6161
"eslint/require-await": "off",
6262
"eslint/sort-imports": [
63-
"error",
63+
"off",
6464
{
6565
"ignoreDeclarationSort": true,
6666
"memberSyntaxSortOrder": ["single", "multiple", "all", "none"]

biome.json

Lines changed: 78 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,110 @@
11
{
22
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
3-
"organizeImports": {
4-
"enabled": true
5-
},
6-
"linter": {
7-
"enabled": false
3+
"assist": {
4+
"actions": {
5+
"source": {
6+
"organizeImports": "on",
7+
"useSortedAttributes": "on",
8+
"useSortedKeys": "on",
9+
"useSortedProperties": "on"
10+
}
11+
},
12+
"includes": [
13+
"!**/package.json",
14+
"**/*.ts",
15+
"**/*.tsx",
16+
"!**/dist/**",
17+
"!**/build/**",
18+
"!**/.turbo/**",
19+
"!**/prebuild.ts"
20+
]
821
},
9-
"vcs": {
10-
"clientKind": "git",
11-
"useIgnoreFile": true
22+
"css": {
23+
"formatter": {
24+
"enabled": true,
25+
"quoteStyle": "single"
26+
},
27+
"linter": {
28+
"enabled": true
29+
},
30+
"parser": {
31+
"allowWrongLineComments": false,
32+
"cssModules": true
33+
}
1234
},
1335
"files": {
14-
"ignore": [
15-
".turbo/",
16-
".next/",
17-
"coverage/",
18-
"**/node_modules/",
19-
"**/storybook-static",
20-
"dist",
21-
"**/pnpm-lock.yaml",
22-
"**/package.json",
23-
"**/CHANGELOG.md",
24-
"*.snap",
25-
"**/__snapshots__/",
26-
".storybook/**"
36+
"includes": [
37+
"**",
38+
"!**/.turbo/",
39+
"!**/.next/",
40+
"!**/coverage/",
41+
"!**/node_modules/",
42+
"!**/storybook-static",
43+
"!**/dist",
44+
"!**/pnpm-lock.yaml",
45+
"!**/package.json",
46+
"!**/CHANGELOG.md",
47+
"!**/*.snap",
48+
"!**/__snapshots__/",
49+
"!**/.storybook/**"
2750
]
2851
},
2952
"formatter": {
53+
"attributePosition": "auto",
3054
"enabled": true,
3155
"formatWithErrors": false,
56+
"includes": [
57+
"**/*.ts",
58+
"**/*.tsx",
59+
"!**/dist/**",
60+
"!**/build/**",
61+
"!**/.turbo/**"
62+
],
3263
"indentStyle": "space",
3364
"indentWidth": 2,
3465
"lineEnding": "lf",
35-
"lineWidth": 80,
36-
"attributePosition": "auto"
66+
"lineWidth": 80
3767
},
3868
"javascript": {
3969
"formatter": {
40-
"jsxQuoteStyle": "double",
41-
"quoteProperties": "asNeeded",
42-
"trailingCommas": "all",
43-
"semicolons": "asNeeded",
4470
"arrowParentheses": "asNeeded",
45-
"bracketSpacing": true,
71+
"attributePosition": "auto",
4672
"bracketSameLine": false,
73+
"bracketSpacing": true,
74+
"jsxQuoteStyle": "double",
75+
"quoteProperties": "asNeeded",
4776
"quoteStyle": "single",
48-
"attributePosition": "auto"
77+
"semicolons": "asNeeded",
78+
"trailingCommas": "all"
4979
}
5080
},
5181
"json": {
5282
"formatter": {
5383
"enabled": true
5484
},
55-
"parser": {
56-
"allowComments": true
57-
},
58-
"linter": {
59-
"enabled": true
60-
}
61-
},
62-
"css": {
63-
"formatter": {
64-
"enabled": true,
65-
"quoteStyle": "single"
66-
},
6785
"linter": {
6886
"enabled": true
6987
},
7088
"parser": {
71-
"allowWrongLineComments": false,
72-
"cssModules": true
89+
"allowComments": true
90+
}
91+
},
92+
"linter": {
93+
"enabled": false
94+
},
95+
"overrides": [
96+
{
97+
"assist": {
98+
"actions": {
99+
"source": {
100+
"useSortedKeys": "off"
101+
}
102+
}
103+
}
73104
}
105+
],
106+
"vcs": {
107+
"clientKind": "git",
108+
"useIgnoreFile": true
74109
}
75110
}

e2e/App.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Global, ThemeProvider } from '@emotion/react'
22
// oxlint-disable-next-line import/no-unassigned-import
33
import '@ultraviolet/fonts/fonts.css'
44
import { consoleLightTheme } from '@ultraviolet/themes'
5-
import { Text, normalize } from '@ultraviolet/ui'
5+
import { normalize, Text } from '@ultraviolet/ui'
66
import type { ReactNode } from 'react'
77
import { lazy } from 'react'
88
import {
@@ -24,10 +24,10 @@ const pagesToRender = Object.keys(modules)
2424
.map(path =>
2525
path.includes('render.tsx')
2626
? {
27-
name: path.replace('.tsx', ''),
2827
Component: lazy(
2928
() => import(`./tests/${path?.split('/')[2]}/render.tsx`),
3029
),
30+
name: path.replace('.tsx', ''),
3131
}
3232
: null,
3333
)
@@ -68,16 +68,16 @@ const App = () => (
6868
<GlobalWrapper>
6969
<Router>
7070
<Routes>
71-
<Route path="/" element={<WelcomePage />} />
71+
<Route element={<WelcomePage />} path="/" />
7272
{pagesToRender.map(path => {
7373
const Element = path?.Component
7474

7575
if (Element) {
7676
return (
7777
<Route
78+
element={<Element />}
7879
key={path?.name}
7980
path={path?.name?.split('/')[2]?.toLowerCase()}
80-
element={<Element />}
8181
/>
8282
)
8383
}

e2e/mocks/mockErrors.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
export const mockErrors = {
2+
isInteger: () => `Incorrect field`,
3+
max: () => `This field is too high (maximum is : ...)`,
24
maxDate: () => `Date must be lower than ...`,
35
maxLength: () => `This field should have a length lower than ...`,
6+
min: () => `This field is too low (minimum is: ...)`,
47
minDate: () => `Date must be greater than ...`,
58
minLength: () => `This field should have a length greater than ...`,
69
pattern: () => `This field should match the regex`,
710
required: () => 'This field is required',
8-
max: () => `This field is too high (maximum is : ...)`,
9-
min: () => `This field is too low (minimum is: ...)`,
10-
isInteger: () => `Incorrect field`,
1111
}

e2e/playwright.config.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,9 @@ const times = {
1212
}
1313

1414
export default defineConfig({
15-
webServer: {
16-
// it will start web app before running tests so you don't need to start it manually
17-
command: 'pnpm run start',
18-
url: baseURL,
19-
stdout: 'ignore',
20-
stderr: 'pipe',
21-
},
22-
testDir: './tests',
23-
fullyParallel: true,
2415
forbidOnly: !!isCI,
25-
retries: isCI ? 2 : 0,
26-
workers: isCI ? 1 : undefined,
27-
reporter: 'line',
16+
fullyParallel: true,
2817
globalTimeout: isCI ? 5 * times['1min'] : undefined,
29-
timeout: isCI ? 1 * times['1min'] : undefined,
30-
use: {
31-
baseURL,
32-
trace: 'on-first-retry',
33-
},
3418

3519
/* Configure projects for major browsers */
3620
projects: [
@@ -47,4 +31,20 @@ export default defineConfig({
4731
use: { ...devices['Desktop Safari'] },
4832
},
4933
],
34+
reporter: 'line',
35+
retries: isCI ? 2 : 0,
36+
testDir: './tests',
37+
timeout: isCI ? 1 * times['1min'] : undefined,
38+
use: {
39+
baseURL,
40+
trace: 'on-first-retry',
41+
},
42+
webServer: {
43+
// it will start web app before running tests so you don't need to start it manually
44+
command: 'pnpm run start',
45+
stderr: 'pipe',
46+
stdout: 'ignore',
47+
url: baseURL,
48+
},
49+
workers: isCI ? 1 : undefined,
5050
})

e2e/tests/componentsWithinModal/render.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,26 @@ const Render = () => {
2222
/>
2323
<div data-testid="input-value">{firstName}</div>
2424

25-
<Form errors={mockErrors} onSubmit={() => {}} methods={methods}>
25+
<Form errors={mockErrors} methods={methods} onSubmit={() => {}}>
2626
<Stack gap={1}>
2727
<TextInputField
28-
name="lastName"
29-
label="Last name"
3028
control={methods.control}
29+
label="Last name"
30+
name="lastName"
3131
/>
3232
<div data-testid="form-content">{methods.watch().lastName}</div>
3333

3434
<SelectInputField
35-
name="color"
36-
label="Color"
3735
control={methods.control}
36+
footer={
37+
<Modal disclosure={<Button>Open Nested Modal</Button>}>
38+
<Text as="p" variant="body">
39+
This is the nested modal
40+
</Text>
41+
</Modal>
42+
}
43+
label="Color"
44+
name="color"
3845
options={[
3946
{
4047
label: 'Red',
@@ -49,13 +56,6 @@ const Render = () => {
4956
value: 'blue',
5057
},
5158
]}
52-
footer={
53-
<Modal disclosure={<Button>Open Nested Modal</Button>}>
54-
<Text as="p" variant="body">
55-
This is the nested modal
56-
</Text>
57-
</Modal>
58-
}
5959
/>
6060
</Stack>
6161
</Form>

0 commit comments

Comments
 (0)