Skip to main content

boolean-parameter-prefixes

Requires boolean parameter names to start with an approved prefix followed by an uppercase letter, -, or _.

AttributeValue
CategoryParameters
MaturityGold
Starter–RecommendedOff
StrictWarning
CompleteError

Intent​

Names such as isActive and hasAccess reveal boolean meaning at call sites.

Flags​

Boolean parameters whose names do not match the configured prefixes. Default prefixes: is, has.

See it fail​

- in: query
name: active
schema: { type: boolean }

Fix it​

- in: query
name: isActive
schema: { type: boolean }

Options​

Replace defaults with options: { prefixes: [is, has, can] } in the rule override.

Nearby: query-parameter-camel-case, parameter-description.