digitalbazaar / eslint-config-digitalbazaar

BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

No cond assignment & no invalid typeOf. #36

Closed aljones15 closed 4 years ago

aljones15 commented 4 years ago

Adds 2 new rules:

https://eslint.org/docs/rules/no-cond-assign

https://eslint.org/docs/rules/valid-typeof

which results in:

if(a.foo = 'x') {
  // eslint does not like this
}

const color = 'foo'

// eslint does not like this either
typeof color === 'strnig';