Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
2c6b74af
Unverified
Commit
2c6b74af
authored
Oct 18, 2025
by
Nikita Titov
Committed by
GitHub
Oct 17, 2025
Browse files
[ci] move js and json linter `biome` to pre-commit (#7059)
parent
c5c60c8f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
22 deletions
+34
-22
.ci/lint-all.sh
.ci/lint-all.sh
+0
-4
.ci/lint-js.sh
.ci/lint-js.sh
+0
-5
.gitignore
.gitignore
+10
-1
.pre-commit-config.yaml
.pre-commit-config.yaml
+8
-3
biome.json
biome.json
+16
-9
No files found.
.ci/lint-all.sh
View file @
2c6b74af
...
@@ -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
.ci/lint-js.sh
deleted
100644 → 0
View file @
c5c60c8f
#!/bin/bash
set
-e
-E
-u
-o
pipefail
biome ci
--config-path
=
./biome.json
--diagnostic-level
=
info
--error-on-warnings
./
.gitignore
View file @
2c6b74af
...
@@ -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
.pre-commit-config.yaml
View file @
2c6b74af
...
@@ -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
:
...
...
biome.json
View file @
2c6b74af
{
{
"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"
:
[
"$"
]
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment