react-intl-messages-linter
Lint react-intl messages used in your React components.
Last updated 2 years ago by p0lip .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install react-intl-messages-linter 
SYNC missed versions from official npm registry.

react-intl-messages-linter

Install

yarn add --dev react-intl-messages-linter

Usage

lint-react-intl-messages [options] path

Command line options/flags

-q, --quiet [true]          Report errors only   
-i, --ignore                Pattern of files to ignore
--webpack                   Path to webpack config

Disclaimer

Note that this tool was made to help you spotting missing messages. It does not aim to replace proper unit/integrations tests you should have in most (if not all) cases. There are a couple of caveats and it may be unable to detect missing messages under unsupported circumstances or report a false positive.

Assumptions and caveats

  • Names of import specifiers must match the following regexp /[az]*messages$/i
  • Path of message imports must match /.*/[a-z-]*messages(?:.js)?$/i
  • Reasonable shadowing
  • Computed messages are not supported well... just yet
  • Messages with circular (imported) dependencies are not supported

TODO:

  • add some documentation :D
  • get rid of as many of above caveats as possible
  • make unsafe usages more robust and reliable
  • add feature to ignore files

LICENSE

MIT

Current Tags

  • 0.0.1                                ...           latest (2 years ago)

2 Versions

  • 0.0.1                                ...           2 years ago
  • 0.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (12)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |