This ESLint plugin will:
- Report duplicate messageIds with different defaultMessages.
- Collect and dump messageIds and defaultMessages into a target dir/locale.json file.
Provide dir
and locale
to enable storing of extracted locale data.
{
"rules": {
"react-intl-extractor/message-collector": [
"error",
{
"dir": "src/translations",
"locale": "en"
}
]
}
}
Tests need some work.