Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"The Function constructor is eval" warning from Mozilla Addons Linter #475

Open
tdriley opened this issue Jul 19, 2021 · 2 comments
Open

Comments

@tdriley
Copy link

tdriley commented Jul 19, 2021

Our Browser Extension seems to be stuck in review with Mozilla, and their submission service is feeding back (what appear to be ESLint warnings), saying "The Function constructor is eval."

I can recreate the warnings by running the Mozilla addons-linter on our extension's dist files and have traced these warnings back to regenerator-runtime which is included as a dependency of babel, which we depend on heavily in our build setup with webpack.

I believe this may be related to this other regenerator issue which also seems to stem from the use of the Function constructor: jaredpalmer/tsdx#954

I've seen suggestions elsewhere that downgrading to regenerator-runtime v0.13.1 may fix the issue, but that version is no longer published on NPM, we'd need to do the downgrade in multiple places and we'll also be carrying forward instability in our build setup.

Envinfo:

System:
OS: macOS 10.15.7
Binaries:
Node: 12.2.0 - ~/.nvm/versions/node/v12.2.0/bin/node
npm: 7.5.2 - ~/.nvm/versions/node/v12.2.0/bin/npm
npmPackages:
@babel/core: ^7.5.5 => 7.5.5
@babel/preset-env: ^7.5.5 => 7.5.5
@babel/preset-react: ^7.0.0 => 7.0.0
babel-jest: ^24.9.0 => 24.9.0
babel-loader: ^8.0.6 => 8.0.6
babel-plugin-emotion: ^10.0.19 => 10.0.19
jest: ^24.9.0 => 24.9.0
webpack: ^4.39.2 => 4.39.2

@JLHwung
Copy link
Contributor

JLHwung commented Jul 19, 2021

Duplicate of #450

@tdriley
Copy link
Author

tdriley commented Jul 26, 2021

I managed to remove the problem code by upgrading or removing some packages which use regenerator-runtime, detailed here: babel/babel#13574 (comment)

It was not a problem with babel, as I originally thought.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants