summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ale_linters/javascript/biome.vim2
-rw-r--r--ale_linters/typescript/biome.vim2
-rw-r--r--autoload/ale/handlers/biome.vim7
-rw-r--r--doc/ale-typescript.txt3
-rw-r--r--test/fixers/test_biome_fixer_callback.vader15
-rw-r--r--test/linter/test_biome.vader5
6 files changed, 17 insertions, 17 deletions
diff --git a/ale_linters/javascript/biome.vim b/ale_linters/javascript/biome.vim
index 61f7c8f4..17714de1 100644
--- a/ale_linters/javascript/biome.vim
+++ b/ale_linters/javascript/biome.vim
@@ -6,6 +6,6 @@ call ale#linter#Define('javascript', {
\ 'lsp': 'stdio',
\ 'language': function('ale#handlers#biome#GetLanguage'),
\ 'executable': function('ale#handlers#biome#GetExecutable'),
-\ 'command': function('ale#handlers#biome#GetCommand'),
+\ 'command': '%e lsp-proxy',
\ 'project_root': function('ale#handlers#biome#GetProjectRoot'),
\})
diff --git a/ale_linters/typescript/biome.vim b/ale_linters/typescript/biome.vim
index 30115744..1730da51 100644
--- a/ale_linters/typescript/biome.vim
+++ b/ale_linters/typescript/biome.vim
@@ -6,6 +6,6 @@ call ale#linter#Define('typescript', {
\ 'lsp': 'stdio',
\ 'language': function('ale#handlers#biome#GetLanguage'),
\ 'executable': function('ale#handlers#biome#GetExecutable'),
-\ 'command': function('ale#handlers#biome#GetCommand'),
+\ 'command': '%e lsp-proxy',
\ 'project_root': function('ale#handlers#biome#GetProjectRoot'),
\})
diff --git a/autoload/ale/handlers/biome.vim b/autoload/ale/handlers/biome.vim
index 47384e56..b22c1c46 100644
--- a/autoload/ale/handlers/biome.vim
+++ b/autoload/ale/handlers/biome.vim
@@ -19,13 +19,6 @@ function! ale#handlers#biome#GetExecutable(buffer) abort
\])
endfunction
-function! ale#handlers#biome#GetCommand(buffer) abort
- let l:options = ale#Var(a:buffer, 'biome_options')
-
- return '%e lsp-proxy'
- \ . (!empty(l:options) ? ' ' . l:options : '')
-endfunction
-
function! ale#handlers#biome#GetLanguage(buffer) abort
return getbufvar(a:buffer, '&filetype')
endfunction
diff --git a/doc/ale-typescript.txt b/doc/ale-typescript.txt
index f22b6586..22fbe7b4 100644
--- a/doc/ale-typescript.txt
+++ b/doc/ale-typescript.txt
@@ -16,7 +16,8 @@ g:ale_biome_options *g:ale_biome_options*
Type: |String|
Default: `''`
- This variable can be set to pass additional options to biome.
+ This variable can be set to pass additional options to `biome check` when
+ applying fixes.
g:ale_biome_use_global *g:ale_biome_use_global*
diff --git a/test/fixers/test_biome_fixer_callback.vader b/test/fixers/test_biome_fixer_callback.vader
index 2922b3e6..3d2083e4 100644
--- a/test/fixers/test_biome_fixer_callback.vader
+++ b/test/fixers/test_biome_fixer_callback.vader
@@ -11,7 +11,7 @@ After:
call ale#assert#TearDownFixerTest()
Execute(The default biome command should be correct):
- call ale#test#SetFilename('../test-files/typescript/test.ts')
+ call ale#test#SetFilename('../test-files/biome/jsonc/src/test.ts')
AssertFixer
\ {
@@ -21,7 +21,7 @@ Execute(The default biome command should be correct):
\ }
Execute(Unsafe fixes can be applied via an option):
- call ale#test#SetFilename('../test-files/typescript/test.ts')
+ call ale#test#SetFilename('../test-files/biome/jsonc/src/test.ts')
let g:ale_biome_fixer_apply_unsafe = 1
AssertFixer
@@ -30,3 +30,14 @@ Execute(Unsafe fixes can be applied via an option):
\ 'command': ale#Escape('biome')
\ . ' check --apply-unsafe %t'
\ }
+
+Execute(The fixer should accept options):
+ call ale#test#SetFilename('../test-files/biome/jsonc/src/test.ts')
+ let g:ale_biome_options = '--foobar'
+
+ AssertFixer
+ \ {
+ \ 'read_temporary_file': 1,
+ \ 'command': ale#Escape('biome')
+ \ . ' check --apply --foobar %t',
+ \ }
diff --git a/test/linter/test_biome.vader b/test/linter/test_biome.vader
index 2e5e7aac..48736ec2 100644
--- a/test/linter/test_biome.vader
+++ b/test/linter/test_biome.vader
@@ -14,11 +14,6 @@ After:
Execute(The default biome command should be correct):
AssertLinter 'biome', ale#Escape('biome') . ' lsp-proxy'
-Execute(The biome command should accept options):
- let g:ale_biome_options = '--foobar'
-
- AssertLinter 'biome', ale#Escape('biome') . ' lsp-proxy --foobar'
-
Execute(Uses the filetype as the language):
call ale#test#SetFilename('test.ts')
set filetype=typescript