Closed robatwilliams closed 1 year ago
Indeed I seem to be in need of this:
/home/ubuntu/app/dist/web/10.js
24:260 error ES2017 'Object.getOwnPropertyDescriptors' method is forbidden ecmascript-compat/compat
24:328 error ES2017 'Object.getOwnPropertyDescriptors' method is forbidden ecmascript-compat/compat
193:260 error ES2017 'Object.getOwnPropertyDescriptors' method is forbidden ecmascript-compat/compat
193:328 error ES2017 'Object.getOwnPropertyDescriptors' method is forbidden ecmascript-compat/compat
This would still be doable with https://eslint-plugin-es.mysticatea.dev/#the-aggressive-mode - we'd just not enable the rules at all.
Example of someone working around the absence of this feature: https://github.com/moodlehq/moodleapp/blob/393790412d1ab3fd4a1cc951427ba071c9af2195/.github/workflows/testing.yml#L59
Similar problem is guarded usage (feature detection), e.g. in libraries - e.g. globalThis, Object.getOwnPropertyDescriptors
We plan to implement this too- will you have time to review and merge it? and are still happy with your solution?
Yes at some point, I'm a bit otherwise occupied over the summer.
And yes the options structure I drafted in the issue description still looks ok, if it still makes sense once someone digs into implementing it.
@robatwilliams @lukeapage Could you please have a look if this approach looks ok to you: https://github.com/robatwilliams/es-compat/pull/50?
I've also considered wrapping rules, so we could exclude them before even using (might a bit more efficient), but implementation would be much more complex than doing simple message text comparison.
Hi, and thanks. Started discussion on the PR about this.
This is now released in v2.2.0 thanks to the work of @sobstel .
FYI @jedlikowski (liked), @dobesv (commented), @NoelDeMartin (workaround in moodleapp), @zloirock (mentioned interest via #51)
Whitelist particular non-syntax features as "polyfill provided", so they aren't reported as problems.
The list would be specified as an option to the rule: