From cd44a6e28c28a3a33c151b33c0f0d52749439c77 Mon Sep 17 00:00:00 2001 From: Julien Fontanet Date: Thu, 7 Dec 2023 17:05:21 +0100 Subject: [PATCH] feat(eslint): enable require-atomic-updates rule --- .eslintrc.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index 99dd19ad44..0e4b270352 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -68,6 +68,11 @@ module.exports = { 'no-console': ['error', { allow: ['warn', 'error'] }], + // this rule can prevent race condition bugs like parallel `a += await foo()` + // + // as it has a lots of false positive, it is only enabled as a warning for now + 'require-atomic-updates': 'warn', + strict: 'error', }, }