Open sbdchd opened 3 years ago
// err const foo = {} bar.map(x => { foo[x.id] = x }) // ok const foo = {} bar.forEach(x => { foo[x.id] = x }) // ok const bar = { map: (cb: () => void) => {} } bar.map(x => { foo[x.id] = x })
Use type information to ensure we don't mess up.
A more extensive lint would replicate something like Rust's #[must_use]
#[must_use]
rel: https://github.com/eslint/eslint/issues/12980
rel: https://github.com/sindresorhus/eslint-plugin-unicorn/issues/741
Use type information to ensure we don't mess up.
A more extensive lint would replicate something like Rust's
#[must_use]
rel: https://github.com/eslint/eslint/issues/12980
rel: https://github.com/sindresorhus/eslint-plugin-unicorn/issues/741