Skip to content

Replace ESLint and prettier with biome #2090

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Replace ESLint and prettier with biome
biome is faster and nicer to configure with pre-commit.

Closes #2065.
  • Loading branch information
matthiask committed Feb 28, 2025
commit f30ad83ab8b097a5e2f08f7c4e809a859e16b933
24 changes: 4 additions & 20 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,10 @@ repos:
hooks:
- id: rst-backticks
- id: rst-directive-colons
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
entry: env PRETTIER_LEGACY_CLI=1 prettier
types_or: [javascript, css]
args:
- --trailing-comma=es5
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v9.21.0
hooks:
- id: eslint
additional_dependencies:
- "eslint@v9.21.0"
- "@eslint/js@v9.21.0"
- "globals"
files: \.js?$
types: [file]
args:
- --fix
- repo: https://github.com/biomejs/pre-commit
rev: v1.9.4
hooks:
- id: biome-check
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.9.7'
hooks:
Expand Down
36 changes: 36 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"formatter": {
"enabled": true,
"useEditorconfig": true
},
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"complexity": {
"useArrowFunction": "off",
"noForEach": "off"
},
"style": {
"noArguments": "off",
"noParameterAssign": "off",
"noUselessElse": "off",
"useSingleVarDeclarator": "off",
"useTemplate": "off"
},
"suspicious": {
"noAssignInExpressions": "off"
}
}
},
"javascript": {
"formatter": {
"trailingCommas": "es5",
"quoteStyle": "double"
}
}
}
Loading