eslint-plugin-compat: Unsupported warning for browser not in browserslist query

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.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 10
  • Comments: 16 (2 by maintainers)

Most upvoted comments

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.