1.0.1 • Published 11 months ago

react-intl-detect-unused v1.0.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
11 months ago

npm version

react-intl-detect-unused

Detects unused react-intl translation keys. Parses react-intl message definitions file and searches source files to find out which messages are unused.

Usage

react-intl-unused [-m=ARG] [-s=ARG] [-i=ARG] [-e=ARG] [-h]

OptionDescriptionDefault value
-m or --msg=ARGFile with message definitions./src/Messages.js
-s or --src=ARGProject source folder./src
-i or --include=ARGWhich source files should be included in search*.{js,ts}
-e or --exclude=ARGWhich source files should be excluded from search *.test.js
-h or --helpDisplay this help

Example usage

react-intl-unused -m=./intl/Messages.js -s=./src -i=*.js -e=./util

Restrictions

The script requires grep command to be available.