-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tools: disallow deprecated define getter/setter #6774
Conversation
MemberExpression: function(node) { | ||
var prop; | ||
if (node.property) { | ||
if (node.property.type === 'Identifier' && !node.computed) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!node.computed
... so obj['__defineGetter__'] = getter
is the escape hatch? =)
LGTM. This won't catch |
#6766 is the other PR that would need to land before or along with this. It catches the uses inside internal/process/stdio |
LGTM here too. |
In preparation for a lint rule to flag `__defineGetter__`, refactor the one remaining instance in the code base.
@jasnell I added a commit to handle the one remaining instance in the tests. PTAL |
LGTM if CI is green. |
Still LGTM FWIW. |
In preparation for a lint rule to flag `__defineGetter__`, refactor the one remaining instance in the code base. PR-URL: nodejs#6774 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: nodejs#6774 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Refs: nodejs#6768
In preparation for a lint rule to flag `__defineGetter__`, refactor the one remaining instance in the code base. PR-URL: #6774 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
In preparation for a lint rule to flag `__defineGetter__`, refactor the one remaining instance in the code base. PR-URL: #6774 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
@Trott lts? |
@thealphanerd Would need to rewrite the rule to work in v4 so I'm inclined to say no. |
don't land it is 😄 |
Checklist
Affected core subsystem(s)
tools
Description of change
Refs: #6768
This should not land until #6768 lands. Labeling
in progress
./cc @jasnell