amilajack / amilajack/eslint-plugin-compat

Minimised feature detection (&&) not handled

Open
#508 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
3.2k
Forks
115
PR merge metrics
No merged PRs in 30d

Description

This plugin is fine with this code
```
if (window.ResizeObserver) {
this.canvasResizeObserver = new ResizeObserver((entries) => this.oncanvasresize(entries));
}
```

But I run it on the final Terser-minimised output of my project (so that I can ensure that the final output is compatible), and it raises errors for this minimised version.
```
window.ResizeObserver&&(this.canvasResizeObserver=new ResizeObserver((e=>this.oncanvasresize(e))))
```

Can the feature detection handler be updated to support `&&`?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.