question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unsupported warning for browser not in browserslist query

See original GitHub issue

After updating from v2.7.0 to v3.3.0, I’m getting error messages about a feature not supported in browsers that I don’t intend to support.

The errors are these:

/scripts/component/create-component.js
  12:9  error  Promise.all() is not supported in Opera Mini all, IE Mobile 11, Blackberry Browser 10  compat/compat

/scripts/svg/index.js
  38:9  error  Promise.all() is not supported in Opera Mini all, IE Mobile 11, Blackberry Browser 10  compat/compat

/src/index.js
  14:1  error  Promise.all() is not supported in Opera Mini all, IE Mobile 11, Blackberry Browser 10  compat/compat

✖ 5 problems (5 errors, 0 warnings)

My setup for browserslist in the package.json is this:

"browserslist": [
    "last 2 versions",
    "not android < 100",
    "not and_qq < 100",
    "not and_uc < 100",
    "not baidu < 100",
    "not bb < 100",
    "not ie <= 11",
    "not ie_mob <= 11",
    "not opera < 1000",
    "not op_mini all",
    "not op_mob < 100",
    "not samsung < 100"
  ]

And the results from npx browserslist is:

and_chr 71
and_ff 64
chrome 72
chrome 71
edge 18
edge 17
firefox 65
firefox 64
ios_saf 12.0-12.1
ios_saf 11.3-11.4
safari 12
safari 11.1

So according to the list above from npx browserslist, unless I’m missing something, I’m sure I should not be getting these linting errors from eslint-plugin-compat.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:10
  • Comments:14 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
rrosencommented, May 13, 2020

I was seeing similar behavior. In .eslintrc.js I had:

extends: ["eslint:recommended", "plugin:compat/recommended", "preact"],

I removed the preact entry and the checks to browsers not defined in the broweserslist config went away.

0reactions
neongreencommented, Jun 8, 2022

NB: I had the same issue with eslint-plugin-compat. I removed all plugins from the extends section, then added them back one by one, and… it was gone. Not sure what happened there.

Read more comments on GitHub >

github_iconTop Results From Across the Web

eslint-plugin-compat - Bountysource
After updating from v2.7.0 to v3.3.0 , I'm getting error messages about a feature not supported in browsers that I don't intend to...
Read more >
javascript - show an error message if browser is not supported
In my Vue.js app, I have the following in package.json "browserslist ...
Read more >
browserslist - npm
The config to share target browsers and Node.js versions between different front-end tools. It is used in: Autoprefixer · Babel · postcss-preset ...
Read more >
node_modules/browserslist · master - PLMlab - CNRS
Browsers that we support defaults not IE 11 not IE_Mob 11 maintained node versions ... Browserslist will use browsers and Node.js versions query...
Read more >
Browser support - Docusaurus
As old browsers do not support modern APIs or syntax, ... file as a root browserslist field. caution. On old browsers, the compiled...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found