prettier: Support experimental languages

Such as handlebars
This commit is contained in:
Cyrille David
2019-06-06 18:06:23 +02:00
committed by Cyrille David
parent 7b78f2b846
commit 3e4b8ea466
4 changed files with 64 additions and 29 deletions

View File

@@ -280,6 +280,20 @@ Execute(Should set --parser based on first filetype of multiple filetypes):
\ . ' --stdin-filepath %s --stdin',
\ }
Execute(Should set --parser for experimental language, Handlebars):
call ale#test#SetFilename('../prettier-test-files/testfile.hbs')
set filetype=html.handlebars
GivenCommandOutput ['1.6.0']
AssertFixer
\ {
\ 'command': ale#path#CdString(expand('%:p:h'))
\ . ale#Escape(g:ale_javascript_prettier_executable)
\ . ' --parser glimmer'
\ . ' --stdin-filepath %s --stdin',
\ }
Execute(The prettier_d post-processor should permit regular JavaScript content):
AssertEqual
\ [