Skip to content
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 keys #16

Closed
hjylewis opened this issue May 24, 2018 · 7 comments
Closed

Ignore keys #16

hjylewis opened this issue May 24, 2018 · 7 comments
Labels
enhancement New feature or request

Comments

@hjylewis
Copy link

Some translation services require metadata included in language files as a property. It would be great to be able to whitelist properties so that they don't get linted.

For example, right now I'm getting a Array [] ===> TypeError: An Array cannot be a translation value. because the metadata includes an array.

@mayank23
Copy link
Contributor

Hey @hjylewis 😃, thanks for bringing this up. I’m planning on removing the Array restriction and also including ignore options for each rule. If you have any other possible ideas, please let me know! 😄

@hjylewis
Copy link
Author

@mayank23 Awesome! I'll let you know. I'm looking forward to using this plugin but the Array restriction is a blocker at the moment.

@mayank23 mayank23 added the enhancement New feature or request label May 28, 2018
@mayank23
Copy link
Contributor

Hi @hjylewis 😄 . Could you provide an example of what a metadata key could look like? Just for curiosity. Thanks! There is an in progress branch atm, hoping to finish it up soon 😄 . branch:ignore-key-global-setting

@hjylewis
Copy link
Author

We use Smartling as a service to translate our language and they require a "smartling" prop in lang files with meta data about the file.

For example,

// es.json
{
  "smartling": {
    "placeholder_format_custom": [ ... ],
	...
  },
  ...
}

@mayank23
Copy link
Contributor

Awesome, thanks for the info!

@mayank23
Copy link
Contributor

mayank23 commented Jul 2, 2018

hi @hjylewis 😄 , released an update for ignoring keys in the latest v2.4.0 release. https://github.com/godaddy/eslint-plugin-i18n-json#i18n-jsonignore-keys

Currently it's a sort of global setting as mentioned in the README.md . Future updates should turn this into a more granular setting such that it can be controlled on a per rule basis. Thanks!

@hjylewis
Copy link
Author

hjylewis commented Jul 6, 2018

Awesome, thanks!

@mayank23 mayank23 closed this as completed Jul 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants