From b78ba523c3a6eba938a42b3ef39c20f4e7759dac Mon Sep 17 00:00:00 2001 From: Calvin Date: Fri, 20 Dec 2019 20:45:44 -0500 Subject: [PATCH] added new lint rules --- .eslintrc.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index 64b0f866eb..00ae4b563e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -23,6 +23,36 @@ module.exports = { */ 'no-param-reassign': ['error', { props: false }], + /**Disallows unnecessary return await + * https://eslint.org/docs/rules/no-return-await + */ + 'no-return-await': ['error'], + + /** + * Disallow using an async function as a Promise executor + * https://eslint.org/docs/rules/no-async-promise-executor + */ + 'no-async-promise-executor': ['error'], + + /** + * Disallow await inside of loops + * https://eslint.org/docs/rules/no-await-in-loop + */ + 'no-await-in-loop': ['error'], + + /** + * Disallow assignments that can lead to race conditions due to + * usage of await or yield + * https://eslint.org/docs/rules/require-atomic-updates + */ + 'require-atomic-updates': ['error'], + + /** + * Disallow async functions which have no await expression + * https://eslint.org/docs/rules/require-await + */ + 'require-awaut': ['error'], + /** * Require or disallow named function expressions * https://eslint.org/docs/rules/func-names