mirror of
https://github.com/dense-analysis/ale
synced 2025-03-06 21:29:25 +00:00
- based on biome config, will format, lint, and/or sort imports - adds variable to apply unsafe fixes, disabled by default fixes: #4754
33 lines
785 B
Plaintext
33 lines
785 B
Plaintext
Before:
|
|
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
|
|
|
|
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
|
|
\ {
|
|
\ 'read_temporary_file': 1,
|
|
\ 'command': ale#Escape('biome')
|
|
\ . ' check --apply %t'
|
|
\ }
|
|
|
|
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'
|
|
\ }
|