mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
17e7046754
See #2869 Checks that the *second* argument of warning and invariant are a literal string, or a concatination of literal strings, and that the number of arguments is correct based on the number of %s substrings. This commit also fixes a few places where the existing code had broken error messages! The rule itself is pretty straightforward, although adding the tests ended up being a bit painful, as eslint-tester depends on mocha, and therefore needs to be run in a separate grunt task.