Comments (10)
Oh yea, that's right. I've updated the rfc the initial comment to reflect this. Thanks for letting me know about this!
from eslint-plugin-compat.
@deecewan Sorry for the late response. Somehow I missed the notification for this. That should be allowed. I just added this example to my initial comment
from eslint-plugin-compat.
Wouldn't ServiceWorker
throw a ReferenceError when it's not defined, unless it's used with typeof
?
from eslint-plugin-compat.
In other words, duck-typing should only be allowed when chained off of a definitely-present object.
from eslint-plugin-compat.
what would happen in this case:
if (String.prototype.includes) {
if ('some'.includes('e')) {
// do some action
}
}
In this case, you've validated that the function exists before using it.
from eslint-plugin-compat.
@amilajack Say, we're very interested in this feature at my company. Have you made any headway? If you need help, me and some of my colleagues would be happy to roll up our sleeves!
from eslint-plugin-compat.
Hi @amilajack, I am also interested in this feature, has any progress been made since? Would you like any contribution? Cheers
from eslint-plugin-compat.
@SalimBensiali I always love contributions. Unfortunately I don't have enough time to contribute to this project. Would really love if anyone could work on this!
from eslint-plugin-compat.
No worries @amilajack , is there an initial branch, POC? Is this issue here the one source of truth? Happy to look at this. Cheers.
from eslint-plugin-compat.
Nope, nothing yet
from eslint-plugin-compat.
Related Issues (20)
- Are Array Prototype Methods Supported? HOT 1
- why does this project depend on core-js? HOT 1
- why inside If statement is exempt HOT 1
- AudioContext is not supported in Safari 13.1, iOS Safari 14.0-14.4 HOT 1
- Please update `ast-metadata-inferer` to 0.8.x HOT 2
- False positive: String.raw() is not supported in Opera 92 HOT 2
- requestIdleCallback not reported even though it is not available on Safari
- Lookbehind in regular expressions not reported even though it is not supported on Safari browser HOT 1
- False positive for `Symbol.asyncIterator()` in iOS Safari HOT 2
- Compatibility check issue: eslint-plugin-compat is checking against node 14.x instead of just node 16.x after upgrading to latest version 4.1.4 HOT 1
- Support Node 20 HOT 1
- No report for addEventListener on MediaQueryList on old browsers
- Wrong pattern for scheduler local variable
- Passing browserslist query via settings, instead of package.json
- window.location.hostname() is not supported in Opera 98 HOT 1
- Might Miss Compatibility Issues Based on Assumed Polyfills from Babel Config
- support flat config HOT 1
- [want feature] special runtime restrict
- mdn browser definition is outdated HOT 1
- URLSearchParams.size not reported when targeting Safari / iOS <17
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eslint-plugin-compat.