This repository was archived by the owner on Mar 21, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,9 @@ import flatMap = require("lodash.flatmap");
2
2
import * as path from "path" ;
3
3
import * as vscode from "vscode" ;
4
4
import * as client from "vscode-languageclient" ;
5
+ import { getEsyConfig , isBucklescriptProject } from "../utils" ;
5
6
import * as command from "./command" ;
6
7
import * as request from "./request" ;
7
- import { getEsyConfig , isBucklescriptProject } from "../utils" ;
8
8
9
9
const isWin = process . platform === "win32" ;
10
10
@@ -31,7 +31,7 @@ class ErrorHandler {
31
31
}
32
32
}
33
33
34
- async function isEsyConfiguredProperly ( esyConfig : any ) {
34
+ function isEsyConfiguredProperly ( esyConfig : any ) {
35
35
const requiredDependencies = [ "ocaml" , "@opam/merlin-lsp" ] ;
36
36
37
37
if ( ! esyConfig ) {
@@ -49,9 +49,9 @@ async function isEsyConfiguredProperly(esyConfig: any) {
49
49
} ) ;
50
50
}
51
51
52
- async function isConfuguredProperly ( esyConfig : any ) {
52
+ function isConfuguredProperly ( esyConfig : any ) {
53
53
if ( esyConfig ) {
54
- return await isEsyConfiguredProperly ( esyConfig ) ;
54
+ return isEsyConfiguredProperly ( esyConfig ) ;
55
55
}
56
56
57
57
if ( isBucklescriptProject ( ) ) return true ;
Original file line number Diff line number Diff line change 1
1
import { execSync } from "child_process" ;
2
+ import * as fs from "fs" ;
2
3
import * as path from "path" ;
3
- import * as vscode from "vscode" ;
4
4
import { promisify } from "util" ;
5
- import * as fs from "fs " ;
5
+ import * as vscode from "vscode " ;
6
6
7
7
const exists = promisify ( fs . exists ) ;
8
8
const readFile = promisify ( fs . readFile ) ;
@@ -31,7 +31,7 @@ export async function getEsyConfig() {
31
31
}
32
32
33
33
let configFile = path . join ( root , "esy.json" ) ;
34
- let isConfigFileExists = await exists ( configFile ) ;
34
+ const isConfigFileExists = await exists ( configFile ) ;
35
35
if ( ! isConfigFileExists ) {
36
36
configFile = path . join ( root , "package.json" ) ;
37
37
}
@@ -68,7 +68,7 @@ function getExecutablePath(executable: string) {
68
68
export async function getFormatter ( configuration : vscode . WorkspaceConfiguration , formatterName : string ) {
69
69
const rootPath = vscode . workspace . rootPath || "" ;
70
70
const formatterPath = configuration . get < string | undefined > ( `path.${ formatterName } ` ) || formatterName ;
71
- let esyConfig = await getEsyConfig ( ) ;
71
+ const esyConfig = await getEsyConfig ( ) ;
72
72
73
73
if ( esyConfig ) {
74
74
if ( ! esyConfig . devDependencies [ `@opam/${ formatterName } ` ] ) {
You can’t perform that action at this time.
0 commit comments