You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Per https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize , there are examples of unicode that are similar in character. Generally this could mean that there is a key mismatch on 2 apparently similar strings. Suggesting using a normalized form to avoid this potential issue would be good so that the following 2 object don't have mismatched keys:
{
"Amélie": 1
}
{
"Amélie": 2
}
There are valid use cases for these key mismatches, but they are generally very specific in scope.
Participation
I am willing to submit a pull request to implement this rule.
Additional comments
Similar mismatches or deception such as using Bidi mixing / zero width characters etc. are potentially in the same vein but likely would be a different scope since those have associated CVEs.
The text was updated successfully, but these errors were encountered:
Ah interesting. I agree this would be good to catch. I'm wondering if this should be part of no-duplicate-keys via an option or a completely separate rule. What do you think?
Rule details
Normalize string keys
What type of rule is this?
Suggests an alternate way of doing something
Example code
Per https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize , there are examples of unicode that are similar in character. Generally this could mean that there is a key mismatch on 2 apparently similar strings. Suggesting using a normalized form to avoid this potential issue would be good so that the following 2 object don't have mismatched keys:
There are valid use cases for these key mismatches, but they are generally very specific in scope.
Participation
Additional comments
Similar mismatches or deception such as using Bidi mixing / zero width characters etc. are potentially in the same vein but likely would be a different scope since those have associated CVEs.
The text was updated successfully, but these errors were encountered: