I'm using i18next-parser and I would like to remove unused keys, but exclude some patterns.
To Reproduce
With boolean value, it works. But when I try to use regex pattern, it fails.
keepRemoved: ["\binterval\w*\b"],
It throws error
[error] TypeError: pattern.test is not a function
From docs keepRemoved: false, // Keep keys from the catalog that are no longer in code // You may either specify a boolean to keep or discard all removed keys. // You may also specify an array of patterns: the keys from the catalog that are no long in the code but match one of the patterns will be kept. // The patterns are applied to the full key including the namespace, the parent keys and the separators.
🐛 Bug Report
I'm using i18next-parser and I would like to remove unused keys, but exclude some patterns.
To Reproduce
With boolean value, it works. But when I try to use regex pattern, it fails.
keepRemoved: ["\binterval\w*\b"],
It throws error
[error] TypeError: pattern.test is not a function
From docs
keepRemoved: false, // Keep keys from the catalog that are no longer in code // You may either specify a boolean to keep or discard all removed keys. // You may also specify an array of patterns: the keys from the catalog that are no long in the code but match one of the patterns will be kept. // The patterns are applied to the full key including the namespace, the parent keys and the separators.
Your Environment