Skip to content

Commit 344c2f0

Browse files
authored
Adopt Biome, Drop ESLint and Prettier (#770)
* Adopt Biome, ditch Prettier + ESLint * Enable import sorting + type imports * Enable again useExhaustiveDependencies * Enable Biome's formatter * Ensure LF line endings * Remove any mention of ESLint
1 parent 5ac79f1 commit 344c2f0

78 files changed

Lines changed: 392 additions & 1472 deletions

File tree

Some content is hidden

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

.eslintignore

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

.eslintrc.cjs

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

.github/workflows/build.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,7 @@ jobs:
4242
- name: 'Test: Rust (+ Generate Types)'
4343
run: yarn run gen
4444

45-
- name: 'Test: formatting'
46-
run: 'yarn run test:formatting'
47-
48-
- name: 'Test: TS/JS linting'
45+
- name: 'Test: TS/JS linting & formatting'
4946
run: 'yarn run test:lint'
5047

5148
- name: 'Test: CSS linting'

.prettierignore

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

.prettierrc

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

.vscode/extensions.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
{
22
"recommendations": [
3-
"dbaeumer.vscode-eslint",
4-
"vunguyentuan.vscode-postcss",
5-
"esbenp.prettier-vscode",
6-
"stylelint.vscode-stylelint",
7-
"tauri-apps.tauri-vscode",
8-
"rust-lang.rust-analyzer"
3+
"biomejs.biome",
4+
"vunguyentuan.vscode-postcss",
5+
"stylelint.vscode-stylelint",
6+
"tauri-apps.tauri-vscode",
7+
"rust-lang.rust-analyzer"
98
]
109
}

biome.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.6.4/schema.json",
3+
"linter": {
4+
"enabled": true,
5+
"rules": {
6+
"recommended": true,
7+
"complexity": {
8+
"noForEach": "off"
9+
},
10+
"suspicious": {
11+
"noImplicitAnyLet": "off"
12+
}
13+
}
14+
},
15+
"formatter": {
16+
"enabled": true,
17+
"indentStyle": "space",
18+
"lineEnding": "lf"
19+
},
20+
"javascript": {
21+
"formatter": {
22+
"quoteStyle": "single"
23+
}
24+
},
25+
"files": {
26+
"ignore": [
27+
"node_modules",
28+
"dist",
29+
"src/generated/typings/*.ts",
30+
"!src/generated/typings/index.ts",
31+
"src-tauri/target/**/*",
32+
"src-tauri/gen/**/*"
33+
]
34+
}
35+
}

package.json

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,12 @@
2121
"gen": "bash scripts/gen.sh",
2222
"test:typings": "tsc --noEmit --project ./tsconfig.json",
2323
"test:unit": "vitest run",
24-
"test:lint": "eslint src",
25-
"test:lint:fix": "eslint src --fix",
26-
"test:formatting": "prettier --check \"./**/*.{ts,tsx,js}\"",
27-
"test:formatting:fix": "prettier --write \"./**/*.{ts,tsx,js}\"",
24+
"test:lint": "biome ci .",
25+
"test:lint:fix": "biome check --apply .",
2826
"test:css": "stylelint \"src/**/*.css\"",
2927
"package:checksums": "bash scripts/checksum.sh"
3028
},
31-
"browserslist": [
32-
"defaults"
33-
],
29+
"browserslist": ["defaults"],
3430
"dependencies": {
3531
"@radix-ui/react-aspect-ratio": "^1.0.3",
3632
"@radix-ui/react-popover": "^1.0.7",
@@ -59,30 +55,20 @@
5955
"zustand": "^4.5.2"
6056
},
6157
"devDependencies": {
58+
"@biomejs/biome": "1.6.4",
6259
"@tauri-apps/cli": "^2.0.0-beta.9",
6360
"@types/lodash": "^4.17.0",
6461
"@types/react": "^18.2.73",
6562
"@types/react-dom": "^18.2.23",
6663
"@types/semver": "^7.5.8",
67-
"@typescript-eslint/eslint-plugin": "^7.4.0",
68-
"@typescript-eslint/parser": "^7.4.0",
6964
"@vitejs/plugin-react": "^4.2.1",
7065
"autoprefixer": "^10.4.19",
71-
"eslint": "^8.57.0",
72-
"eslint-config-prettier": "^9.1.0",
73-
"eslint-plugin-import": "^2.29.1",
74-
"eslint-plugin-jsx-a11y": "^6.8.0",
75-
"eslint-plugin-prettier": "^5.1.3",
76-
"eslint-plugin-react": "^7.34.1",
77-
"eslint-plugin-react-hooks": "^4.6.0",
7866
"normalize.css": "^8.0.1",
7967
"postcss": "^8.4.38",
8068
"postcss-import": "^16.1.0",
8169
"postcss-nested": "^6.0.1",
8270
"postcss-scss": "^4.0.9",
8371
"postcss-url": "^10.1.3",
84-
"prettier": "^3.2.5",
85-
"prettier-eslint": "^16.3.0",
8672
"stylelint": "^16.3.1",
8773
"stylelint-config-css-modules": "^4.4.0",
8874
"stylelint-config-standard": "^36.0.0",

postcss.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ export default {
33
plugins: {
44
'postcss-import': {},
55
'postcss-nested': {},
6-
'autoprefixer': {}
6+
autoprefixer: {},
77
},
88
};

src/components/AudioOutputSelect/AudioOutputSelect.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import React, { useEffect, useState } from 'react';
1+
import type React from 'react';
2+
import { useEffect, useState } from 'react';
23

3-
import * as Setting from '../Setting/Setting';
44
import { logAndNotifyError } from '../../lib/utils';
5+
import * as Setting from '../Setting/Setting';
56

67
type Props = {
78
defaultValue: string;

0 commit comments

Comments
 (0)