- Language: TypeScript
- Rule: typescript:S7739 “Do not add
thento an object” - Product: SonarQube Cloud
- Why it is a false positive: Promise resolution only treats an object as thenable when its
thenproperty is callable. A numeric value is never invoked. The issue is raised as a Bug with High reliability impact, which fails the default quality gate. In this project the keys mirror gherkin-lintindentationoption names, sothencannot be renamed.
Reproducer:
export const INDENTATION_DEFAULTS = { Feature: 0, given: 2, when: 2, then: 2 };
Expected: no issue. Actual: S7739 is raised on then.
Suggestion: only flag then when its value is a function or of unknown type.