-
-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
$ cd /tmp
$ mkdir foo
$ cd foo
$ git init
$ cat > .pre-commit-config.yaml
repos:
- repo: https://github.com/biomejs/pre-commit
rev: v2.2.0 # Use the sha / tag you want to point at
hooks:
- id: biome-check
^D
$ echo 'function(a) {}' > main.ts
$ git add .
$ pre-commit run --all-files
biome check..............................................................Passed
I would expect the pre-commit hook to fail and the following to be printed:
main.ts:1:10 lint/correctness/noUnusedVariables FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ This function f is unused.
> 1 │ function f(a) {}
│ ^
2 │
ℹ Unused variables are often the result of an incomplete refactoring, typos, or other sources of bugs.
ℹ Unsafe fix: If this is intentional, prepend f with an underscore.
1 │ - function·f(a)·{}
1 │ + function·_f(a)·{}
2 2 │
main.ts:1:12 lint/correctness/noUnusedFunctionParameters FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ This parameter is unused.
> 1 │ function f(a) {}
│ ^
2 │
ℹ Unused parameters might be the result of an incomplete refactoring.
ℹ Unsafe fix: If this is intentional, prepend a with an underscore.
1 │ - function·f(a)·{}
1 │ + function·f(_a)·{}
2 2 │
Checked 1 file in 2ms. No fixes applied.
Found 2 warnings.
Metadata
Metadata
Assignees
Labels
No labels