Unverified Commit 2c6b74af authored by Nikita Titov's avatar Nikita Titov Committed by GitHub
Browse files

[ci] move js and json linter `biome` to pre-commit (#7059)

parent c5c60c8f
...@@ -8,7 +8,6 @@ pwsh -file ./.ci/lint-powershell.ps1 || exit 1 ...@@ -8,7 +8,6 @@ pwsh -file ./.ci/lint-powershell.ps1 || exit 1
conda create -q -y -n test-env \ conda create -q -y -n test-env \
"python=3.13[build=*_cp*]" \ "python=3.13[build=*_cp*]" \
'biome>=1.9.3' \
'pre-commit>=3.8.0' \ 'pre-commit>=3.8.0' \
'r-lintr>=3.1.2' 'r-lintr>=3.1.2'
...@@ -20,6 +19,3 @@ pre-commit run --all-files || exit 1 ...@@ -20,6 +19,3 @@ pre-commit run --all-files || exit 1
echo "Linting R code" echo "Linting R code"
Rscript ./.ci/lint-r-code.R "$(pwd)" || exit 1 Rscript ./.ci/lint-r-code.R "$(pwd)" || exit 1
echo "Linting JavaScript code"
bash ./.ci/lint-js.sh || exit 1
#!/bin/bash
set -e -E -u -o pipefail
biome ci --config-path=./biome.json --diagnostic-level=info --error-on-warnings ./
...@@ -313,6 +313,7 @@ pip-delete-this-directory.txt ...@@ -313,6 +313,7 @@ pip-delete-this-directory.txt
# Unit test / coverage reports # Unit test / coverage reports
htmlcov/ htmlcov/
.tox/ .tox/
.nox/
.coverage .coverage
.coverage.* .coverage.*
.cache .cache
...@@ -320,8 +321,11 @@ nosetests.xml ...@@ -320,8 +321,11 @@ nosetests.xml
prof/ prof/
*.prof *.prof
coverage.xml coverage.xml
*,cover *.cover
*.py.cover
.hypothesis/ .hypothesis/
.pytest_cache/
cover/
**/coverage.html **/coverage.html
**/coverage.html.zip **/coverage.html.zip
**/Rplots.pdf **/Rplots.pdf
...@@ -469,3 +473,8 @@ dask-worker-space/ ...@@ -469,3 +473,8 @@ dask-worker-space/
# pixi environments # pixi environments
.pixi .pixi
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
...@@ -63,17 +63,22 @@ repos: ...@@ -63,17 +63,22 @@ repos:
- sphinx>=8.1.3 - sphinx>=8.1.3
- sphinx_rtd_theme>=3.0.1 - sphinx_rtd_theme>=3.0.1
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.14.0 rev: v0.14.0
hooks: hooks:
# Run the linter.
- id: ruff-check - id: ruff-check
args: ["--config", "python-package/pyproject.toml"] args: ["--config", "python-package/pyproject.toml"]
types_or: [python, jupyter] types_or: [python, jupyter]
# Run the formatter.
- id: ruff-format - id: ruff-format
args: ["--config", "python-package/pyproject.toml"] args: ["--config", "python-package/pyproject.toml"]
types_or: [python, jupyter] 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 - repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1 rev: v0.10.0.1
hooks: hooks:
......
{ {
"files": { "root": false,
"ignore": [".mypy_cache/", ".pixi/"] "vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
}, },
"formatter": { "formatter": {
"enabled": true, "enabled": true,
"useEditorconfig": true "useEditorconfig": true,
"lineWidth": 120
}, },
"organizeImports": { "assist": {
"enabled": true "enabled": true,
"actions": {
"recommended": true
}
}, },
"linter": { "linter": {
"enabled": true, "enabled": true,
"domains": {
"project": "all"
},
"rules": { "rules": {
"all": true "recommended": true
} }
},
"javascript": {
"globals": ["$"]
} }
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment