mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-31 00:24:31 +08:00
Set prettier working directory to where .prettierignore is (#3101)
Prettier does not use `.prettierignore` unless the current directory is the root where the `.prettierignore` file resides. * Update Prettier tests * Look for prettierignore to determine project root
This commit is contained in:
@@ -297,6 +297,17 @@ Execute(Should set --parser for experimental language, Handlebars):
|
||||
\ . ' --stdin-filepath %s --stdin',
|
||||
\ }
|
||||
|
||||
Execute(Changes to directory where .prettierignore is found):
|
||||
call ale#test#SetFilename('../prettier-test-files/with_prettierignore/src/testfile.js')
|
||||
|
||||
GivenCommandOutput ['1.6.0']
|
||||
AssertFixer
|
||||
\ {
|
||||
\ 'command': ale#path#CdString(expand('%:p:h:h'))
|
||||
\ . ale#Escape(g:ale_javascript_prettier_executable)
|
||||
\ . ' --stdin-filepath %s --stdin',
|
||||
\ }
|
||||
|
||||
Execute(The prettier_d post-processor should permit regular JavaScript content):
|
||||
AssertEqual
|
||||
\ [
|
||||
|
||||
Reference in New Issue
Block a user