From ee87885f407e5a1b7a59aeb63b1ff7a0df99b08b Mon Sep 17 00:00:00 2001 From: xy <2061864@qq.com> Date: Wed, 17 May 2017 01:34:29 +0800 Subject: [PATCH] add eslintrc.yml support --- plugin/defaults.vim | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/plugin/defaults.vim b/plugin/defaults.vim index 4085f02..6ea01ce 100644 --- a/plugin/defaults.vim +++ b/plugin/defaults.vim @@ -172,7 +172,16 @@ if !exists('g:formatdef_eslint_local') endif " find formatter & config file let l:prog = findfile('node_modules/.bin/eslint', l:path.";") - let l:cfg = findfile('.eslintrc.json', l:path.";") + let l:cfg = findfile('.eslintrc.js', l:path.";") + if empty(l:cfg) + let l:cfg = findfile('.eslintrc.yaml', l:path.";") + endif + if empty(l:cfg) + let l:cfg = findfile('.eslintrc.yml', l:path.";") + endif + if empty(l:cfg) + let l:cfg = findfile('.eslintrc.json', l:path.";") + endif if empty(l:cfg) let l:cfg = findfile('.eslintrc', l:path.";") endif