Skip to content

Commit a2f093b

Browse files
committed
Start to fix biome issues
1 parent 82e1ea1 commit a2f093b

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

.github/workflows/continuous-integration.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- run: pnpm install
1515
- run: pnpm run test
1616
- run: pnpm run typecheck
17-
- run: pnpm biome ci --colors=off
17+
- run: pnpm run lint
1818
- run: pnpm run build
1919
# FIXME: To be reactivated
2020
# - run: pnpm run smoke cjs 19.0.0

package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@
1313
"prebuild": "rm -rf dist/",
1414
"build:esm": "tsc --module esnext --outDir lib/esm",
1515
"build:cjs": "tsc --module commonjs --outDir lib/cjs",
16-
"lint": "biome lint",
17-
"lint:fix": "pnpm run lint --fix",
18-
"format": "biome format",
19-
"format:fix": "pnpm run format --fix",
16+
"lint": "biome check",
17+
"lint:fix": "pnpm run check --fix",
2018
"test": "vitest",
2119
"release": "./release.sh",
2220
"smoke": "node tests/smoke/run",

src/formatter/formatProp.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ vitest.mock("./formatPropValue");
88
const defaultOptions = {
99
useBooleanShorthandSyntax: true,
1010
tabStop: 2,
11-
} as any as Options;
11+
} as unknown as Options;
1212

1313
describe("formatProp", () => {
1414
beforeEach(() => {

src/index.spec.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1105,7 +1105,13 @@ test("should return functionValue result when it returns a string", () => {
11051105

11061106
test("sends the original fn to functionValue", () => {
11071107
const fn = () => {};
1108-
const functionValue = (receivedFn: unknown) => expect(receivedFn).toBe(fn);
1108+
1109+
const functionValue = (receivedFn: unknown) => {
1110+
expect(receivedFn).toBe(fn);
1111+
1112+
return "";
1113+
};
1114+
11091115
reactElementToJSXString(<div onClick={fn} />, {
11101116
functionValue,
11111117
});

src/options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export type Options = {
44
filterProps: Array<string> | ((propValue: unknown, key: string) => boolean);
55
showDefaultProps: boolean;
66
showFunctions: boolean;
7-
functionValue?: (...args: Array<any>) => any;
7+
functionValue?: (fn: Function) => string;
88
tabStop: number;
99
useBooleanShorthandSyntax: boolean;
1010
useFragmentShortSyntax: boolean;

0 commit comments

Comments
 (0)