turbo
75479b01 - Warn on not-yet-supported import.meta usage (#2397)

Commit
3 years ago
Warn on not-yet-supported import.meta usage (#2397) This implements a warning when `import.meta` is referenced, both as a standalone expression (`import.meta`) and as a member expression (`import.meta.url`, `import.meta.foo`, etc.). To do: * [x] This expression covers both `import.meta` as well as `new.target`. Investigate how this usage is impacted and handle it. Test Plan: * Added a `import.meta` expression and `import.meta.url` member expression in a test app and verified both were flagged (see below) * In the same test app, verified using `new.target` was not flagged. ``` path/to/testapp/src/index.jsx:1:12 error TP1106 import.meta is not yet supported 1 > console.log(import.meta); 2 console.log(import.meta.url); 3 4 function Foo() { 5 new.target; path/to/testapp/src/index.jsx:2:12 error TP1106 import.meta is not yet supported 1 console.log(import.meta); 2 > console.log(import.meta.url); 3 4 function Foo() { 5 new.target; 6 } ```
Author
Parents
Loading