Skip to content

Commit

Permalink
Merge pull request #442 from meshtastic/biome
Browse files Browse the repository at this point in the history
Biome
  • Loading branch information
sachaw authored Jan 6, 2024
2 parents 3351a00 + b39ec21 commit 6ca30e1
Show file tree
Hide file tree
Showing 23 changed files with 214 additions and 1,371 deletions.
20 changes: 0 additions & 20 deletions .eslintrc.json

This file was deleted.

35 changes: 11 additions & 24 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,17 @@
name: "Code Lint Check"
on: [pull_request]

env:
NODE_VERSION: 18
on: [push, pull_request]

jobs:
lint:
name: Lint Project
quality:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Code Checkout
uses: actions/checkout@v3

- name: PNPM Setup
uses: pnpm/action-setup@v2
with:
version: 7

- name: Install NodeJS ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
- name: Checkout
uses: actions/checkout@v4
- name: Setup Biome
uses: biomejs/setup-biome@v1
with:
node-version: ${{ env.NODE_VERSION }}
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Run Linter
run: pnpm run ui:lint
version: latest
- name: Run Biome
run: biome ci .
5 changes: 2 additions & 3 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"rust-lang.rust-analyzer",
"tauri-apps.tauri-vscode"
"tauri-apps.tauri-vscode",
"biomejs.biome"
]
}
11 changes: 2 additions & 9 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
{
"files.eol": "\n",
"editor.tabSize": 2,
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
"editor.formatOnSave": true,
"editor.defaultFormatter": "biomejs.biome",
}
17 changes: 17 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://biomejs.dev/schemas/1.3.3/schema.json",
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2
},
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"all": true
}
}
}
11 changes: 4 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
"rust:test": "cd src-tauri; cargo test",
"ui:dev": "vite",
"ui:build": "tsc && vite build",
"ui:lint": "eslint src/*.{ts,tsx}",
"ui:format": "prettier --write ./src && eslint src/*.{ts,tsx}",
"ui:lint": "biome lint src",
"ui:format": "biome format src",
"ui:check": "biome check src",
"ui:test": "jest --passWithNoTests",
"ui:preview": "vite preview"
},
Expand Down Expand Up @@ -75,7 +76,7 @@
"uuid": "^9.0.0"
},
"devDependencies": {
"@meshtastic/eslint-config": "^1.0.8",
"@biomejs/biome": "^1.4.1",
"@tauri-apps/cli": "^1.1.1",
"@types/jest": "^29.2.0",
"@types/lodash.clonedeep": "^4.5.7",
Expand All @@ -90,14 +91,10 @@
"@types/redux-logger": "^3.0.9",
"@types/uuid": "^9.0.1",
"@types/w3c-web-serial": "^1.0.3",
"@typescript-eslint/eslint-plugin": "^5.40.1",
"@typescript-eslint/parser": "^5.40.1",
"@vitejs/plugin-react": "^3.0.1",
"autoprefixer": "^10.4.13",
"eslint": "^8.25.0",
"jest": "^29.2.2",
"postcss": "^8.4.18",
"prettier": "^2.7.1",
"tailwindcss": "^3.2.1",
"ts-jest": "^29.0.3",
"typescript": "^4.8.4",
Expand Down
Loading

0 comments on commit 6ca30e1

Please sign in to comment.