diff --git a/.ci/lint-all.sh b/.ci/lint-all.sh index 671ea3365d99..91833f705e48 100755 --- a/.ci/lint-all.sh +++ b/.ci/lint-all.sh @@ -8,7 +8,6 @@ pwsh -file ./.ci/lint-powershell.ps1 || exit 1 conda create -q -y -n test-env \ "python=3.13[build=*_cp*]" \ - 'biome>=1.9.3' \ 'pre-commit>=3.8.0' \ 'r-lintr>=3.1.2' @@ -20,6 +19,3 @@ pre-commit run --all-files || exit 1 echo "Linting R code" Rscript ./.ci/lint-r-code.R "$(pwd)" || exit 1 - -echo "Linting JavaScript code" -bash ./.ci/lint-js.sh || exit 1 diff --git a/.ci/lint-js.sh b/.ci/lint-js.sh deleted file mode 100644 index 534f251620e2..000000000000 --- a/.ci/lint-js.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -set -e -E -u -o pipefail - -biome ci --config-path=./biome.json --diagnostic-level=info --error-on-warnings ./ diff --git a/.gitignore b/.gitignore index f3a386af25ad..d8c7191d07cc 100644 --- a/.gitignore +++ b/.gitignore @@ -313,6 +313,7 @@ pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ .tox/ +.nox/ .coverage .coverage.* .cache @@ -320,8 +321,11 @@ nosetests.xml prof/ *.prof coverage.xml -*,cover +*.cover +*.py.cover .hypothesis/ +.pytest_cache/ +cover/ **/coverage.html **/coverage.html.zip **/Rplots.pdf @@ -469,3 +473,8 @@ dask-worker-space/ # pixi environments .pixi + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fcb0c711049e..2e15f4b3954d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -62,17 +62,22 @@ repos: - sphinx>=8.1.3 - sphinx_rtd_theme>=3.0.1 - repo: https://github.com/astral-sh/ruff-pre-commit - # Ruff version. rev: v0.14.0 hooks: - # Run the linter. - id: ruff-check args: ["--config", "python-package/pyproject.toml"] types_or: [python, jupyter] - # Run the formatter. - id: ruff-format args: ["--config", "python-package/pyproject.toml"] types_or: [python, jupyter] + - repo: https://github.com/biomejs/pre-commit + rev: v2.2.5 + hooks: + - id: biome-ci + args: + - --config-path=./biome.json + - --diagnostic-level=info + - --error-on-warnings - repo: https://github.com/shellcheck-py/shellcheck-py rev: v0.10.0.1 hooks: diff --git a/biome.json b/biome.json index 95995e7e13b7..0d163adebcbf 100644 --- a/biome.json +++ b/biome.json @@ -1,21 +1,28 @@ { - "files": { - "ignore": [".mypy_cache/", ".pixi/"] + "root": false, + "vcs": { + "enabled": true, + "clientKind": "git", + "useIgnoreFile": true }, "formatter": { "enabled": true, - "useEditorconfig": true + "useEditorconfig": true, + "lineWidth": 120 }, - "organizeImports": { - "enabled": true + "assist": { + "enabled": true, + "actions": { + "recommended": true + } }, "linter": { "enabled": true, + "domains": { + "project": "all" + }, "rules": { - "all": true + "recommended": true } - }, - "javascript": { - "globals": ["$"] } }