Add biome support for javascript (#4701)

This commit is contained in:
Akiomi Kamakura
2024-01-14 21:11:14 +09:00
committed by GitHub
parent 531970533a
commit 8922478a83
11 changed files with 105 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
Before:
call ale#assert#SetUpFixerTest('javascript', 'biome')
runtime autoload/ale/handlers/biome.vim
set filetype=javascript
After:
call ale#assert#TearDownFixerTest()
Execute(The biome callback should return the correct default values):
call ale#test#SetFilename('../test-files/biome/src/test.js')
AssertFixer
\ {
\ 'read_temporary_file': 1,
\ 'command': (has('win32') ? 'node.exe ' : '')
\ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/biome/node_modules/.bin/biome'))
\ . ' check --apply %t',
\ }
Execute(The biome callback should include custom biome options):
let b:ale_javascript_biome_options = '--organize-imports-enabled=true'
call ale#test#SetFilename('../test-files/biome/src/test.js')
AssertFixer
\ {
\ 'read_temporary_file': 1,
\ 'command': (has('win32') ? 'node.exe ' : '')
\ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/biome/node_modules/.bin/biome'))
\ . ' check --apply --organize-imports-enabled=true %t',
\ }

0
test/test-files/biome/node_modules/.bin/biome generated vendored Normal file
View File

View File