Update the no-proto rule documentation #11743
Labels
accepted
There is consensus among the team that this change meets the criteria for inclusion
archived due to age
This issue has been archived; please open a new issue for any further discussion
documentation
Relates to ESLint's documentation
rule
Relates to ESLint's core rules
The version of ESLint you are using.
5.16.0.
The problem you want to solve.
The documentation of the
no-proto
rule seems to be outdated as of today. I can point out three issues:getPrototypeOf
method instead of__proto__
. ButgetPrototypeOf
cannot change the prototype of an object, and as such cannot be used to rewrite assignments to the__proto__
property, which theno-proto
rule complains about.getPrototypeOf
is not yet universal". NowgetPrototypeOf
(unlikesetPrototypeOf
) is part of ES 5.1 spec and is implemented in browsers as old as IE 9 and Safari 7.getPrototypeOf
:Object.getPrototypeOf
andReflect.getPrototypeOf
, where the main difference is browser support. The documentation leaves this ambiguity open to the reader.Your take on the correct solution to problem.
I'd be glad to submit a PR if the team agrees that the rule documentation needs to be updated.
Are you willing to submit a pull request to implement this change?
Sure.
The text was updated successfully, but these errors were encountered: