2024-03-02 07:05:47 +00:00
|
|
|
Before:
|
2024-06-21 00:21:19 +00:00
|
|
|
Save g:ale_biome_options
|
|
|
|
Save g:ale_biome_fixer_apply_unsafe
|
|
|
|
|
|
|
|
let g:ale_biome_options = ''
|
|
|
|
let g:ale_biome_fixer_apply_unsafe = 0
|
|
|
|
|
2024-03-02 07:05:47 +00:00
|
|
|
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
|
|
|
|
\ {
|
2024-06-20 23:19:55 +00:00
|
|
|
\ 'read_temporary_file': 1,
|
2024-03-02 07:05:47 +00:00
|
|
|
\ 'command': ale#Escape('biome')
|
2024-06-21 00:21:19 +00:00
|
|
|
\ . ' check --apply %t'
|
2024-03-02 07:05:47 +00:00
|
|
|
\ }
|
|
|
|
|
2024-06-21 00:21:19 +00:00
|
|
|
Execute(Unsafe fixes can be applied via an option):
|
|
|
|
call ale#test#SetFilename('../test-files/typescript/test.ts')
|
|
|
|
let g:ale_biome_fixer_apply_unsafe = 1
|
|
|
|
|
|
|
|
AssertFixer
|
|
|
|
\ {
|
|
|
|
\ 'read_temporary_file': 1,
|
|
|
|
\ 'command': ale#Escape('biome')
|
|
|
|
\ . ' check --apply-unsafe %t'
|
|
|
|
\ }
|