File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -120,6 +120,9 @@ export default tseslint.config(
120120 } , {
121121 selector : 'ChainExpression' ,
122122 message : 'Optional chaining is now allowed.' ,
123+ } , {
124+ selector : 'MemberExpression[object.type=\'MetaProperty\'][property.name=\'url\']' ,
125+ message : 'import.meta.url is not available in the UMD bundle.' ,
123126 }
124127 ] ,
125128 }
@@ -289,7 +292,9 @@ export default tseslint.config(
289292 files : [
290293 'test/**' ,
291294 'build/**' ,
292- 'rollup.*'
295+ 'rollup.*' ,
296+ 'src/style-spec/test.js' ,
297+ 'src/style-spec/rollup.config.js' ,
293298 ] ,
294299
295300 rules : {
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ import WorkerClass from './worker_class';
33export function createWorker ( ) : Worker {
44 const workerUrl = WorkerClass . workerUrl ?
55 WorkerClass . workerUrl :
6+ // it's safe to use import.meta.url here because this file is only used in the ESM bundle
7+ // eslint-disable-next-line no-restricted-syntax
68 new URL ( 'worker.js' , import . meta. url ) . href ;
79
810 const blob = new Blob ( [ `import '${ workerUrl } ';` ] , { type : 'application/javascript' } ) ;
You can’t perform that action at this time.
0 commit comments