File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed
Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -165,8 +165,6 @@ export default [
165165 'ts-check' : false , // allow even without description
166166 } ,
167167 ] ,
168- // TODO: Re-enable for src when we update to eslint and switch to the new
169- // config format
170168 '@typescript-eslint/no-require-imports' : 'off' ,
171169 } ,
172170 linterOptions : {
@@ -179,6 +177,14 @@ export default [
179177 } ,
180178 } ,
181179
180+ // Source files - enable stricter TypeScript rules
181+ {
182+ files : [ 'src/**/*.ts' , 'src/**/*.tsx' ] ,
183+ rules : {
184+ '@typescript-eslint/no-require-imports' : 'error' ,
185+ } ,
186+ } ,
187+
182188 // Test files override
183189 {
184190 files : [ 'src/test/**/*' ] ,
Original file line number Diff line number Diff line change 22 * License, v. 2.0. If a copy of the MPL was not distributed with this
33 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
44//
5- const { parentPort, workerData } = require ( 'worker_threads' ) ;
6- const fs = require ( 'fs' ) ;
7- const vm = require ( 'vm' ) ;
5+ import { parentPort , workerData } from 'worker_threads' ;
6+ import fs from 'fs' ;
7+ import vm from 'vm' ;
88
99if ( typeof workerData !== 'string' ) {
1010 throw new Error ( `Please pass a file name using the 'workerData' property.` ) ;
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ class NodeWorker {
99 onmessage : ( ( event : MessageEvent ) => unknown ) | null ;
1010
1111 constructor ( file : string ) {
12- const worker = new Worker ( __dirname + '/node-worker-contents.js ' , {
12+ const worker = new Worker ( __dirname + '/node-worker-contents.mjs ' , {
1313 workerData : file ,
1414 } ) ;
1515 worker . on ( 'message' , this . onMessage ) ;
You can’t perform that action at this time.
0 commit comments