diff options
author | Charles B Johnson <mail@cbjohnson.info> | 2020-06-29 18:40:43 -0500 |
---|---|---|
committer | Charles B Johnson <mail@cbjohnson.info> | 2021-01-22 09:23:54 -0600 |
commit | f17beadb49a6e57520303ea9a10722df1be4d13e (patch) | |
tree | 9614cb361d2a72f798fff2377445a20143d170c6 /autoload | |
parent | 8ffde14039bdc0c12d1edf961461245eb15858e9 (diff) | |
download | ale-f17beadb49a6e57520303ea9a10722df1be4d13e.zip |
fixers/xo: support monorepos
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 |