Skip to content

Commit ab4b2dd

Browse files
authored
Migrate from biome to oxfmt (#5033)
1 parent 6ef4405 commit ab4b2dd

29 files changed

+1024
-677
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ jobs:
4343
name: Benchmarks
4444
needs: build_test
4545
if: ${{ needs.filter_jobs.outputs.jsChanged == 'true' }}
46-
uses: ./.github/workflows/benchmarks.yml
46+
uses: ./.github/workflows/benchmarks.yml

.github/workflows/pr-reporter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,4 @@ jobs:
7979
path: results/**/*.json
8080
base-bench-name: preact-main
8181
pr-bench-name: preact-local
82-
summarize: 'duration, usedJSHeapSize'
82+
summarize: 'duration, usedJSHeapSize'

.github/workflows/run-bench.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,4 @@ jobs:
119119
with:
120120
name: ${{ steps.log-artifact-name.outputs.artifact_name }}
121121
path: benchmarks/out/${{ inputs.benchmark }}_logs.tgz
122-
if-no-files-found: ignore
122+
if-no-files-found: ignore

.github/workflows/single-bench.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,4 @@ jobs:
8787
with:
8888
benchmark: ${{ inputs.benchmark }}
8989
trace: ${{ inputs.trace }}
90-
# timeout: ${{ inputs.timeout }}
90+
# timeout: ${{ inputs.timeout }}

.github/workflows/size.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ jobs:
1818
repo-token: '${{ secrets.GITHUB_TOKEN }}'
1919
# Our `prepare` script already builds the app post-install,
2020
# building it again would be redundant
21-
build-script: 'npm run --if-present noop'
21+
build-script: 'npm run --if-present noop'

.oxfmtrc.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"endOfLine": "lf",
4+
"insertFinalNewline": true,
5+
"useTabs": true,
6+
"tabWidth": 2,
7+
"printWidth": 80,
8+
"singleQuote": true,
9+
"jsxSingleQuote": false,
10+
"quoteProps": "as-needed",
11+
"trailingComma": "none",
12+
"semi": true,
13+
"arrowParens": "avoid",
14+
"bracketSameLine": false,
15+
"bracketSpacing": true,
16+
"singleAttributePerLine": false,
17+
"experimentalSortPackageJson": false,
18+
"ignorePatterns": [
19+
"benchmarks/**",
20+
"**/.DS_Store",
21+
"**/node_modules",
22+
"**/npm-debug.log",
23+
"**/dist",
24+
"*/package-lock.json",
25+
"**/yarn.lock",
26+
"**/.vscode",
27+
"**/.idea",
28+
"test/ts/**/*.js",
29+
"**/coverage",
30+
"**/*.sw[op]",
31+
"**/*.log",
32+
"**/package/",
33+
"**/preact-*.tgz",
34+
"**/preact.tgz",
35+
"**/package-lock.json"
36+
],
37+
"overrides": [
38+
{
39+
"files": ["*.json", ".*rc", "*.yml"],
40+
"options": {
41+
"useTabs": false,
42+
"tabWidth": 2
43+
}
44+
}
45+
]
46+
}

biome.json

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

compat/src/index.d.ts

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -74,22 +74,23 @@ declare namespace React {
7474
export function startTransition(cb: () => void): void;
7575

7676
// HTML
77-
export interface HTMLAttributes<T extends EventTarget>
78-
extends JSXInternal.HTMLAttributes<T> {}
77+
export interface HTMLAttributes<
78+
T extends EventTarget
79+
> extends JSXInternal.HTMLAttributes<T> {}
7980
export interface HTMLProps<T extends EventTarget>
80-
extends JSXInternal.AllHTMLAttributes<T>,
81-
preact.ClassAttributes<T> {}
82-
export interface AllHTMLAttributes<T extends EventTarget>
83-
extends JSXInternal.AllHTMLAttributes<T> {}
81+
extends JSXInternal.AllHTMLAttributes<T>, preact.ClassAttributes<T> {}
82+
export interface AllHTMLAttributes<
83+
T extends EventTarget
84+
> extends JSXInternal.AllHTMLAttributes<T> {}
8485
export import DetailedHTMLProps = JSXInternal.DetailedHTMLProps;
8586
export import CSSProperties = JSXInternal.CSSProperties;
8687

8788
export interface SVGProps<T extends EventTarget>
88-
extends JSXInternal.SVGAttributes<T>,
89-
preact.ClassAttributes<T> {}
89+
extends JSXInternal.SVGAttributes<T>, preact.ClassAttributes<T> {}
9090

91-
interface SVGAttributes<T extends EventTarget = SVGElement>
92-
extends JSXInternal.SVGAttributes<T> {}
91+
interface SVGAttributes<
92+
T extends EventTarget = SVGElement
93+
> extends JSXInternal.SVGAttributes<T> {}
9394

9495
interface ReactSVG extends JSXInternal.IntrinsicSVGElements {}
9596

@@ -260,8 +261,9 @@ declare namespace React {
260261
displayName?: string;
261262
}
262263

263-
export interface ForwardRefExoticComponent<P>
264-
extends preact.FunctionComponent<P> {
264+
export interface ForwardRefExoticComponent<
265+
P
266+
> extends preact.FunctionComponent<P> {
265267
defaultProps?: Partial<P> | undefined;
266268
}
267269

compat/src/internal.d.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ export interface SuspenseState {
4040
_suspended?: null | VNode<any>;
4141
}
4242

43-
export interface SuspenseComponent
44-
extends PreactComponent<SuspenseProps, SuspenseState> {
43+
export interface SuspenseComponent extends PreactComponent<
44+
SuspenseProps,
45+
SuspenseState
46+
> {
4547
_pendingSuspensionCount: number;
4648
_suspenders: Component[];
4749
_detachOnNextRender: null | VNode<any>;

compat/test/browser/forwardRef.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,5 +509,5 @@ describe('forwardRef', () => {
509509
const Forwarded = forwardRef(Foo);
510510

511511
expect(Forwarded.render).to.equal(Foo);
512-
});
512+
});
513513
});

0 commit comments

Comments
 (0)