Skip to content

Commit

Permalink
Support root detection for tsx files.
Browse files Browse the repository at this point in the history
Close #770.
  • Loading branch information
autozimu committed Mar 14, 2019
1 parent 26c8727 commit 1459d24
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ pub fn get_rootPath<'a>(
match languageId {
"rust" => traverse_up(path, |dir| dir.join("Cargo.toml").exists()),
"php" => traverse_up(path, |dir| dir.join("composer.json").exists()),
"javascript" | "typescript" => traverse_up(path, |dir| dir.join("package.json").exists()),
"javascript" | "typescript" | "javascript.jsx" | "typescript.jsx" => {

This comment has been minimized.

Copy link
@insidewhy

insidewhy Mar 14, 2019

Shouldn't this be typescript.tsx rather than typescript.jsx? The former is the &filetype used by yats etc.

This comment has been minimized.

Copy link
@autozimu

autozimu via email Mar 14, 2019

Author Owner

This comment has been minimized.

Copy link
@autozimu

autozimu Mar 14, 2019

Author Owner

Fixed.

traverse_up(path, |dir| dir.join("package.json").exists())
}
"python" => traverse_up(path, |dir| {
dir.join("setup.py").exists()
|| dir.join("Pipfile").exists()
Expand Down

0 comments on commit 1459d24

Please sign in to comment.