Skip to content

Commit a0f7347

Browse files
committed
chore: update biomejs
1 parent 9ab72f5 commit a0f7347

File tree

34 files changed

+202
-155
lines changed

34 files changed

+202
-155
lines changed

.changeset/lucky-birds-begin.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
"@twilio-paste/badge": patch
3+
"@twilio-paste/combobox": patch
4+
"@twilio-paste/core": patch
5+
"@twilio-paste/inline-control-group": patch
6+
"@twilio-paste/page-header": patch
7+
"@twilio-paste/status": patch
8+
"@twilio-paste/box": patch
9+
"@twilio-paste/menu-primitive": patch
10+
"@twilio-paste/text": patch
11+
"@twilio-paste/customization": patch
12+
"@twilio-paste/data-visualization-library": patch
13+
"@twilio-paste/react-textarea-autosize-library": patch
14+
"@twilio-paste/styling-library": patch
15+
"@twilio-paste/theme": patch
16+
---
17+
18+
chore: code formatting updates; no material changes applied

biome.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,20 @@
5454
"formatter": {
5555
"enabled": true,
5656
"indentStyle": "space",
57-
"indentSize": 2,
57+
"indentWidth": 2,
5858
"lineWidth": 120
5959
},
6060
"javascript": {
6161
"formatter": {
6262
"indentStyle": "space",
63-
"indentSize": 2,
63+
"indentWidth": 2,
6464
"lineWidth": 120
6565
}
6666
},
6767
"json": {
6868
"formatter": {
6969
"indentStyle": "space",
70-
"indentSize": 2,
70+
"indentWidth": 2,
7171
"lineWidth": 120
7272
}
7373
}

cypress/support/commands/parent-commands.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,7 @@ Cypress.Commands.add("checkInPageNavigationLinks", () => {
5353
cy.get("@pageAsideAnchors").then((anchors) => {
5454
cy.get("@anchoredHeadings").each((anchor, idx) => {
5555
cy.wrap(anchor).should("have.attr", "href").and("include", "#");
56-
cy.wrap(anchors[idx])
57-
.should("have.attr", "href")
58-
.and("include", "#")
59-
.and("eql", anchor.attr("href"));
56+
cy.wrap(anchors[idx]).should("have.attr", "href").and("include", "#").and("eql", anchor.attr("href"));
6057
});
6158
});
6259
});

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
"lint:repo": "eslint -c .eslintrc.repo.js --ext .tsx,.ts .",
8181
"format": "biome format ./ && prettier --list-different ./packages/",
8282
"format:write": "biome format ./ --write && prettier ./ --write",
83-
"format:ci": "biome ci ./ --linter-enabled=false && prettier --list-different ./packages/",
83+
"format:ci": "biome ci ./ --linter-enabled=false && prettier --list-different ./packages/",
8484
"type-check": "yarn prebuild && yarn nx run-many --target=tsc",
8585
"tsc": "echo 'Did you mean to run yarn type-check?'",
8686
"chromatic": "chromatic",
@@ -103,7 +103,7 @@
103103
"@babel/preset-react": "^7.18.6",
104104
"@babel/preset-typescript": "^7.21.4",
105105
"@babel/types": "^7.21.4",
106-
"@biomejs/biome": "1.2.2",
106+
"@biomejs/biome": "^1.6.3",
107107
"@changesets/changelog-github": "^0.2.8",
108108
"@changesets/cli": "^2.13.1",
109109
"@commitlint/cli": "16.2.1",

packages/paste-core/components/badge/src/styles.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const badgeBaseStyles: BoxStyleProps = {
2121
};
2222

2323
export const badgeVariantStyles: {
24-
[key in typeof BadgeVariants[number]]: {
24+
[key in (typeof BadgeVariants)[number]]: {
2525
backgroundColor: BoxStyleProps["backgroundColor"];
2626
color: BoxStyleProps["color"];
2727
borderRadius?: BoxStyleProps["borderRadius"];
@@ -121,7 +121,7 @@ export const badgeVariantStyles: {
121121
};
122122

123123
export const badgeButtonStyles: {
124-
[key in typeof BadgeVariants[number]]: {
124+
[key in (typeof BadgeVariants)[number]]: {
125125
boxShadow: BoxStyleProps["boxShadow"];
126126
};
127127
} = {
@@ -186,7 +186,7 @@ export const badgeAnchorStyles: BoxStyleProps = {
186186
_focus: { textDecoration: "none", boxShadow: "shadowFocus" },
187187
};
188188

189-
export const getBadgeButtonStyles = (variant: typeof BadgeVariants[number]): BoxStyleProps => {
189+
export const getBadgeButtonStyles = (variant: (typeof BadgeVariants)[number]): BoxStyleProps => {
190190
const variantButtonStyle = badgeButtonStyles[variant];
191191
return {
192192
...variantButtonStyle,

packages/paste-core/components/badge/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export type BadgeBaseProps = {
1313
* @type {BadgeVariants}
1414
* @memberof BadgeBaseProps
1515
*/
16-
variant: typeof BadgeVariants[number];
16+
variant: (typeof BadgeVariants)[number];
1717
/**
1818
*
1919
* @default "default"

packages/paste-core/components/badge/stories/customization.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import * as React from "react";
1010
import { Badge } from "../src";
1111
import type { BadgeVariants } from "../src/constants";
1212

13-
export const makeBadge = (variant: typeof BadgeVariants[number], element?: string): React.ReactElement => (
13+
export const makeBadge = (variant: (typeof BadgeVariants)[number], element?: string): React.ReactElement => (
1414
<Badge as="span" element={element} variant={variant} data-testid={`${variant}_badge`}>
1515
HelloWorld
1616
</Badge>
@@ -38,7 +38,7 @@ export const getStyles = (element = "BADGE"): { [key: string]: PasteCustomCSS }
3838
};
3939

4040
const CustomizationWrapper: React.FC<
41-
React.PropsWithChildren<{ variant: typeof BadgeVariants[number]; isTestEnvironment: boolean }>
41+
React.PropsWithChildren<{ variant: (typeof BadgeVariants)[number]; isTestEnvironment: boolean }>
4242
> = ({ variant, isTestEnvironment }): React.ReactElement => {
4343
const theme = useTheme();
4444
const customElement = "FOO";

packages/paste-core/components/combobox/__tests__/virtualization.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { render, screen } from "@testing-library/react";
33
import type { RenderOptions } from "@testing-library/react";
44
import { CustomizationProvider } from "@twilio-paste/customization";
55
import * as React from "react";
6-
import type { VirtualItem, useVirtual as UseVirtual } from "react-virtual/types";
6+
import type { useVirtual as UseVirtual, VirtualItem } from "react-virtual/types";
77

88
import { Combobox } from "../src";
99

packages/paste-core/components/combobox/src/styles/ComboboxListboxOption.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ const ComboboxListboxOption = React.forwardRef<HTMLLIElement, ComboboxListboxOpt
104104
highlighted
105105
? "colorTextPrimary"
106106
: // eslint-disable-next-line unicorn/no-nested-ternary
107-
selected
108-
? "colorTextPrimary"
109-
: "colorText"
107+
selected
108+
? "colorTextPrimary"
109+
: "colorText"
110110
}
111111
display="flex"
112112
justifyContent="space-between"

packages/paste-core/components/inline-control-group/__tests__/inlineControlGroup.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { render as testRender, screen } from "@testing-library/react";
1+
import { screen, render as testRender } from "@testing-library/react";
22
import { CustomizationProvider } from "@twilio-paste/customization";
33
import * as React from "react";
44

0 commit comments

Comments
 (0)