amilajack / amilajack/eslint-plugin-compat

Not working IF sentence inside

Đang mở
#428 1 bình luận 2 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
3.2k
Fork
115
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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](https://user-images.githubusercontent.com/19519041/101281268-6ed53c80-3811-11eb-8edc-c9e21d7df41e.png)
`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.
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.