Skip to content
This repository was archived by the owner on Oct 27, 2025. It is now read-only.

Commit bcae8c8

Browse files
juliette0704Shedna
authored andcommitted
feat(config): add biome and semantic release for automatic deployments
1 parent d1dbf90 commit bcae8c8

File tree

10 files changed

+9298
-3194
lines changed

10 files changed

+9298
-3194
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
name: Publish to npm
22

33
on:
4-
release:
5-
types: [published]
4+
push:
5+
branches: main
6+
7+
env:
8+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
9+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
610

711
jobs:
812
run-tests:
@@ -13,13 +17,12 @@ jobs:
1317
runs-on: ubuntu-latest
1418
steps:
1519
- uses: actions/checkout@v4
16-
# Setup .npmrc file to publish to npm
20+
with:
21+
fetch-depth: 0
22+
token: ${{ secrets.GH_TOKEN }}
1723
- uses: actions/setup-node@v4
1824
with:
19-
node-version: '20.x'
20-
registry-url: 'https://registry.npmjs.org'
25+
node-version: '20.19.0'
2126
- run: npm ci
2227
- run: npm run build
23-
- run: npm publish --access public
24-
env:
25-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
28+
- run: npm run semantic-release

.husky/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npm run commitlint ${1}

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npm run lint && npm run prune && npm test

.prettierrc

Lines changed: 0 additions & 9 deletions
This file was deleted.

biome.json

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.0.5/schema.json",
3+
"assist": {
4+
"actions": {
5+
"source": {
6+
"organizeImports": "on",
7+
"useSortedAttributes": "on",
8+
"useSortedKeys": "on",
9+
"useSortedProperties": "on"
10+
}
11+
},
12+
"enabled": true
13+
},
14+
"files": {
15+
"ignoreUnknown": false,
16+
"includes": ["src/**/*.ts"]
17+
},
18+
"formatter": {
19+
"enabled": true,
20+
"formatWithErrors": true,
21+
"indentStyle": "space",
22+
"indentWidth": 2,
23+
"lineEnding": "lf",
24+
"lineWidth": 100
25+
},
26+
"javascript": {
27+
"formatter": {
28+
"arrowParentheses": "asNeeded",
29+
"bracketSameLine": false,
30+
"bracketSpacing": true,
31+
"jsxQuoteStyle": "single",
32+
"lineWidth": 100,
33+
"quoteProperties": "asNeeded",
34+
"quoteStyle": "single",
35+
"semicolons": "always",
36+
"trailingCommas": "all"
37+
}
38+
},
39+
"linter": {
40+
"enabled": true,
41+
"rules": {
42+
"correctness": {
43+
"noUnusedImports": {
44+
"level": "warn"
45+
}
46+
},
47+
"nursery": {
48+
"noFloatingPromises": "error"
49+
},
50+
"recommended": true,
51+
"style": {
52+
"noInferrableTypes": "error",
53+
"noParameterAssign": "error",
54+
"noUnusedTemplateLiteral": "error",
55+
"noUselessElse": "error",
56+
"useAsConstAssertion": "error",
57+
"useDefaultParameterLast": "error",
58+
"useEnumInitializers": "error",
59+
"useImportType": "off",
60+
"useNumberNamespace": "error",
61+
"useSelfClosingElements": "error",
62+
"useSingleVarDeclarator": "error"
63+
}
64+
}
65+
},
66+
"vcs": {
67+
"clientKind": "git",
68+
"enabled": false,
69+
"useIgnoreFile": false
70+
}
71+
}

eslint.config.mjs

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)