ale#fixers#eslint#Fix override tidied up
This commit is contained in:
		
							parent
							
								
									246d699b56
								
							
						
					
					
						commit
						9da5f059e1
					
				
							
								
								
									
										8
									
								
								vimrc
								
								
								
								
							
							
						
						
									
										8
									
								
								vimrc
								
								
								
								
							| 
						 | 
					@ -296,15 +296,9 @@ let g:ale_javascript_eslint_options = '-c ~/.config/eslint/.eslintrc.js'
 | 
				
			||||||
let g:ale_fixers = {'javascript': ['eslint']}
 | 
					let g:ale_fixers = {'javascript': ['eslint']}
 | 
				
			||||||
"let g:ale_javascript_prettier_options = '--single-quote '
 | 
					"let g:ale_javascript_prettier_options = '--single-quote '
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" override ALE's eslint fix function tose correct config file
 | 
					" override ALE's eslint fix function to use correct config file
 | 
				
			||||||
function! ale#fixers#eslint#Fix(buffer) abort
 | 
					function! ale#fixers#eslint#Fix(buffer) abort
 | 
				
			||||||
    let l:executable = ale#handlers#eslint#GetExecutable(a:buffer)
 | 
					    let l:executable = ale#handlers#eslint#GetExecutable(a:buffer)
 | 
				
			||||||
    let l:config = ale#handlers#eslint#FindConfig(a:buffer)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if empty(l:config)
 | 
					 | 
				
			||||||
      let l:config = ''
 | 
					 | 
				
			||||||
    endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
    \   'command': ale#node#Executable(a:buffer, l:executable)
 | 
					    \   'command': ale#node#Executable(a:buffer, l:executable)
 | 
				
			||||||
    \       . ' --config /home/ray/.config/eslint/.eslintrc.js'     
 | 
					    \       . ' --config /home/ray/.config/eslint/.eslintrc.js'     
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue