Skip to content

Ability to ignore certain lines to hide editor hintsΒ #1367

@tpaksu

Description

@tpaksu

Is your feature related to a specific framework or general for this extension
It's a general request.

Is your feature request related to a problem? Please describe.
Nope, it's an enhancement to the system.

Describe the solution you'd like
Just like tslint/eslint/phpcs etc, I believe a ignore system could be beneficial to us who don't want to see error indicators on their UI :)

For example, this type of translations:

   text={i18n.t('MY_PREFIX_' + type.toUpperCase())}

produces

en: i18n key "MY_PREFIX_" does not exist(i18n-ally-key-missing)

information hint on the UI, whereas it should've known that it isn't the whole thing to consider as a key.

But since this is a static checker, I know that this is not very much possible, so instead, if we could silence this type of warnings with a comment like:

   text={i18n.t('MY_PREFIX_' + type.toUpperCase())} // i18n-ally-ignore i18n-ally-key-missing

where we deliberately can ignore the line from showing the information, it would be awesome-er.

Another issue like this is, which could be resolved with the ignore comment; i18next library allows us to define countable translations like:

  "COMMENTS_COUNT_zero": "No comments",
  "COMMENTS_COUNT_one": "{{count}} comments",
  "COMMENTS_COUNT_other": "{{count}} comments",

and we use the translation call like:

  {i18n.t("COMMENTS_COUNT")}

where it produces the same information hint.

Let me know what you think about this possible feature.

Thanks for creating and maintaining this great extension.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions