amilajack / eslint-plugin-compat

Check the browser compatibility of your code
MIT License
3.07k stars 104 forks source link

Not working IF sentence inside #428

Open yizumi1012xxx opened 3 years ago

yizumi1012xxx commented 3 years ago

I cloned eslint-plugin-compat-demo and added code and executed yarn lint. COMPAT work IF sentence outside, but NOT work IF sentence inside.

image const foo1 = Object.values({});(line 17) is not warning by compat. I desire compat work everywhere include IF sentence inside.

xxx@xxx eslint-plugin-compat-demo % yarn lint
yarn run v1.22.10
$ eslint .; exit 0
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db

/Users/xxx/xxx/eslint-plugin-compat-demo/index.js
   7:13  error  PaymentRequest is not supported in Safari 9, IE 9        compat/compat
  10:18  error  IntersectionObserver is not supported in Safari 9, IE 9  compat/compat
  12:13  error  Object.values() is not supported in Safari 9, IE 9       compat/compat

✖ 3 problems (3 errors, 0 warnings)

✨  Done in 1.21s.
YuseiUeno commented 2 years ago

same issue https://github.com/amilajack/eslint-plugin-compat/issues/404