Skip to content

Commit

Permalink
Use Biome
Browse files Browse the repository at this point in the history
  • Loading branch information
evadecker committed Aug 5, 2024
1 parent 389826e commit 206dc5f
Show file tree
Hide file tree
Showing 56 changed files with 1,634 additions and 2,237 deletions.
13 changes: 0 additions & 13 deletions .eslintignore

This file was deleted.

30 changes: 0 additions & 30 deletions .eslintrc.cjs

This file was deleted.

14 changes: 0 additions & 14 deletions .eslintrc.js

This file was deleted.

13 changes: 0 additions & 13 deletions .prettierignore

This file was deleted.

9 changes: 0 additions & 9 deletions .prettierrc

This file was deleted.

31 changes: 0 additions & 31 deletions .prettierrc.json

This file was deleted.

4 changes: 2 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"recommendations": ["astro-build.astro-vscode"],
"unwantedRecommendations": []
"recommendations": ["astro-build.astro-vscode", "biomejs.biome"],
"unwantedRecommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint"]
}
8 changes: 3 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
{
"eslint.validate": ["javascript", "javascriptreact", "astro", "typescript", "typescriptreact"],
"editor.formatOnPaste": true,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.defaultFormatter": "biomejs.biome",
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "biomejs.biome"
},
"eslint.enable": true,
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "biomejs.biome"
},
"[svelte]": {
"editor.defaultFormatter": "svelte.svelte-vscode"
Expand Down
27 changes: 27 additions & 0 deletions biome.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"files": {
"ignore": [
"**/.DS_Store",
"./build",
"./coverage",
".vscode",
".vercel",
".svelte-kit",
"./package",
"**/.env",
"**/.env.*",
"**/pnpm-lock.yaml"
]
},
"formatter": {
"enabled": true,
"formatWithErrors": false,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf"
},
"organizeImports": { "enabled": true },
"linter": { "enabled": true, "rules": { "recommended": true } },
"overrides": [{ "include": ["*.svelte"] }]
}
13 changes: 3 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
"preview": "vite preview",
"prepare": "svelte-kit sync",
"test": "npm run test:integration && npm run test:unit",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json && biome check",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --plugin-search-dir . --check . && eslint .",
"format": "prettier --plugin-search-dir . --write .",
"check:format": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json && biome check --write",
"test:integration": "playwright test",
"test:unit": "vitest",
"test:unit-coverage": "vitest --coverage",
Expand All @@ -33,6 +32,7 @@
"svelte-preprocess": "^6.0.1"
},
"devDependencies": {
"@biomejs/biome": "^1.8.3",
"@iconify-json/ri": "^1.1.21",
"@melt-ui/pp": "^0.3.2",
"@melt-ui/svelte": "^0.83.0",
Expand All @@ -42,16 +42,9 @@
"@sveltejs/kit": "^2.5.18",
"@sveltejs/vite-plugin-svelte": "^3.1.1",
"@testing-library/svelte": "^5.2.0",
"@typescript-eslint/eslint-plugin": "^7.15.0",
"@typescript-eslint/parser": "^7.15.0",
"@vitest/coverage-v8": "^2.0.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.41.0",
"jsdom": "^24.1.0",
"mdsvex": "^0.11.2",
"prettier": "^2.8.8",
"prettier-plugin-svelte": "^2.10.1",
"sass": "^1.77.6",
"supabase": "^1.178.2",
"svelte": "^4.2.18",
Expand Down
12 changes: 6 additions & 6 deletions playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import type { PlaywrightTestConfig } from '@playwright/test';
import type { PlaywrightTestConfig } from "@playwright/test";

const config: PlaywrightTestConfig = {
webServer: {
command: 'npm run build && npm run preview',
port: 4173
command: "npm run build && npm run preview",
port: 4173,
},
testDir: 'tests',
testDir: "tests",
testMatch: /(.+\.)?(test|spec)\.[jt]s/,
use: {
baseURL: 'http://localhost:4173'
}
baseURL: "http://localhost:4173",
},
};

export default config;
Loading

0 comments on commit 206dc5f

Please sign in to comment.