Skip to content

Commit

Permalink
refactor: use biome to format and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
fannheyward committed Dec 12, 2023
1 parent 24d58b6 commit 2b30d58
Show file tree
Hide file tree
Showing 17 changed files with 311 additions and 1,578 deletions.
23 changes: 0 additions & 23 deletions .eslintrc.js

This file was deleted.

4 changes: 0 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,5 @@ updates:
directory: "/"
schedule:
interval: "monthly"
groups:
dev-dependencies-ts-eslint:
patterns:
- "@typescript-eslint/*"
reviewers:
- fannheyward
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
- name: npm ci
run: |
npm ci
- name: npm format
run: |
npm run format
- name: npm lint
run: |
npm run lint
npm run check
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ tsconfig.json
.DS_Store
webpack.config.js
esbuild.js
biome.json
package-lock.json
.github
.eslintrc.js
Expand Down
25 changes: 25 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"$schema": "https://biomejs.dev/schemas/1.4.1/schema.json",
"organizeImports": {
"enabled": true
},
"formatter": {
"enabled": true,
"lineWidth": 180,
"indentWidth": 2,
"indentStyle": "space"
},
"javascript": {
"formatter": {
"enabled": true,
"trailingComma": "es5",
"quoteStyle": "single"
}
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
}
}
3 changes: 1 addition & 2 deletions esbuild.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-var-requires */
async function start() {
await require('esbuild').build({
entryPoints: ['src/index.ts'],
Expand All @@ -15,4 +14,4 @@ async function start() {

start().catch((e) => {
console.error(e);
});
});
Loading

0 comments on commit 2b30d58

Please sign in to comment.