Skip to content

Commit d89303f

Browse files
committed
Prefer stylelint over csslint
1 parent 3e2f3aa commit d89303f

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

plugin/interfaces/neomake.vim

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@ augroup neomake-run
44
autocmd BufWritePost * Neomake
55
augroup END
66

7+
function! s:local_css_makers()
8+
let l:makers = []
9+
10+
if executable('csslint') && !executable('stylelint')
11+
call add(l:makers, 'csslint')
12+
endif
13+
14+
if executable('stylelint')
15+
call add(l:makers, 'stylelint')
16+
endif
17+
18+
return l:makers
19+
endfunction
20+
721
function! s:local_javascript_makers()
822
let l:makers = []
923

@@ -29,6 +43,8 @@ endfunction
2943
" Set enabled node makers.
3044
augroup neomake-makers-node
3145
autocmd!
46+
autocmd FileType css
47+
\ let b:neomake_css_enabled_makers = s:local_css_makers()
3248
autocmd FileType javascript
3349
\ let b:neomake_javascript_enabled_makers = s:local_javascript_makers()
3450
autocmd FileType javascript.jsx

0 commit comments

Comments
 (0)