Skip to content

Commit 2223080

Browse files
committed
fixup! chore: replace eslint/dprint with biome
1 parent 3fecb12 commit 2223080

File tree

188 files changed

+13709
-5161
lines changed

Some content is hidden

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

188 files changed

+13709
-5161
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ updates:
1212
- "patch"
1313
patterns:
1414
- "*vite*"
15+
- "*biome*"
1516
- "depcheck"
16-
- "dprint"
17-
- "eslint*"
1817
- "ts-node"
1918
- "typescript"
2019
fluent:

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Tools
22
.DS_Store
3-
.eslintcache
43

54
node_modules/
65
lib

.vscode/extensions.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"recommendations": [
33
"arcanis.vscode-zipfs",
4-
"dbaeumer.vscode-eslint",
5-
"dprint.dprint",
4+
"biomejs.biome",
65
"streetsidesoftware.code-spell-checker"
76
]
87
}

.vscode/settings.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{
2-
"editor.defaultFormatter": "dprint.dprint",
2+
"editor.defaultFormatter": "biomejs.biome",
3+
"editor.codeActionsOnSave": {
4+
"quickfix.biome": "explicit",
5+
"source.organizeImports.biome": "explicit"
6+
},
37
"search.exclude": {
48
"**/.yarn": true,
59
"**/.pnp.*": true
610
},
7-
"typescript.tsdk": "node_modules/typescript/lib",
8-
"eslint.workingDirectories": [
9-
{"mode":"auto"}
10-
]
11+
"typescript.tsdk": "node_modules/typescript/lib"
1112
}

