Skip to content

Commit

Permalink
chore: use biome instead of eslint & prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
liuweiGL committed Aug 15, 2024
1 parent baa7dfd commit e1fb6ee
Show file tree
Hide file tree
Showing 7 changed files with 264 additions and 1,706 deletions.
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

47 changes: 0 additions & 47 deletions .eslintrc

This file was deleted.

17 changes: 0 additions & 17 deletions .prettierrc

This file was deleted.

51 changes: 51 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"formatter": {
"enabled": true,
"formatWithErrors": false,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 80,
"attributePosition": "auto"
},
"organizeImports": { "enabled": true },
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"complexity": { "noUselessTypeConstraint": "error" },
"correctness": {
"noUnusedVariables": "error",
"useArrayLiterals": "off"
},
"style": {
"noNamespace": "error",
"useAsConstAssertion": "error",
"useBlockStatements": "off"
},
"suspicious": {
"noEmptyBlockStatements": "error",
"noExplicitAny": "off",
"noExtraNonNullAssertion": "error",
"noMisleadingInstantiator": "error",
"noUnsafeDeclarationMerging": "error",
"useNamespaceKeyword": "error"
}
},
"ignore": ["**/build", "**/dist", "**/scripts", "**/node_modules"]
},
"javascript": {
"formatter": {
"jsxQuoteStyle": "single",
"quoteProperties": "asNeeded",
"trailingCommas": "none",
"semicolons": "asNeeded",
"arrowParentheses": "asNeeded",
"bracketSpacing": true,
"bracketSameLine": false,
"quoteStyle": "single",
"attributePosition": "auto"
}
}
}
12 changes: 3 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,28 +39,22 @@
"scripts": {
"test": "pnpm build && del /Q \"./node_modules/.mkcert\" && vite -c playground/vite.config.ts --clearScreen false",
"build": "tsx ./script/build.mts",
"lint": "tsc --noEmit && eslint \"plugin/**/*.ts\" --color --quiet",
"lint": "tsc --noEmit && biome lint --colors=force --fix --unsafe \"plugin\" ",
"release": "semantic-release"
},
"dependencies": {
"@octokit/rest": "^21.0.1",
"@octokit/rest": "^20.1.1",
"axios": "^1.7.4",
"debug": "^4.3.6",
"picocolors": "^1.0.1"
},
"devDependencies": {
"@biomejs/biome": "1.8.3",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@types/debug": "^4.1.12",
"@types/node": "^22.3.0",
"@typescript-eslint/eslint-plugin": "^8.1.0",
"@typescript-eslint/parser": "^8.1.0",
"esbuild": "^0.23.0",
"eslint": "^9.9.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.2.1",
"prettier": "^3.3.3",
"semantic-release": "^24.0.0",
"tsx": "^4.17.0",
"typescript": "^5.5.4",
Expand Down
Loading

0 comments on commit e1fb6ee

Please sign in to comment.