From 9bc2e67211f23edeb34c519910f87785f7fed5f0 Mon Sep 17 00:00:00 2001 From: Seong Yong-ju Date: Fri, 23 Feb 2018 13:52:25 +0900 Subject: [PATCH] Remove use_local_eslint option Remove use_local_eslint option, because it's default behavior of eslint-cli. --- autoload/SpaceVim/layers/lang/javascript.vim | 21 -------------------- 1 file changed, 21 deletions(-) diff --git a/autoload/SpaceVim/layers/lang/javascript.vim b/autoload/SpaceVim/layers/lang/javascript.vim index f060e5af0..9e1a78c2c 100644 --- a/autoload/SpaceVim/layers/lang/javascript.vim +++ b/autoload/SpaceVim/layers/lang/javascript.vim @@ -33,27 +33,9 @@ function! SpaceVim#layers#lang#javascript#plugins() abort endfunction let s:auto_fix = 0 -let s:use_local_eslint = 0 function! SpaceVim#layers#lang#javascript#set_variable(var) abort let s:auto_fix = get(a:var, 'auto_fix', 0) - let s:use_local_eslint = get(a:var, 'use_local_eslint', 0) -endfunction - -function! s:preferLocalEslint() - let dir = expand('%:p:h') - while finddir('node_modules' ,dir ) is '' - let next_dir = fnamemodify(dir, ':h') - if dir == next_dir - break - endif - let dir = next_dir - endwhile - let node_modules_path = dir . '/node_modules' - let eslint_bin = node_modules_path . '/.bin/eslint' - if (executable(eslint_bin)) - let b:neomake_javascript_eslint_exe = eslint_bin - endif endfunction function! SpaceVim#layers#lang#javascript#config() abort @@ -87,9 +69,6 @@ function! SpaceVim#layers#lang#javascript#config() abort autocmd User NeomakeFinished checktime autocmd FocusGained * checktime endif - if s:use_local_eslint - autocmd BufNewFile,BufRead *.js call s:preferLocalEslint() - endif augroup END endfunction