Disallow throwing non-error objects

Summary: It's annoying to have to treat things like they might not be errors, inside catch blocks. This should stop that.

Reviewed By: passy

Differential Revision: D16201509

fbshipit-source-id: b028ea3a1e0766763fcf2659d80456f4dd281c40
This commit is contained in:
John Knox
2019-07-11 08:54:44 -07:00
committed by Facebook Github Bot
parent 9f1f34bd99
commit c69f3e3103

View File

@@ -30,6 +30,7 @@ module.exports = {
'no-console': 0, // we're setting window.console in App.js
'no-multi-spaces': 2,
'prefer-promise-reject-errors': 1,
'no-throw-literal': 'error',
'no-extra-boolean-cast': 2,
'no-extra-semi': 2,
'no-unsafe-negation': 2,