Add full support for biome (#4705)

* Revert "Add biome support for javascript (#4701)"

This reverts commit 8922478a83.

* Add support for biome
This commit is contained in:
Filip Gospodinov
2024-02-24 08:51:39 +01:00
committed by GitHub
parent b74cd02648
commit 9cc8383fe9
12 changed files with 91 additions and 79 deletions

View File

@@ -1,30 +0,0 @@
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',
\ }

View File

@@ -0,0 +1,14 @@
Before:
call ale#assert#SetUpLinterTest('typescript', 'biome')
call ale#test#SetFilename('test.ts')
After:
call ale#assert#TearDownLinterTest()
Execute(The default biome command should be correct):
AssertLinter 'biome', ale#Escape('biome') . ' lsp-proxy'
Execute(The biome command should accept options):
let b:ale_biome_options = '--foobar'
AssertLinter 'biome', ale#Escape('biome') . ' lsp-proxy --foobar'

View File