-
-
Notifications
You must be signed in to change notification settings - Fork 353
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
prevent-abbreviations
: Ignore i18n
and l10n
#1445
prevent-abbreviations
: Ignore i18n
and l10n
#1445
Conversation
rules/prevent-abbreviations.js
Outdated
@@ -96,6 +96,10 @@ const getNameReplacements = (name, options, limit = 3) => { | |||
return {total: 0}; | |||
} | |||
|
|||
if (name.includes('i18n')) { |
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.
It should not be hard-coded directly here. There should be an internal list like allowList
that is checked in the above if-statement.
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.
Done!
I added i18n
and l10n
to defaultAllowList
.
But we should probably move it to defaultReplacements
, because something like const i18nData = {}
will not work, and it will still suggests to refactor it to index18nData
but that's wrong.
What do you think ? 馃槃
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.
It's known #752, you'll have to use ignore
option for now.
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.
Right, so I added defaultIgnore
, should we also, add a new option, extendDefaultIgnore
?
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.
Right, so I added defaultIgnore, should we also, add a new option, extendDefaultIgnore ?
Nah. We can add it when it's needed. I see no reason to not want these ignores.
Let's ignore |
i18n
prevent-abbreviations
: Ignore i18n
and l10n
Hey 馃憢,
This PR fixes #1188
It ignores the
i18n
keyword for theprevent-abbreviations
rule, as it is well-known and popular enough.I also like the idea of, explicit > implicit, but sometimes, things are done like that, so we can relax a bit the rule.