- versions used (SonarQube, Scanner, Plugin, and any relevant extension): cloud
- error observed:
export default class Vimeo extends React.Component<Props> {
constructor(p: Props) {
super(p)
this.player = null
}
private player: Player | null
componentWillUnmount() {
this.player?.destroy()
// => Expected an assignment or function call and instead saw an expression. Bug, Major, 10min effort
}
// etc...
}
- steps to reproduce: above code
I think your linter doesn’t support “optional chaining” https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#optional-chaining