Skip to content
This repository has been archived by the owner on Mar 7, 2019. It is now read-only.

Commit

Permalink
feat(rule): add require-atomic-updates (warn)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertrossmann committed Aug 15, 2018
1 parent 6b2aabd commit 2bb65c2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions environments/shared/recommended.js
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,14 @@ module.exports = {
// spread operator.
'prefer-spread': 'warn',

// Disallow assignments that can lead to race conditions due to usage of await or yield
// This rule aims to report assignments to variables or properties where all of the following
// are true:
// - A variable or property is reassigned to a new value which is based on its old value
// - A yield or await expression interrupts the assignment after the old value is read, and
// before the new value is set
'require-atomic-updates': 'warn',

// Disallow async functions which have no await expression
// Async functions which have no await expression may be the unintentional result of
// refactoring.
Expand Down

0 comments on commit 2bb65c2

Please sign in to comment.