diff options
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/handlers/xo.vim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/autoload/ale/handlers/xo.vim b/autoload/ale/handlers/xo.vim index 0bea74e4..df2659da 100644 --- a/autoload/ale/handlers/xo.vim +++ b/autoload/ale/handlers/xo.vim @@ -29,7 +29,7 @@ function! ale#handlers#xo#HandleJSON(buffer, lines) abort endfunction function! ale#handlers#xo#GetProjectRoot(buffer) abort - let l:package_path = ale#path#FindNearestFile(a:buffer, 'package.json') + let l:modules_dir = ale#path#FindNearestDirectory(a:buffer, 'node_modules') - return empty(l:package_path) ? '' : fnamemodify(l:package_path, ':p:h') + return empty(l:modules_dir) ? '' : fnamemodify(l:modules_dir, ':h:h') endfunction |