New rules in "@shopify/shop-minis-react": "0.4.9" Lint fails for fetch and URL

Lint fails with “fetch“ and “URL”
I guess it comes from Opera Mini from Browserlist. Can it be removed ?

iScreen Shoter - PhpStorm - 251204170649

iScreen Shoter - PhpStorm - 251204170725

Did you add the url in your trusted_domains array in the manifest.json?

{
  "name": "",
  "description": "",
  "permissions": [],
  "scopes": [
    "product_list:write",
    "openid"
  ],
  "trusted_domains": [
    "example.com"
  ],
  "handle": "",
  "terms_url": "",
  "privacy_policy_url": ""
}

Yes, I did. It will not work without that at all. The lint problem comes from Browserlist and Opera Mini, for my opinion.

1 Like

Hey! Can you make sure you are using the latest cli with npx shop-minis upgrade and then use npm run lint / npx eslint . to see if it fails? Thanks!

That problem was on version 0.4.9 of shop-minis-react

@steve-t-shopify It still happened for me after upgrade, because the upgrade doesn’t modify the package.json. I created a new mini and found out that I have to add these two lines to my package.json:

“browserslist”: [
“ios >= 15”,
“android >= 138”
],

Oh that’s interesting - I’ll take a look at what happened there

Just checked one of my test minis and the upgrade added the section to package.json correctly - I’ll keep an eye on this thread to see if any others hit the same issue