Closed
Description
I would like to enforce that variables and properties with a boolean use the prefix is
, has
, can
, did
, and will
. For example: .visible
→ .isVisible
.
I often see .visible
, .open
, etc, in code, and it's not clear whether they are booleans, contain something visible/open, or whether they contain a function that makes something visible or opens something.
Fail
const visible = true;
const rainbow = false;
Pass
const isVisible = true;
const hasRainbow = false;