Skip to content

Commit

Permalink
Fix biome formatter (#4733)
Browse files Browse the repository at this point in the history
* Fix biome formatter

Added escaped executable to the biome#Fix command

* Added fixer callback test
  • Loading branch information
ddominguez committed Mar 2, 2024
1 parent b01c0b2 commit 4d132b3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion autoload/ale/fixers/biome.vim
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ function! ale#fixers#biome#Fix(buffer) abort
let l:options = ale#Var(a:buffer, 'biome_options')

return {
\ 'command': '%e format'
\ 'command': ale#Escape(l:executable) . ' format'
\ . (!empty(l:options) ? ' ' . l:options : '')
\ . ' --stdin-file-path=%s',
\}
Expand Down
15 changes: 15 additions & 0 deletions test/fixers/test_biome_fixer_callback.vader
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Before:
call ale#assert#SetUpFixerTest('typescript', 'biome')

After:
call ale#assert#TearDownFixerTest()

Execute(The default biome command should be correct):
call ale#test#SetFilename('../test-files/typescript/test.ts')

AssertFixer
\ {
\ 'command': ale#Escape('biome')
\ . ' format --stdin-file-path=%s'
\ }

0 comments on commit 4d132b3

Please sign in to comment.