Skip to content

Commit

Permalink
💚 Add Biome as linter & prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Romitou committed Jun 25, 2024
1 parent 0e480df commit b7ed676
Show file tree
Hide file tree
Showing 8 changed files with 6,325 additions and 4,123 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
24 changes: 0 additions & 24 deletions .eslintrc.js

This file was deleted.

35 changes: 35 additions & 0 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Code quality
on: [push]
jobs:
biome:
name: Biome
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Cache node modules
uses: actions/cache@v3
id: cache
env:
cache-name: cache-node-modules
with:
path: ./node_modules/
key: ${{ runner.os }}-build-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-
- name: Install Node 20
uses: actions/setup-node@v3
with:
node-version: 20

- name: Install modules
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci

- name: Build
run: npm run build

- name: Run Biome checks
run: npm run ci
22 changes: 22 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.2/schema.json",
"organizeImports": {
"enabled": true,
"include": ["components/**/*.vue", "pages/**/*.vue", "plugins/**/*.ts", "store/**/*.ts", "typings/**/*.ts"]
},
"formatter": {
"enabled": true,
"include": ["components/**/*.vue", "pages/**/*.vue", "plugins/**/*.ts", "store/**/*.ts", "typings/**/*.ts"],
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 120
},
"linter": {
"enabled": true,
"include": ["components/**/*.vue", "pages/**/*.vue", "plugins/**/*.ts", "store/**/*.ts", "typings/**/*.ts"],
"rules": {
"recommended": true
}
}
}
6 changes: 0 additions & 6 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import eslintPlugin from 'vite-plugin-eslint';
import { metaTags } from './site.config';

// https://v3.nuxtjs.org/api/configuration/nuxt.config
Expand Down Expand Up @@ -30,10 +29,5 @@ export default defineNuxtConfig({
},
nitro: {
preset: 'cloudflare-pages'
},
vite: {
plugins: [
eslintPlugin()
]
}
});
Loading

0 comments on commit b7ed676

Please sign in to comment.