prefer-map-has Prefer Map.has over Map.get when only key presence is observed Comparing Map.get with undefined retrieves a value only to determine whether its key exists. Instead, you SHOULD call Map.has when the mapped value cannot itself be undefined. - Category: performance - Level: warning - Fix: automatic - Scope: module Reported function contains(values: Map, key: string): boolean { return values.get(key) !== undefined; } Accepted function contains(values: Map, key: string): boolean { return values.has(key); } Prior art - eslint-plugin-unicorn ยท prefer-has-check language/linter/src/rules/performance/prefermaphas.rs:8