Skip to content

Commit

Permalink
Replace ESLint with Biome (#414)
Browse files Browse the repository at this point in the history
  • Loading branch information
macjuul authored Sep 6, 2024
1 parent 8e34654 commit 065c690
Show file tree
Hide file tree
Showing 314 changed files with 30,066 additions and 8,241 deletions.
7 changes: 0 additions & 7 deletions .eslintignore

This file was deleted.

44 changes: 0 additions & 44 deletions .eslintrc

This file was deleted.

15 changes: 4 additions & 11 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,13 @@ jobs:
- name: Build frontend
run: pnpm install --no-frozen-lockfile && pnpm build

- name: Check formatting
- name: Frontend linting
run: |
cd src-tauri
cargo fmt --all -- --check
cd ..
- name: Test Tauri
run: |
cd src-tauri
cargo test --all-features
cd ..
pnpm lint:check
- name: Clippy
- name: Backend linting
run: |
cd src-tauri
cargo fmt --all -- --check
cargo clippy -- -D warnings
cd ..
6 changes: 5 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"]
"recommendations": [
"tauri-apps.tauri-vscode",
"rust-lang.rust-analyzer",
"biomejs.biome"
]
}

6 changes: 3 additions & 3 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
{
"type": "npm",
"script": "lint",
"script": "lint:check",
"label": "Lint",
"detail": "Run the linter",
"icon": {
Expand All @@ -24,8 +24,8 @@
},
{
"type": "npm",
"script": "lint:fix",
"label": "Lint and fix",
"script": "lint:apply",
"label": "Lint (Apply fixes)",
"detail": "Run the linter and fix issues",
"icon": {
"id": "vm-running"
Expand Down
54 changes: 54 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"suspicious": {
"noExplicitAny": "off",
"noThenProperty": "off",
"noMisleadingCharacterClass": "off",
"noArrayIndexKey": "off"
},
"style": {
"noUnusedTemplateLiteral": "off"
},
"correctness": {
"useExhaustiveDependencies": {
"level": "error",
"options": {
"hooks": [
{ "name": "useInputState", "stableResult": [1] },
{ "name": "useDisclosure", "stableResult": [1] },
{ "name": "useBoolean", "stableResult": [1] },
{ "name": "useOnboarding", "stableResult": [1] },
{ "name": "useImmer", "stableResult": [1] },
{ "name": "useNodesState", "stableResult": [1, 2] },
{ "name": "useEdgesState", "stableResult": [1, 2] },
{ "name": "useStable", "stableResult": true },
{ "name": "useReactFlow", "stableResult": true }
]
}
}
}
}
},
"formatter": {
"enabled": true,
"indentWidth": 4,
"indentStyle": "tab"
},
"files": {
"ignore": [
".vscode",
".github",
"node_modules",
"src-tauri",
"dist",
"*.js"
]
}
}
Loading

0 comments on commit 065c690

Please sign in to comment.