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
This rule reports duplicate keys within the same locale.
What category of rule is this? (place an "X" next to just one item)
[ ] Enforces code style (layout)
[X] Warns about a potential error (problem)
[ ] Suggests an alternate way of doing something (suggestion)
[ ] Other (please specify:)
Provide 2-3 code examples that this rule will warn about:
en.for-module1.json
{"dupe-key1": "foo",// <- dupe-key1 are duplicates."dupe-key1": "bar",// <- dupe-key1 are duplicates."dupe-key2": "baz",// <- dupe-key2 duplicates the same locale key in another file.}
en.for-module2.json
{"dupe-key2": "qux",// <- dupe-key2 duplicates the same locale key in another file.}
Additional context
I found in #79 that some users have multiple resources for the same locale.
I thought that if you split into multiple files, you will not be able to check for duplicate keys or missing keys, but I realized that this plugin mechanism can implement rules to check for duplicate keys and missing keys.
If we add this rule, we need to change the no-missing-keys rule to not report if you have at least one hit in the same locale.
I also considered whether a rule was needed to report keys that were existing in one locale and missing in another.
In my opinion, this rule is not needed as the reporting of the no-missing-keys rule meets this.
The text was updated successfully, but these errors were encountered:
Please describe what the rule should do:
This rule reports duplicate keys within the same locale.
What category of rule is this? (place an "X" next to just one item)
[ ] Enforces code style (layout)
[X] Warns about a potential error (problem)
[ ] Suggests an alternate way of doing something (suggestion)
[ ] Other (please specify:)
Provide 2-3 code examples that this rule will warn about:
Additional context
I found in #79 that some users have multiple resources for the same locale.
I thought that if you split into multiple files, you will not be able to check for duplicate keys or missing keys, but I realized that this plugin mechanism can implement rules to check for duplicate keys and missing keys.
If we add this rule, we need to change the
no-missing-keys
rule to not report if you have at least one hit in the same locale.I also considered whether a rule was needed to report keys that were existing in one locale and missing in another.
In my opinion, this rule is not needed as the reporting of the
no-missing-keys
rule meets this.The text was updated successfully, but these errors were encountered: