JB01 — Use ->> when comparing a JSONB value to text
Group: JSONB · Auto-fixable: yes
The -> operator returns jsonb, so comparing it to a text literal never
matches. Use ->> to extract the value as text for the comparison.
Example
Section titled “Example”bad: WHERE resource->'name' = 'Ann'good: WHERE resource->>'name' = 'Ann'Configure
Section titled “Configure”Disable this rule in banshee.toml:
[lint]exclude = ["JB01"]Or silence one line with -- noqa: JB01. See Linting.