Closed nezed closed 6 years ago
Bad:
const a = !!b
Good:
const a = Boolean(b)
const a = new Boolean(b)
no-implicit-coercion
string: true
const a = '' + 123
const n = 123 const a = `${n}` const b = n.toString() const c = String(n)
https://eslint.org/docs/rules/no-implicit-coercion
Bad:
Good:
https://eslint.org/docs/rules/no-new-wrappers
Bad:
Good: