@@ -17,12 +17,12 @@ import { ResolveConfigOptions, Options } from "prettier";
1717let currentCallId = 0 ;
1818
1919const worker = new Worker (
20- url . pathToFileURL ( path . join ( __dirname , "/worker/prettier-instance-worker.js" ) )
20+ url . pathToFileURL (
21+ path . join ( __dirname , "/worker/prettier-instance-worker.js" ) ,
22+ ) ,
2123) ;
2224
23- export const PrettierWorkerInstance : PrettierInstanceConstructor = class PrettierWorkerInstance
24- implements PrettierInstance
25- {
25+ export const PrettierWorkerInstance : PrettierInstanceConstructor = class PrettierWorkerInstance implements PrettierInstance {
2626 private messageResolvers : Map <
2727 number ,
2828 {
@@ -72,7 +72,7 @@ export const PrettierWorkerInstance: PrettierInstanceConstructor = class Prettie
7272
7373 public async format (
7474 source : string ,
75- options ?: PrettierOptions
75+ options ?: PrettierOptions ,
7676 ) : Promise < string > {
7777 const result = await this . callMethod ( "format" , [ source , options ] ) ;
7878 return result ;
@@ -95,7 +95,7 @@ export const PrettierWorkerInstance: PrettierInstanceConstructor = class Prettie
9595
9696 public async getFileInfo (
9797 filePath : string ,
98- fileInfoOptions ?: PrettierFileInfoOptions
98+ fileInfoOptions ?: PrettierFileInfoOptions ,
9999 ) : Promise < PrettierFileInfoResult > {
100100 const result = await this . callMethod ( "getFileInfo" , [
101101 filePath ,
@@ -105,15 +105,15 @@ export const PrettierWorkerInstance: PrettierInstanceConstructor = class Prettie
105105 }
106106
107107 public async resolveConfigFile (
108- filePath ?: string | undefined
108+ filePath ?: string | undefined ,
109109 ) : Promise < string | null > {
110110 const result = await this . callMethod ( "resolveConfigFile" , [ filePath ] ) ;
111111 return result ;
112112 }
113113
114114 public async resolveConfig (
115115 fileName : string ,
116- options ?: ResolveConfigOptions | undefined
116+ options ?: ResolveConfigOptions | undefined ,
117117 ) : Promise < Options > {
118118 const result = await this . callMethod ( "resolveConfig" , [ fileName , options ] ) ;
119119 return result ;
0 commit comments