Skip to content

Commit fcb67ea

Browse files
Merge pull request #286 from observerly/ci/workspace/biome
ci: amend to using biome.js across workspace in @observerly/astrometry
2 parents b129ddc + 613cbd3 commit fcb67ea

34 files changed

Lines changed: 356 additions & 981 deletions

.vscode/extensions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
2+
"recommendations": ["biomejs.biome"]
33
}

.vscode/settings.json

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
{
22
"editor.formatOnSave": true,
3-
"editor.defaultFormatter": "esbenp.prettier-vscode",
4-
"prettier.requireConfig": true,
5-
"prettier.singleQuote": true,
6-
"prettier.trailingComma": "all",
7-
"prettier.tabWidth": 4,
8-
"prettier.useTabs": false,
3+
"editor.defaultFormatter": "biomejs.biome",
94
"typescript.preferences.importModuleSpecifier": "relative",
105
"typescript.format.enable": false,
116
"typescript.tsdk": "node_modules/typescript/lib",
127
"[typescript]": {
13-
"editor.defaultFormatter": "esbenp.prettier-vscode"
8+
"editor.defaultFormatter": "biomejs.biome"
149
},
1510
"[javascript]": {
16-
"editor.defaultFormatter": "esbenp.prettier-vscode"
11+
"editor.defaultFormatter": "biomejs.biome"
12+
},
13+
"[json]": {
14+
"editor.defaultFormatter": "biomejs.biome"
1715
},
1816
"files.exclude": {
1917
"**/node_modules": true,
@@ -30,6 +28,7 @@
3028
"editor.formatOnSave": "always",
3129
"source.organizeImports": "always",
3230
"source.sortImports": "always",
33-
"source.fixAll": "always"
31+
"source.fixAll": "always",
32+
"quickfix.biome": "explicit"
3433
}
3534
}

biome.json

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
3+
"files": {
4+
"include": [
5+
"src/**/*.ts",
6+
"src/**/*.tsx",
7+
"src/**/*.js",
8+
"src/**/*.jsx",
9+
"lib/**/*.ts",
10+
"lib/**/*.tsx",
11+
"lib/**/*.js",
12+
"lib/**/*.jsx",
13+
"./biome.json",
14+
"./package.json",
15+
"./tsconfig.json",
16+
"./vite.config.ts"
17+
],
18+
"ignore": ["node_modules", "**/node_modules/**", "dist", "bin"],
19+
"ignoreUnknown": true
20+
},
21+
"formatter": {
22+
"enabled": true,
23+
"ignore": ["dist", "node_modules"]
24+
},
25+
"linter": {
26+
"enabled": true,
27+
"ignore": ["dist", "node_modules"],
28+
"rules": {
29+
"recommended": true,
30+
"style": {
31+
"noParameterAssign": {
32+
"level": "info"
33+
}
34+
},
35+
"suspicious": {
36+
"noApproximativeNumericConstant": {
37+
"level": "info"
38+
}
39+
}
40+
}
41+
},
42+
"organizeImports": {
43+
"enabled": true
44+
},
45+
"overrides": [
46+
{
47+
"include": ["*.json"],
48+
"formatter": {
49+
"indentWidth": 2
50+
}
51+
}
52+
],
53+
"javascript": {
54+
"formatter": {
55+
"enabled": true,
56+
"lineWidth": 100,
57+
"semicolons": "asNeeded",
58+
"trailingCommas": "none",
59+
"indentWidth": 2,
60+
"indentStyle": "space",
61+
"arrowParentheses": "asNeeded",
62+
"quoteStyle": "single"
63+
}
64+
},
65+
"json": {
66+
"formatter": {
67+
"enabled": true,
68+
"indentWidth": 2,
69+
"indentStyle": "space"
70+
},
71+
"linter": {
72+
"enabled": true
73+
}
74+
},
75+
"vcs": {
76+
"enabled": true,
77+
"clientKind": "git"
78+
}
79+
}

package.json

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414
"registry": "https://npm.pkg.github.com/observerly"
1515
},
1616
"type": "module",
17-
"files": [
18-
"dist"
19-
],
17+
"files": ["dist"],
2018
"keywords": [
2119
"astronomy",
2220
"astrometry",
@@ -204,32 +202,26 @@
204202
}
205203
},
206204
"release": {
207-
"branches": [
208-
"main"
209-
]
205+
"branches": ["main"]
210206
},
211207
"scripts": {
212208
"build": "tsc --noEmit && vite build",
213-
"format": "prettier \"src/**/*.ts\" --write",
214-
"lint": "eslint src --ext .ts --fix",
209+
"format": "npx @biomejs/biome format --write",
210+
"lint": "npx @biomejs/biome lint --write",
215211
"test": "vitest",
216212
"benchmark": "tsx ./benchmarks/index.ts",
217213
"coverage": "vitest run --coverage"
218214
},
219215
"devDependencies": {
216+
"@biomejs/biome": "1.8.3",
220217
"@changesets/cli": "^2.26.2",
221218
"@rollup/plugin-typescript": "^11.1.6",
222219
"@types/geojson": "^7946.0.14",
223220
"@types/node": "^20.11.19",
224-
"@typescript-eslint/eslint-plugin": "^6.3.0",
225221
"@vitest/coverage-v8": "^2.0.4",
226-
"eslint": "^8.47.0",
227-
"eslint-config-prettier": "^9.0.0",
228-
"eslint-plugin-prettier": "^5.0.0",
229222
"husky": "^8.0.3",
230223
"lint-staged": "^13.2.3",
231224
"path": "^0.12.7",
232-
"prettier": "3.0.1",
233225
"rollup": "^4.14.1",
234226
"tinybench": "^2.8.0",
235227
"tslib": "^2.6.1",
@@ -244,10 +236,13 @@
244236
}
245237
},
246238
"lint-staged": {
247-
"*.{ts,tsx}": [
248-
"prettier --write",
249-
"eslint --fix",
250-
"git add -A ."
239+
"*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}": [
240+
"biome check --files-ignore-unknown=true",
241+
"biome check --write --no-errors-on-unmatched",
242+
"biome check --write --organize-imports-enabled=false --no-errors-on-unmatched",
243+
"biome check --write --unsafe --no-errors-on-unmatched",
244+
"biome format --write --no-errors-on-unmatched",
245+
"biome lint --write --no-errors-on-unmatched"
251246
]
252247
}
253248
}

0 commit comments

Comments
 (0)