Add lint rule to protect against this access on unbound methods (#32578)
* Add Actions to ViewModel utility types and specify `this: void` signature Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Add https://typescript-eslint.io/rules/unbound-method/ linter to shared-components also fix stray lint config which doesn't apply to SC Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Add https://typescript-eslint.io/rules/unbound-method/ linter to element-web Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix genuine issues identified by the linter Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Specify this:void on i18napi Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update Module API Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Add comment for MapToVoidThis Added utility type to map VM actions to unbound functions. --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -20,7 +20,7 @@ import { MatrixClientPeg } from "../../../MatrixClientPeg";
|
||||
*/
|
||||
interface IProps {
|
||||
roomId: string;
|
||||
onFinished(): void;
|
||||
onFinished(this: void): void;
|
||||
}
|
||||
|
||||
const SlashCommandHelpDialog: React.FC<IProps> = ({ roomId, onFinished }) => {
|
||||
|
||||
Reference in New Issue
Block a user