From 0a0aec17ca0e99a55faf0cf46ab135196cdf9ed0 Mon Sep 17 00:00:00 2001 From: John Knox Date: Wed, 26 Jun 2019 09:56:17 -0700 Subject: [PATCH] Don't allow rejecting with non-error objects Summary: This will make it easier to handle errors, because you know you can get the message out, along with stack trace, without having to deal with potentially any object that could be passed in. Reviewed By: passy Differential Revision: D16006180 fbshipit-source-id: f200965d7663c5f8a471603fceb6b4cdbea73381 --- .eslintrc.js | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintrc.js b/.eslintrc.js index 2a80917e1..5a14dc957 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -24,6 +24,7 @@ module.exports = { 'max-len': 0, // let's take prettier take care of this indent: 0, // let's take prettier take care of this 'no-console': 0, // we're setting window.console in App.js + 'prefer-promise-reject-errors': 1, // additional rules for this project 'header/header': [2, 'block', {pattern}],