Skip to content

Commit

Permalink
refactor: use biome and optimize code quality
Browse files Browse the repository at this point in the history
  • Loading branch information
muuvmuuv committed Jan 21, 2025
1 parent 74cffba commit 64e8006
Show file tree
Hide file tree
Showing 23 changed files with 10,115 additions and 11,255 deletions.
31 changes: 0 additions & 31 deletions .eslintrc

This file was deleted.

7 changes: 0 additions & 7 deletions .prettierrc

This file was deleted.

1 change: 1 addition & 0 deletions .prototools
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node = "^22"
54 changes: 27 additions & 27 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
{
"default": "https://github.com/release-it/release-it/blob/master/conf/release-it.json",
"hooks": {
"before:init": "npm run lint && npm run package"
},
"git": {
"requireCleanWorkingDir": false,
"requireCommits": false,
"tagName": "v${version}",
"commit": true,
"commitMessage": "chore: release ${version}",
"push": true
},
"npm": {
"publish": false
},
"github": {
"release": true,
"releaseName": "Release ${version}",
"draft": true,
"tokenRef": "GITHUB_ACCESS_TOKEN"
},
"plugins": {
"@release-it/conventional-changelog": {
"preset": "conventionalcommits",
"infile": "CHANGELOG.md"
}
}
"default": "https://github.com/release-it/release-it/blob/master/conf/release-it.json",
"hooks": {
"before:init": "npm run lint && npm run package"
},
"git": {
"requireCleanWorkingDir": false,
"requireCommits": false,
"tagName": "v${version}",
"commit": true,
"commitMessage": "chore: release ${version}",
"push": true
},
"npm": {
"publish": false
},
"github": {
"release": true,
"releaseName": "Release ${version}",
"draft": true,
"tokenRef": "GITHUB_ACCESS_TOKEN"
},
"plugins": {
"@release-it/conventional-changelog": {
"preset": "conventionalcommits",
"infile": "CHANGELOG.md"
}
}
}
28 changes: 14 additions & 14 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// https://code.visualstudio.com/docs/editor/debugging#_launch-configurations
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch Extension",
"type": "extensionHost",
"request": "launch",
"preLaunchTask": "${defaultBuildTask}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"${workspaceFolder}/testProject"
],
"outFiles": ["${workspaceFolder}/dist/*.js"]
}
]
"version": "0.2.0",
"configurations": [
{
"name": "Launch Extension",
"type": "extensionHost",
"request": "launch",
"preLaunchTask": "${defaultBuildTask}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"${workspaceFolder}/testProject"
],
"outFiles": ["${workspaceFolder}/dist/*.js"]
}
]
}
18 changes: 17 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
{}
{
"biome.rename": true,
"[json][jsonc][json5]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[javascript][typescript]": {
"editor.defaultFormatter": "biomejs.biome",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports.biome": "explicit"
}
},
"editor.codeActionsOnSave": {
"source.fixAll.biome": "explicit",
"quickfix.biome": "explicit"
}
}
50 changes: 25 additions & 25 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
// https://code.visualstudio.com/docs/editor/tasks#vscode
{
"version": "2.0.0",
"tasks": [
{
"label": "Watch",
"type": "npm",
"script": "dev",
"isBackground": true,
"problemMatcher": {
"base": "$tsc-watch",
"applyTo": "allDocuments",
"background": {
"activeOnStart": true,
"beginsPattern": "^.*running",
"endsPattern": "^.*watching"
}
},
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
}
}
]
"version": "2.0.0",
"tasks": [
{
"label": "Watch",
"type": "npm",
"script": "dev",
"isBackground": true,
"problemMatcher": {
"base": "$tsc-watch",
"applyTo": "allDocuments",
"background": {
"activeOnStart": true,
"beginsPattern": "^.*running",
"endsPattern": "^.*watching"
}
},
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
5 changes: 1 addition & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@


## [3.4.1](https://github.com/muuvmuuv/vscode-sundial/compare/v3.4.0...v3.4.1) (2023-07-07)

## [3.4.0](https://github.com/muuvmuuv/vscode-sundial/compare/v3.3.0...v3.4.0) (2023-07-07)


### Features

* add status bar icon ([0132ede](https://github.com/muuvmuuv/vscode-sundial/commit/0132ede260497659d813db4526e9a64038dc1c7c))
Expand Down Expand Up @@ -155,4 +152,4 @@ undefined

### [1.0.2](https://github.com/muuvmuuv/vscode-sundial/compare/v1.0.0...v1.0.2) (2018-10-03)

## 1.0.0 (2018-09-29)
## 1.0.0 (2018-09-29)
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
- [Keybindings](#keybindings)
- [Commands](#commands)
- [Settings](#settings)
- [Automatically set by current location](#automatically-set-by-current-location)
- [Automatically set by latitude and longitude](#automatically-set-by-latitude-and-longitude)
- [Automatically set by OS appearance](#automatically-set-by-os-appearance)
- [Automatically set by current location](#automatically-set-by-current-location)
- [Automatically set by latitude and longitude](#automatically-set-by-latitude-and-longitude)
- [Automatically set by OS appearance](#automatically-set-by-os-appearance)
- [VS Code Settings](#vs-code-settings)
- [Execution order](#execution-order)
- [Status bar icon](#status-bar-icon)
Expand Down
42 changes: 42 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignore": ["**/testProject"]
},
"formatter": {
"enabled": true,
"useEditorconfig": true,
"formatWithErrors": false,
"indentStyle": "tab",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 90
},
"linter": {
"enabled": true,
"rules": {
"all": true,
"correctness": {
"noUndeclaredDependencies": "off"
}
}
},
"organizeImports": {
"enabled": true
},
"javascript": {
"formatter": {
"semicolons": "asNeeded"
}
},
"json": {
"formatter": {
"trailingCommas": "none"
}
}
}
10 changes: 5 additions & 5 deletions lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

pre-commit:
commands:
lint:
glob: "*.{js,ts}"
run: node_modules/.bin/eslint {staged_files}
compile:
run: sh compile.sh
check:
glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}"
run:
node_modules/.bin/biome check --no-errors-on-unmatched --files-ignore-unknown=true
{staged_files}

commit-msg:
commands:
Expand Down
Loading

0 comments on commit 64e8006

Please sign in to comment.