@@ -86,9 +86,7 @@ if (cluster.isMaster) {
8686 outFn = function ( str ) {
8787 fs . writeSync ( fd , str , 'utf8' ) ;
8888 } ;
89- process . on ( 'exit' , function ( ) {
90- fs . closeSync ( fd ) ;
91- } ) ;
89+ process . on ( 'exit' , ( ) => { fs . closeSync ( fd ) ; } ) ;
9290 } else {
9391 outFn = function ( str ) {
9492 process . stdout . write ( str ) ;
@@ -117,20 +115,20 @@ if (cluster.isMaster) {
117115
118116 if ( showProgress ) {
119117 // Start the progress display update timer when the first worker is ready
120- cluster . once ( 'online' , function ( ) {
118+ cluster . once ( 'online' , ( ) => {
121119 startTime = process . hrtime ( ) ;
122120 setInterval ( printProgress , 1000 ) . unref ( ) ;
123121 printProgress ( ) ;
124122 } ) ;
125123 }
126124
127- cluster . on ( 'online' , function ( worker ) {
125+ cluster . on ( 'online' , ( worker ) => {
128126 // Configure worker and give it some initial work to do
129127 worker . send ( workerConfig ) ;
130128 sendWork ( worker ) ;
131129 } ) ;
132130
133- process . on ( 'exit' , function ( code ) {
131+ process . on ( 'exit' , ( code ) => {
134132 if ( showProgress ) {
135133 curPath = 'Done' ;
136134 printProgress ( ) ;
@@ -232,7 +230,7 @@ if (cluster.isMaster) {
232230 // Worker
233231
234232 var config = { } ;
235- process . on ( 'message' , function ( files ) {
233+ process . on ( 'message' , ( files ) => {
236234 if ( files instanceof Array ) {
237235 // Lint some files
238236 const report = cli . executeOnFiles ( files ) ;
0 commit comments