added eslint option to pass in more options
This commit is contained in:
		
							parent
							
								
									ed43b17201
								
							
						
					
					
						commit
						2c176a234e
					
				@ -4,6 +4,9 @@
 | 
				
			|||||||
let g:ale_javascript_eslint_executable =
 | 
					let g:ale_javascript_eslint_executable =
 | 
				
			||||||
\   get(g:, 'ale_javascript_eslint_executable', 'eslint')
 | 
					\   get(g:, 'ale_javascript_eslint_executable', 'eslint')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					let g:ale_javascript_eslint_options =
 | 
				
			||||||
 | 
					\   get(g:, 'ale_javascript_eslint_options', '')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
let g:ale_javascript_eslint_use_global =
 | 
					let g:ale_javascript_eslint_use_global =
 | 
				
			||||||
\   get(g:, 'ale_javascript_eslint_use_global', 0)
 | 
					\   get(g:, 'ale_javascript_eslint_use_global', 0)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -21,6 +24,7 @@ endfunction
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
function! ale_linters#javascript#eslint#GetCommand(buffer) abort
 | 
					function! ale_linters#javascript#eslint#GetCommand(buffer) abort
 | 
				
			||||||
    return ale_linters#javascript#eslint#GetExecutable(a:buffer)
 | 
					    return ale_linters#javascript#eslint#GetExecutable(a:buffer)
 | 
				
			||||||
 | 
					    \   . ' ' . g:ale_javascript_eslint_options
 | 
				
			||||||
    \   . ' -f unix --stdin --stdin-filename %s'
 | 
					    \   . ' -f unix --stdin --stdin-filename %s'
 | 
				
			||||||
endfunction
 | 
					endfunction
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -383,6 +383,14 @@ g:ale_javascript_eslint_executable         *g:ale_javascript_eslint_executable*
 | 
				
			|||||||
  |g:ale_javascript_eslint_use_global| to `1`.
 | 
					  |g:ale_javascript_eslint_use_global| to `1`.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					g:ale_javascript_eslint_options               *g:ale_javascript_eslint_options*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  Type: |String|
 | 
				
			||||||
 | 
					  Default: `''`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  This variable can be set to pass additional options to eslint.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
g:ale_javascript_eslint_use_global         *g:ale_javascript_eslint_use_global*
 | 
					g:ale_javascript_eslint_use_global         *g:ale_javascript_eslint_use_global*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Type: |String|
 | 
					  Type: |String|
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user