Skip to content

Commit 2b3642f

Browse files
committed
feat: switch to biome.js
- Upgrade all dependencies - Remove eslint
1 parent 8a22b9c commit 2b3642f

20 files changed

Lines changed: 3727 additions & 4219 deletions

.eslintrc.js

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

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ npm-debug.log
1616
.project
1717
.tmp
1818
.eslintignore
19+
biome.json
1920
.flowconfig
2021
.editorconfig
2122
storybook/.storybook

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.5.3/schema.json",
3+
"files": {
4+
"ignore": ["node_modules/**", "dist/**", "storybook-static/**"]
5+
},
6+
"organizeImports": {
7+
"enabled": true
8+
},
9+
"linter": {
10+
"enabled": true,
11+
"rules": {
12+
"recommended": true,
13+
"complexity": {
14+
"noForEach": "off"
15+
},
16+
"a11y": {
17+
"noSvgWithoutTitle": "off"
18+
}
19+
}
20+
},
21+
"overrides": [
22+
{
23+
"include": ["**/*.test.ts", "**/*.test.tsx"],
24+
"linter": {
25+
"rules": {
26+
"style": {
27+
"noUnusedTemplateLiteral": "off"
28+
}
29+
}
30+
}
31+
}
32+
],
33+
"vcs": {
34+
"enabled": true,
35+
"clientKind": "git",
36+
"useIgnoreFile": true
37+
}
38+
}

package.json

Lines changed: 19 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@
3030
"build:bundle": "tsup src/index.tsx",
3131
"build:legacy": "tsup src/index.tsx --format esm --legacy-output --no-clean --no-dts",
3232
"build:utils": "tsc -p tsconfig.test.json",
33-
"build:copy": "node scripts/build-copy.js",
33+
"build:copy": "node scripts/build-copy.cjs",
3434
"postbuild": "size-limit",
3535
"dev": "run-p dev:*",
3636
"dev:package": "tsup src/index.tsx --watch",
3737
"dev:storybook": "pnpm --filter storybook dev",
38-
"lint": "eslint . --ext js,ts,tsx",
38+
"lint": "biome lint .",
3939
"release": "np --contents dist",
4040
"version": "pnpm build",
4141
"storybook:build": "pnpm build:bundle && pnpm --filter storybook build",
@@ -58,14 +58,6 @@
5858
"trailingComma": "all",
5959
"proseWrap": "always"
6060
},
61-
"eslintIgnore": [
62-
"*.snap",
63-
"test-utils.js",
64-
"dist/**",
65-
"lib/**",
66-
"example/**",
67-
"webpack.config.js"
68-
],
6961
"release": {
7062
"branches": [
7163
"main",
@@ -87,15 +79,14 @@
8779
]
8880
},
8981
"simple-git-hooks": {
90-
"pre-commit": "npx lint-staged"
82+
"pre-commit": "npx lint-staged && vitest run"
9183
},
9284
"lint-staged": {
9385
"*.{js,json,css,md,ts,tsx}": [
9486
"prettier --write"
9587
],
9688
"src/**/*.{ts,tsx}": [
97-
"eslint",
98-
"vitest related --run"
89+
"biome lint --apply"
9990
]
10091
},
10192
"size-limit": [
@@ -122,31 +113,25 @@
122113
"react": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0"
123114
},
124115
"devDependencies": {
125-
"@size-limit/preset-small-lib": "^8.2.4",
126-
"@testing-library/jest-dom": "^5.16.5",
127-
"@testing-library/react": "^14.0.0",
128-
"@types/jest": "^29.5.2",
129-
"@types/react": "^18.2.12",
130-
"@types/react-dom": "^18.2.5",
131-
"@typescript-eslint/eslint-plugin": "^5.59.11",
132-
"@typescript-eslint/parser": "^5.59.11",
133-
"eslint": "^8.43.0",
134-
"eslint-plugin-import": "^2.27.5",
135-
"eslint-plugin-jsx-a11y": "^6.7.1",
136-
"eslint-plugin-react": "^7.32.2",
137-
"eslint-plugin-react-hooks": "^4.6.0",
138-
"jsdom": "^22.1.0",
139-
"lint-staged": "^13.2.2",
116+
"@biomejs/biome": "^1.5.3",
117+
"@size-limit/preset-small-lib": "^11.0.2",
118+
"@testing-library/jest-dom": "^6.4.0",
119+
"@testing-library/react": "^14.2.0",
120+
"@types/jest": "^29.5.11",
121+
"@types/react": "^18.2.48",
122+
"@types/react-dom": "^18.2.18",
123+
"jsdom": "^24.0.0",
124+
"lint-staged": "^15.2.1",
140125
"microbundle": "^0.15.1",
141126
"npm-run-all": "^4.1.5",
142-
"prettier": "^2.8.8",
127+
"prettier": "^3.2.4",
143128
"react": "^18.2.0",
144129
"react-dom": "^18.2.0",
145-
"simple-git-hooks": "^2.8.1",
146-
"size-limit": "^8.2.4",
147-
"tsup": "^7.0.0",
148-
"typescript": "^5.1.3",
149-
"vitest": "^0.32.2"
130+
"simple-git-hooks": "^2.9.0",
131+
"size-limit": "^11.0.2",
132+
"tsup": "^8.0.1",
133+
"typescript": "^5.3.3",
134+
"vitest": "^1.2.2"
150135
},
151136
"pnpm": {
152137
"peerDependencyRules": {

0 commit comments

Comments
 (0)