1
0
Fork 0
mirror of synced 2024-12-27 00:53:20 -05:00
ultimate-vim/sources_non_forked/ale/ale_linters/scss/sasslint.vim
Amir Salihefendic f50b2142bc Updated plugins
2019-03-08 08:04:56 -03:00

28 lines
1 KiB
VimL

" Author: sQVe - https://github.com/sQVe
call ale#Set('scss_sasslint_executable', 'sass-lint')
call ale#Set('scss_sasslint_options', '')
call ale#Set('scss_sasslint_use_global', get(g:, 'ale_use_global_executables', 0))
function! ale_linters#scss#sasslint#GetExecutable(buffer) abort
return ale#node#FindExecutable(a:buffer, 'scss_sasslint', [
\ 'node_modules/sass-lint/bin/sass-lint.js',
\ 'node_modules/.bin/sass-lint',
\])
endfunction
function! ale_linters#scss#sasslint#GetCommand(buffer) abort
let l:executable = ale_linters#scss#sasslint#GetExecutable(a:buffer)
let l:options = ale#Var(a:buffer, 'scss_sasslint_options')
return ale#node#Executable(a:buffer, l:executable)
\ . (!empty(l:options) ? ' ' . l:options : '')
\ . ' -v -q -f compact %t'
endfunction
call ale#linter#Define('scss', {
\ 'name': 'sasslint',
\ 'executable': function('ale_linters#scss#sasslint#GetExecutable'),
\ 'command': function('ale_linters#scss#sasslint#GetCommand'),
\ 'callback': 'ale#handlers#css#HandleCSSLintFormat',
\})