Skip to content

Commit 185fcc9

Browse files
authored
chore: add biome (#7)
1 parent b3d6694 commit 185fcc9

File tree

5 files changed

+202
-11
lines changed

5 files changed

+202
-11
lines changed

.github/workflows/linter.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: PR Prettier Check
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
permissions:
9+
pull-requests: read
10+
11+
jobs:
12+
########### LINT PACKAGE ############
13+
lint-package:
14+
name: Lint Package
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: PNPM Install
21+
uses: pnpm/action-setup@v4
22+
with:
23+
version: 9.14.2
24+
25+
- name: Setup Node
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 23.5.0
29+
cache: 'pnpm'
30+
registry-url: https://registry.npmjs.org/
31+
32+
- run: corepack enable
33+
34+
- name: Install NPM Dependencies
35+
run: pnpm install --frozen-lockfile
36+
37+
- name: Prettier Check
38+
if: ${{ always() }}
39+
run: pnpm fmt.check && pnpm lint.check

.github/workflows/pr.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Validate PR title
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
permissions:
9+
pull-requests: read
10+
11+
jobs:
12+
############ SEMANTIC PR TITLE VALIDATION ############
13+
semantic-pr:
14+
name: Validate PR title
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: amannn/[email protected]
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

biome.json

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.6.1/schema.json",
3+
"organizeImports": {
4+
"enabled": true
5+
},
6+
"linter": {
7+
"enabled": true,
8+
"rules": {
9+
"recommended": true,
10+
"style": {
11+
"noNonNullAssertion": "off",
12+
"noParameterAssign": "off",
13+
"useTemplate": "off"
14+
},
15+
"suspicious": {
16+
"noExplicitAny": "off",
17+
"noDoubleEquals": "off"
18+
},
19+
"security": {
20+
"noDangerouslySetInnerHtml": "off"
21+
}
22+
}
23+
},
24+
"files": {
25+
"ignore": ["*.code-snippets", "tsconfig*json"]
26+
},
27+
"formatter": {
28+
"enabled": true,
29+
"formatWithErrors": false,
30+
"indentStyle": "space",
31+
"indentWidth": 2,
32+
"lineWidth": 80,
33+
"lineEnding": "lf"
34+
},
35+
"javascript": {
36+
"formatter": {
37+
"quoteStyle": "single",
38+
"semicolons": "always"
39+
}
40+
}
41+
}

package.json

+10-5
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,28 @@
88
"qwik-demo.dev": "pnpm --filter fontless-demo-qwik-app dev",
99
"react-demo.dev": "pnpm --filter fontless-demo-react-app dev",
1010
"vue-demo.dev": "pnpm --filter fontless-demo-vue-app dev",
11-
"demo.dev": "pnpm --filter fontless-demo-* dev"
11+
"demo.dev": "pnpm --filter fontless-demo-* dev",
12+
"lint": "biome lint . --write",
13+
"lint:check": "biome lint .",
14+
"fmt": "biome format . --write",
15+
"fmt:check": "biome format ."
1216
},
1317
"keywords": [],
1418
"author": "",
1519
"license": "ISC",
1620
"devDependencies": {
21+
"@biomejs/biome": "^1.9.4",
1722
"css-tree": "^3.1.0",
1823
"esbuild": "^0.24.0",
1924
"fontaine": "^0.5.0",
25+
"jiti": "^2.4.2",
26+
"magic-regexp": "^0.8.0",
2027
"magic-string": "^0.30.17",
21-
"pathe": "^1.1.2",
2228
"ohash": "^1.1.4",
29+
"pathe": "^1.1.2",
30+
"tinyglobby": "^0.2.10",
2331
"ufo": "^1.5.4",
2432
"unifont": "^0.1.6",
25-
"tinyglobby": "^0.2.10",
26-
"jiti": "^2.4.2",
27-
"magic-regexp": "^0.8.0",
2833
"vite": "^6.0.3"
2934
}
3035
}

pnpm-lock.yaml

+93-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)