-
-
Notifications
You must be signed in to change notification settings - Fork 938
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
Ignore map property name (#4375) #4450
Conversation
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.
Nice solution!
@@ -18,6 +19,8 @@ const messages = ruleMessages(ruleName, { | |||
rejected: (unit) => `Unexpected unknown unit "${unit}"`, | |||
}); | |||
|
|||
const mapPropertyNameIndexOffset = 4; |
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.
Could you explain what this variable for, please? I don't understand from the following.
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.
The map property name (in map cleared from comments & spaces) always has index that being divided by 4 gives remainder equals 0 (e.g. 0, 4, 8 etc).
The naming of this const
definitely has to be changed since it's not clear. Any suggestions? Or may be comment would be enough?
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.
I think comment in the code would be enough.
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.
Added comment with explanation.
Co-Authored-By: Aleks Hudochenkov <[email protected]>
Co-Authored-By: Aleks Hudochenkov <[email protected]>
|
It should close #4375 .
No, it's self explanatory.