Skip to content

Commit 82e1ea1

Browse files
committed
Activate Biome
1 parent 3037835 commit 82e1ea1

Some content is hidden

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

50 files changed

+1326
-1205
lines changed

.github/workflows/continuous-integration.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ jobs:
1010
- uses: actions/setup-node@v4
1111
with:
1212
node-version: 20
13-
cache: 'pnpm'
13+
cache: "pnpm"
1414
- run: pnpm install
1515
- run: pnpm run test
1616
- run: pnpm run typecheck
17+
- run: pnpm biome ci --colors=off
1718
- run: pnpm run build
1819
# FIXME: To be reactivated
19-
# - run: pnpm run lint
2020
# - run: pnpm run smoke cjs 19.0.0
2121
# - run: pnpm run smoke esm 19.0.0
2222
# - run: pnpm run smoke cjs latest

.npmignore

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
**/*.spec.js
2-
31
.github/
42
!dist/
53
src/
64
tests/
75

8-
.eslintignore
9-
.eslintrc.js
10-
.prettier
11-
.prettierignore
6+
**/*.spec.js
7+
8+
biome.json
129
commitlint.config.js
1310
release.sh
1411
renovate.json

.prettierignore

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

.prettierrc

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

biome.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
3+
"vcs": {
4+
"enabled": true,
5+
"clientKind": "git",
6+
"useIgnoreFile": true
7+
},
8+
"files": {
9+
"ignoreUnknown": false,
10+
"ignore": ["./tests/smoke/**"]
11+
},
12+
"formatter": {
13+
"enabled": true,
14+
"formatWithErrors": false,
15+
"indentStyle": "space",
16+
"indentWidth": 2
17+
},
18+
"organizeImports": {
19+
"enabled": true
20+
},
21+
"linter": {
22+
"enabled": true,
23+
"rules": {
24+
"recommended": true,
25+
"correctness": {
26+
"recommended": true,
27+
"noUnusedImports": "error"
28+
},
29+
"a11y": {
30+
"recommended": false
31+
},
32+
"complexity": {
33+
"noForEach": "off",
34+
"noBannedTypes": "warn"
35+
}
36+
}
37+
}
38+
}

commitlint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
extends: ['@commitlint/config-angular'],
2+
extends: ["@commitlint/config-angular"],
33
};

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
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": "eslint --ext ts --ext tsx src/",
17-
"lint:fix": "pnpm run lint -- --fix",
18-
"prettier:fix": "prettier --write \"**/*.{ts,tsx,js,json}\"",
16+
"lint": "biome lint",
17+
"lint:fix": "pnpm run lint --fix",
18+
"format": "biome format",
19+
"format:fix": "pnpm run format --fix",
1920
"test": "vitest",
2021
"release": "./release.sh",
2122
"smoke": "node tests/smoke/run",
@@ -36,6 +37,7 @@
3637
"react-is": "^19.0.0"
3738
},
3839
"devDependencies": {
40+
"@biomejs/biome": "1.9.4",
3941
"@commitlint/cli": "^19.6.1",
4042
"@commitlint/config-angular": "^19.7.0",
4143
"@testing-library/dom": "^10.4.0",
@@ -50,7 +52,6 @@
5052
"esm": "3.2.25",
5153
"happy-dom": "^17.1.0",
5254
"mversion": "2.0.1",
53-
"prettier": "3.4.2",
5455
"react": "19.0.0",
5556
"react-dom": "19.0.0",
5657
"react-is": "19.0.0",

pnpm-lock.yaml

Lines changed: 91 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/__tests__/generateOptionsFixture.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { defaultOptions, type Options } from '../options';
1+
import { type Options, defaultOptions } from "../options";
22

33
export function generateOptionsFixture(
4-
fixtureOptions: Partial<Options>
4+
fixtureOptions: Partial<Options>,
55
): Options {
66
return {
77
...defaultOptions,
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
import { describe, it, expect } from 'vitest';
2-
import createPropFilter from './createPropFilter';
1+
import { describe, expect, it } from "vitest";
2+
import createPropFilter from "./createPropFilter";
33

4-
describe('createPropFilter', () => {
5-
it('should filter based on an array of keys', () => {
4+
describe("createPropFilter", () => {
5+
it("should filter based on an array of keys", () => {
66
const props = {
77
a: 1,
88
b: 2,
99
c: 3,
1010
};
1111

12-
const filter = createPropFilter(props, ['b']);
12+
const filter = createPropFilter(props, ["b"]);
1313

1414
const filteredPropKeys = Object.keys(props).filter(filter);
1515

16-
expect(filteredPropKeys).toEqual(['a', 'c']);
16+
expect(filteredPropKeys).toEqual(["a", "c"]);
1717
});
1818

19-
it('should filter based on a callback', () => {
19+
it("should filter based on a callback", () => {
2020
const props = {
2121
a: 1,
2222
b: 2,
@@ -25,11 +25,11 @@ describe('createPropFilter', () => {
2525

2626
const filter = createPropFilter(
2727
props,
28-
(val, key) => key !== 'b' && val < 3
28+
(val, key) => key !== "b" && val < 3,
2929
);
3030

3131
const filteredPropKeys = Object.keys(props).filter(filter);
3232

33-
expect(filteredPropKeys).toEqual(['a']);
33+
expect(filteredPropKeys).toEqual(["a"]);
3434
});
3535
});

0 commit comments

Comments
 (0)