mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-10 05:22:31 +08:00
add prettier fixer support for 'less' filetype
This commit is contained in:
@@ -39,7 +39,7 @@ let s:default_registry = {
|
||||
\ },
|
||||
\ 'prettier': {
|
||||
\ 'function': 'ale#fixers#prettier#Fix',
|
||||
\ 'suggested_filetypes': ['javascript', 'typescript', 'json', 'css', 'scss'],
|
||||
\ 'suggested_filetypes': ['javascript', 'typescript', 'json', 'css', 'scss', 'less'],
|
||||
\ 'description': 'Apply prettier to a file.',
|
||||
\ },
|
||||
\ 'prettier_eslint': {
|
||||
|
||||
@@ -49,7 +49,7 @@ function! ale#fixers#prettier#Fix(buffer) abort
|
||||
if match(l:options, '--parser') == -1
|
||||
if l:filetype is# 'typescript'
|
||||
let l:parser = 'typescript'
|
||||
elseif l:filetype =~# 'css\|scss'
|
||||
elseif l:filetype =~# 'css\|scss\|less'
|
||||
let l:parser = 'postcss'
|
||||
elseif l:filetype is# 'json'
|
||||
let l:parser = 'json'
|
||||
|
||||
Reference in New Issue
Block a user