Skip to content

Commit

Permalink
ci: amend to using biome.js across workspace in @observerly/astrometry
Browse files Browse the repository at this point in the history
ci: amend to using biome.js across workspace in @observerly/astrometry
  • Loading branch information
michealroberts committed Oct 19, 2024
1 parent 6750df4 commit 24cb004
Show file tree
Hide file tree
Showing 34 changed files with 350 additions and 975 deletions.
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
"recommendations": ["biomejs.biome"]
}
17 changes: 8 additions & 9 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"prettier.requireConfig": true,
"prettier.singleQuote": true,
"prettier.trailingComma": "all",
"prettier.tabWidth": 4,
"prettier.useTabs": false,
"editor.defaultFormatter": "biomejs.biome",
"typescript.preferences.importModuleSpecifier": "relative",
"typescript.format.enable": false,
"typescript.tsdk": "node_modules/typescript/lib",
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "biomejs.biome"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "biomejs.biome"
},
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
},
"files.exclude": {
"**/node_modules": true,
Expand All @@ -30,6 +28,7 @@
"editor.formatOnSave": "always",
"source.organizeImports": "always",
"source.sortImports": "always",
"source.fixAll": "always"
"source.fixAll": "always",
"quickfix.biome": "explicit"
}
}
79 changes: 79 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"files": {
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.js",
"src/**/*.jsx",
"lib/**/*.ts",
"lib/**/*.tsx",
"lib/**/*.js",
"lib/**/*.jsx",
"./biome.json",
"./package.json",
"./tsconfig.json",
"./vite.config.ts"
],
"ignore": ["node_modules", "**/node_modules/**", "dist", "bin"],
"ignoreUnknown": true
},
"formatter": {
"enabled": true,
"ignore": ["dist", "node_modules"]
},
"linter": {
"enabled": true,
"ignore": ["dist", "node_modules"],
"rules": {
"recommended": true,
"style": {
"noParameterAssign": {
"level": "info"
}
},
"suspicious": {
"noApproximativeNumericConstant": {
"level": "info"
}
}
}
},
"organizeImports": {
"enabled": true
},
"overrides": [
{
"include": ["*.json"],
"formatter": {
"indentWidth": 2
}
}
],
"javascript": {
"formatter": {
"enabled": true,
"lineWidth": 100,
"semicolons": "asNeeded",
"trailingCommas": "none",
"indentWidth": 2,
"indentStyle": "space",
"arrowParentheses": "asNeeded",
"quoteStyle": "single"
}
},
"json": {
"formatter": {
"enabled": true,
"indentWidth": 2,
"indentStyle": "space"
},
"linter": {
"enabled": true
}
},
"vcs": {
"enabled": true,
"clientKind": "git"
}
}
29 changes: 12 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
"registry": "https://npm.pkg.github.com/observerly"
},
"type": "module",
"files": [
"dist"
],
"files": ["dist"],
"keywords": [
"astronomy",
"astrometry",
Expand Down Expand Up @@ -204,32 +202,26 @@
}
},
"release": {
"branches": [
"main"
]
"branches": ["main"]
},
"scripts": {
"build": "tsc --noEmit && vite build",
"format": "prettier \"src/**/*.ts\" --write",
"lint": "eslint src --ext .ts --fix",
"format": "npx @biomejs/biome format --write",
"lint": "npx @biomejs/biome lint --write",
"test": "vitest",
"benchmark": "tsx ./benchmarks/index.ts",
"coverage": "vitest run --coverage"
},
"devDependencies": {
"@biomejs/biome": "1.8.3",
"@changesets/cli": "^2.26.2",
"@rollup/plugin-typescript": "^11.1.6",
"@types/geojson": "^7946.0.14",
"@types/node": "^20.11.19",
"@typescript-eslint/eslint-plugin": "^6.3.0",
"@vitest/coverage-v8": "^2.0.4",
"eslint": "^8.47.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.0",
"husky": "^8.0.3",
"lint-staged": "^13.2.3",
"path": "^0.12.7",
"prettier": "3.0.1",
"rollup": "^4.14.1",
"tinybench": "^2.8.0",
"tslib": "^2.6.1",
Expand All @@ -244,10 +236,13 @@
}
},
"lint-staged": {
"*.{ts,tsx}": [
"prettier --write",
"eslint --fix",
"git add -A ."
"*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}": [
"biome check --files-ignore-unknown=true",
"biome check --write --no-errors-on-unmatched",
"biome check --write --organize-imports-enabled=false --no-errors-on-unmatched",
"biome check --write --unsafe --no-errors-on-unmatched",
"biome format --write --no-errors-on-unmatched",
"biome lint --write --no-errors-on-unmatched"
]
}
}
Loading

0 comments on commit 24cb004

Please sign in to comment.