diff options
author | Kevin Locke <kevin@kevinlocke.name> | 2020-07-08 13:42:01 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-08 14:42:01 +0100 |
commit | 106c27644b4ff7543d600ae54ab9c53bec909828 (patch) | |
tree | 9051aa409edf4ef7361b3af992ef98c49a2b8be1 /test/command_callback/elixir_paths | |
parent | fd399c527f1812825bfd63c63255c648aa7ceef4 (diff) | |
download | ale-106c27644b4ff7543d600ae54ab9c53bec909828.zip |
eslint: Use cwd from executable location to fix nested projects (#3222)
* Split FindNearestExecutable from FindExecutable
The path searching in ale#node#FindExecutable() will be useful for
eslint. Refactor it into a separate function so it can be used without
regard for the state of the _use_global and _executable variables.
Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
* eslint: Set project root from local executable
Using the nearest directory with node_modules does not work correctly
for nested projects where the eslint dependencies are in the outer
project. For example:
https://github.com/dense-analysis/ale/issues/3143#issuecomment-652452362
Adopt the behavior of SublimeLinter, which runs from project_root
determined by the presence of the eslint executable in node_modules/.bin
(or eslint in dependencies/devDependencies of package.json, which we can
add later as necessary). See [NodeLinter#find_local_executable].
[NodeLinter#find_local_executable]: https://github.com/SublimeLinter/SublimeLinter/blob/056e6f6/lint/base_linter/node_linter.py#L109
Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
Diffstat (limited to 'test/command_callback/elixir_paths')
0 files changed, 0 insertions, 0 deletions