biome.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,15 @@
22
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
33
"vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true },
44
"files": {
5-
"include": ["**/*.json", "**/*.js", "**/*.mjs", "**/*.cjs", "**/*.ts", "**/*.tsx"],
6-
"ignore": ["lib/", "package.json", ".vscode/"]
5+
"include": [
6+
"**/*.json",
7+
"**/*.js",
8+
"**/*.mjs",
9+
"**/*.cjs",
10+
"**/*.ts",
11+
"**/*.tsx"
12+
],
13+
"ignore": ["lib/", ".vscode/"]
714
},
815
"organizeImports": {
916
"enabled": true,

components/empty-view/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,11 @@
2222
"prebuild": "pnpm run -C ../../illustrations build",
2323
"build": "pnpm prebuild && tsc",
2424
"check:unused-deps": "depcheck . --config=depcheck.yml",
25-
"lint": "tsc --noEmit && eslint . --cache"
25+
"lint": "tsc --noEmit && biome check"
2626
},
2727
"devDependencies": {
2828
"@types/react": "^18.3.12",
2929
"@types/react-dom": "^18.3.1",
30-
"eslint": "^8.57.1",
3130
"react": "^18.2.0",
3231
"react-dom": "^18.2.0",
3332
"typescript": "^4.5.5"

components/empty-view/src/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {
22
AddUserProfileDark,
33
AddUserProfileLight,
4-
bundleIllustrationSmart,
54
CodeErrorDark,
65
CodeErrorLight,
76
DataDark,
@@ -42,6 +41,7 @@ import {
4241
TeamLight,
4342
UnderConstructionDark,
4443
UnderConstructionLight,
44+
bundleIllustrationSmart,
4545
} from "@axiscommunications/fluent-illustrations";
4646
import { IllustrationKind } from "./types.js";
4747

components/empty-view/src/view.tsx

Lines changed: 59 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@ import {
1111

1212
import { useMediaQuery } from "@axiscommunications/fluent-hooks";
1313

14+
import { Illustration } from "./constants.js";
1415
import { useContainerStyle, useStyles } from "./styles.js";
1516
import {
1617
ContentProps,
1718
EmptyViewProps,
1819
HtmlDivAttributesRestProps,
1920
} from "./types.js";
20-
import { Illustration } from "./constants.js";
2121

22-
function ContainerSpacious(
23-
{ children, className, ...rest }: PropsWithChildren<
24-
HtmlDivAttributesRestProps
25-
>
26-
) {
22+
function ContainerSpacious({
23+
children,
24+
className,
25+
...rest
26+
}: PropsWithChildren<HtmlDivAttributesRestProps>) {
2727
const styles = useStyles();
2828
const containerStyle = useContainerStyle({ className });
2929

@@ -37,11 +37,11 @@ function ContainerSpacious(
3737
);
3838
}
3939

40-
function ContainerCompact(
41-
{ children, className, ...rest }: PropsWithChildren<
42-
HtmlDivAttributesRestProps
43-
>
44-
) {
40+
function ContainerCompact({
41+
children,
42+
className,
43+
...rest
44+
}: PropsWithChildren<HtmlDivAttributesRestProps>) {
4545
const styles = useStyles();
4646
const containerStyle = useContainerStyle({ className });
4747

@@ -54,11 +54,11 @@ function ContainerCompact(
5454
);
5555
}
5656

57-
function ContainerTop(
58-
{ children, className, ...rest }: PropsWithChildren<
59-
HtmlDivAttributesRestProps
60-
>
61-
) {
57+
function ContainerTop({
58+
children,
59+
className,
60+
...rest
61+
}: PropsWithChildren<HtmlDivAttributesRestProps>) {
6262
const styles = useStyles();
6363
const containerStyle = useContainerStyle({ className });
6464

@@ -106,9 +106,10 @@ function ContentSmall({ body, illustration, title }: ContentProps) {
106106
);
107107
}
108108

109-
function ContentExtraSmall(
110-
{ title, body }: Omit<ContentProps, "illustration">
111-
) {
109+
function ContentExtraSmall({
110+
title,
111+
body,
112+
}: Omit<ContentProps, "illustration">) {
112113
const screenStyles = useStyles();
113114
return (
114115
<>
@@ -118,36 +119,42 @@ function ContentExtraSmall(
118119
);
119120
}
120121

121-
export function MainEmptyView(
122-
{ after, illustration, title, children, ...rest }: EmptyViewProps
123-
) {
122+
export function MainEmptyView({
123+
after,
124+
illustration,
125+
title,
126+
children,
127+
...rest
128+
}: EmptyViewProps) {
124129
const screenStyles = useStyles();
125130
const media = useMediaQuery();
126131
return (
127132
<ContainerSpacious {...rest}>
128-
{media === "small"
129-
? (
130-
<ContentMedium
131-
illustration={illustration}
132-
title={title}
133-
body={children}
134-
/>
135-
)
136-
: (
137-
<ContentLarge
138-
illustration={illustration}
139-
title={title}
140-
body={children}
141-
/>
142-
)}
133+
{media === "small" ? (
134+
<ContentMedium
135+
illustration={illustration}
136+
title={title}
137+
body={children}
138+
/>
139+
) : (
140+
<ContentLarge
141+
illustration={illustration}
142+
title={title}
143+
body={children}
144+
/>
145+
)}
143146
<div className={screenStyles.after}>{after}</div>
144147
</ContainerSpacious>
145148
);
146149
}
147150

148-
export function PanelEmptyView(
149-
{ after, illustration, title, children, ...rest }: EmptyViewProps
150-
) {
151+
export function PanelEmptyView({
152+
after,
153+
illustration,
154+
title,
155+
children,
156+
...rest
157+
}: EmptyViewProps) {
151158
const screenStyles = useStyles();
152159
return (
153160
<ContainerTop {...rest}>
@@ -161,9 +168,12 @@ export function PanelEmptyView(
161168
);
162169
}
163170

164-
export function SubmenuEmptyView(
165-
{ illustration, title, children, ...rest }: Omit<EmptyViewProps, "after">
166-
) {
171+
export function SubmenuEmptyView({
172+
illustration,
173+
title,
174+
children,
175+
...rest
176+
}: Omit<EmptyViewProps, "after">) {
167177
return (
168178
<ContainerTop {...rest}>
169179
<ContentSmall illustration={illustration} title={title} body={children} />
@@ -184,9 +194,12 @@ export function SubmenuEmptyView(
184194
* </DialogContent>
185195
* ```
186196
*/
187-
export function DialogEmptyView(
188-
{ after, title, children, ...rest }: Omit<EmptyViewProps, "illustration">
189-
) {
197+
export function DialogEmptyView({
198+
after,
199+
title,
200+
children,
201+
...rest
202+
}: Omit<EmptyViewProps, "illustration">) {
190203
const screenStyles = useStyles();
191204
return (
192205
<ContainerCompact {...rest}>

components/password-input/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"build:cjs": "tsc --module commonjs --outDir lib/cjs",
2828
"build:esm": "tsc",
2929
"check:unused-deps": "depcheck . --config=depcheck.yml",
30-
"lint": "tsc --noEmit && eslint . --cache",
30+
"lint": "tsc --noEmit && biome check",
3131
"test": "vitest run",
3232
"test:coverage": "vitest run --coverage",
3333
"test:watch": "vitest watch"
@@ -37,7 +37,6 @@
3737
"@types/react": "^18.3.12",
3838
"@types/react-dom": "^18.3.1",
3939
"@vitest/coverage-c8": "^0.33.0",
40-
"eslint": "^8.57.1",
4140
"jsdom": "^26.0.0",
4241
"react": "^18.2.0",
4342
"react-dom": "^18.2.0",

components/password-input/src/password-input.tsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import {
77
} from "@fluentui/react-components";
88
import { EyeOffRegular, EyeRegular } from "@fluentui/react-icons";
99

10-
import { PasswordInputProps } from "./password-input.types.js";
1110
import { usePasswordInputStyles } from "./password-input.styles.js";
11+
import { PasswordInputProps } from "./password-input.types.js";
1212

13-
export const PasswordInput: ForwardRefComponent<PasswordInputProps> = React
14-
.forwardRef((props: PasswordInputProps, ref) => {
13+
export const PasswordInput: ForwardRefComponent<PasswordInputProps> =
14+
React.forwardRef((props: PasswordInputProps, ref) => {
1515
const { className, ...rest } = props;
1616

1717
const styles = usePasswordInputStyles();
@@ -32,9 +32,13 @@ export const PasswordInput: ForwardRefComponent<PasswordInputProps> = React
3232
<Input
3333
ref={ref}
3434
type={isVisible ? "text" : "password"}
35-
contentAfter={isVisible
36-
? <EyeOffRegular {...iconProps} />
37-
: <EyeRegular {...iconProps} />}
35+
contentAfter={
36+
isVisible ? (
37+
<EyeOffRegular {...iconProps} />
38+
) : (
39+
<EyeRegular {...iconProps} />
40+
)
41+
}
3842
className={inputStyles}
3943
{...rest}
4044
/>

0 commit comments

Comments
 (0)