-
Notifications
You must be signed in to change notification settings - Fork 513
disallowIdentifierNames: fix errors with using object properties as a id... #1204
Conversation
Lgtm |
975300a
to
6b2c360
Compare
Changed to check with |
LGTM |
@@ -54,14 +54,14 @@ module.exports.prototype = { | |||
var disallowedIdentifiers = this._identifierIndex; | |||
|
|||
file.iterateNodesByType('Identifier', function(node) { | |||
if (disallowedIdentifiers[node.name]) { | |||
if (disallowedIdentifiers.hasOwnProperty(node.name)) { |
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.
Actually this will cause a problem if a hasOwnProperty
key exists on the object. You want Object.prototype.hasOwnProperty.call(disallowedIdentifiers, node.name)
@hzoo any chance of fixing my comment? I'd love to see this merged and released asap :-) |
6b2c360
to
3bd61b3
Compare
@ljharb Made the change. Should I write a test for this? (configure with |
@hzoo that's up to @mrjoelkemp and the collaborators. I don't typically write a test for this case, because one would also have to test for @mrjoelkemp any chance this could be merged and published soon? :-) |
@ljharb yeah, I can land some PR's and release a patch version tonight. |
@mikesherov hooray, thanks! I've got lots of repos I want to bump |
@ljharb got delayed in doing this last night. Sorry about that, will hopefully get to this tonight! |
@mikesherov np, any chance for today? |
@mikesherov :-) ping again? (please stop me if this form of a reminder isn't helpful, not trying to be a bother) |
@mikesherov Can I help you with |
The pinging isn't necessary :) We don't usually forget about PRs, we just do a bunch of merges in one sitting. @zxqfox, since it's been approved by two maintainers, it should be fine to initiate the fast-forward merge. We'd still have to cut a patch release, which won't happen today. However, @ljharb, after merge, you can reference the master branch of jscs if you need immediate access to the fix. |
@ljharb Landed, thanks for patience 😼 |
Thank you!!! I'll wait quietly for the publish :-) |
...entifier
Fixes #1203