Skip to content

Commit

Permalink
style: use biome
Browse files Browse the repository at this point in the history
  • Loading branch information
ambar committed Apr 13, 2024
1 parent ae4b57c commit 55178cf
Show file tree
Hide file tree
Showing 5 changed files with 143 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,8 @@ yalc.lock
!.yarn/sdks
!.yarn/versions
.pnp.*

# biome does not support nested ignore files
/packages/md.icons/src
/packages/md.icons/cjs
/packages/md.icons/es
42 changes: 42 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"vcs": {
"enabled": true,
"useIgnoreFile": true,
"clientKind": "git"
},
"organizeImports": {
"enabled": true
},
"files": {
"ignore": ["**/fixtures", "package.json"]
},
"formatter": {
"indentStyle": "space"
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"semicolons": "asNeeded",
"arrowParentheses": "always",
"trailingComma": "all",
"bracketSpacing": false
}
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"overrides": [
{
"include": [".vscode/*.json", ".cspell.json"],
"json": {
"parser": {
"allowComments": true
}
}
}
]
}
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
"packages/*"
],
"scripts": {
"lint": "biome check .",
"lint:fix": "biome check --apply .",
"lint:fix-unsafe": "biome check --apply-unsafe .",
"release": "yarn test && yarn build && lerna publish",
"build": "yarn workspaces foreach -Ap run build",
"test": "NODE_OPTIONS=--experimental-vm-modules jest"
Expand All @@ -12,6 +15,7 @@
"preset": "es-jest"
},
"devDependencies": {
"@biomejs/biome": "^1.6.4",
"@types/jest": "^29.2.0",
"es-jest": "^2.0.0",
"jest": "^29.2.2",
Expand Down
6 changes: 0 additions & 6 deletions prettier.config.js

This file was deleted.

92 changes: 92 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,97 @@ __metadata:
languageName: node
linkType: hard

"@biomejs/biome@npm:^1.6.4":
version: 1.6.4
resolution: "@biomejs/biome@npm:1.6.4"
dependencies:
"@biomejs/cli-darwin-arm64": "npm:1.6.4"
"@biomejs/cli-darwin-x64": "npm:1.6.4"
"@biomejs/cli-linux-arm64": "npm:1.6.4"
"@biomejs/cli-linux-arm64-musl": "npm:1.6.4"
"@biomejs/cli-linux-x64": "npm:1.6.4"
"@biomejs/cli-linux-x64-musl": "npm:1.6.4"
"@biomejs/cli-win32-arm64": "npm:1.6.4"
"@biomejs/cli-win32-x64": "npm:1.6.4"
dependenciesMeta:
"@biomejs/cli-darwin-arm64":
optional: true
"@biomejs/cli-darwin-x64":
optional: true
"@biomejs/cli-linux-arm64":
optional: true
"@biomejs/cli-linux-arm64-musl":
optional: true
"@biomejs/cli-linux-x64":
optional: true
"@biomejs/cli-linux-x64-musl":
optional: true
"@biomejs/cli-win32-arm64":
optional: true
"@biomejs/cli-win32-x64":
optional: true
bin:
biome: bin/biome
checksum: 10c0/f85a5af7c4b3edb40c97a7a4fa2c78b91367cf31fe27d115d95f5f37d64c2b49091bb34d1495dfc8a053688b01fe9ed5746bc37bc99f0cec6d7915274df45a38
languageName: node
linkType: hard

"@biomejs/cli-darwin-arm64@npm:1.6.4":
version: 1.6.4
resolution: "@biomejs/cli-darwin-arm64@npm:1.6.4"
conditions: os=darwin & cpu=arm64
languageName: node
linkType: hard

"@biomejs/cli-darwin-x64@npm:1.6.4":
version: 1.6.4
resolution: "@biomejs/cli-darwin-x64@npm:1.6.4"
conditions: os=darwin & cpu=x64
languageName: node
linkType: hard

"@biomejs/cli-linux-arm64-musl@npm:1.6.4":
version: 1.6.4
resolution: "@biomejs/cli-linux-arm64-musl@npm:1.6.4"
conditions: os=linux & cpu=arm64 & libc=musl
languageName: node
linkType: hard

"@biomejs/cli-linux-arm64@npm:1.6.4":
version: 1.6.4
resolution: "@biomejs/cli-linux-arm64@npm:1.6.4"
conditions: os=linux & cpu=arm64 & libc=glibc
languageName: node
linkType: hard

"@biomejs/cli-linux-x64-musl@npm:1.6.4":
version: 1.6.4
resolution: "@biomejs/cli-linux-x64-musl@npm:1.6.4"
conditions: os=linux & cpu=x64 & libc=musl
languageName: node
linkType: hard

"@biomejs/cli-linux-x64@npm:1.6.4":
version: 1.6.4
resolution: "@biomejs/cli-linux-x64@npm:1.6.4"
conditions: os=linux & cpu=x64 & libc=glibc
languageName: node
linkType: hard

"@biomejs/cli-win32-arm64@npm:1.6.4":
version: 1.6.4
resolution: "@biomejs/cli-win32-arm64@npm:1.6.4"
conditions: os=win32 & cpu=arm64
languageName: node
linkType: hard

"@biomejs/cli-win32-x64@npm:1.6.4":
version: 1.6.4
resolution: "@biomejs/cli-win32-x64@npm:1.6.4"
conditions: os=win32 & cpu=x64
languageName: node
linkType: hard

"@emotion/babel-plugin@npm:^11.10.0":
version: 11.10.2
resolution: "@emotion/babel-plugin@npm:11.10.2"
Expand Down Expand Up @@ -8671,6 +8762,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "root-workspace-0b6124@workspace:."
dependencies:
"@biomejs/biome": "npm:^1.6.4"
"@types/jest": "npm:^29.2.0"
es-jest: "npm:^2.0.0"
jest: "npm:^29.2.2"
Expand Down

0 comments on commit 55178cf

Please sign in to comment.