@@ -83,12 +83,6 @@ export default {
8383 return
8484 }
8585
86- if ( this . worker === null ) {
87- // Abort if worker is not yet ready
88- atom . notifications . addError ( 'Linter-ESLint: Not ready, please try again' )
89- return
90- }
91-
9286 this . worker . request ( 'FIX' , {
9387 fileDir,
9488 filePath,
@@ -103,10 +97,6 @@ export default {
10397 }
10498 } ) )
10599
106- // Reason: I (steelbrain) have observed that if we spawn a
107- // process while atom is starting up, it can increase startup
108- // time by several seconds, But if we do this after 5 seconds,
109- // we barely feel a thing.
110100 const initializeWorker = ( ) => {
111101 if ( this . active ) {
112102 const { child, worker, subscription } = spawnWorker ( )
@@ -121,7 +111,7 @@ export default {
121111 } )
122112 }
123113 }
124- setTimeout ( initializeWorker , 5 * 1000 )
114+ initializeWorker ( )
125115 } ,
126116 deactivate ( ) {
127117 this . active = false
@@ -143,15 +133,6 @@ export default {
143133 const fileDir = Path . dirname ( filePath )
144134 const showRule = atom . config . get ( 'linter-eslint.showRuleIdInMessage' )
145135
146- if ( this . worker === null ) {
147- return Promise . resolve ( [ {
148- filePath,
149- type : 'Info' ,
150- text : 'Worker initialization is delayed. Please try saving or typing to begin linting.' ,
151- range : Helpers . rangeFromLineNumber ( textEditor , 0 )
152- } ] )
153- }
154-
155136 return this . worker . request ( 'JOB' , {
156137 fileDir,
157138 filePath,
0 commit comments