-
Notifications
You must be signed in to change notification settings - Fork 199
Fixed decorated methods declared after usage (#813) #852
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, LGTM. Thanks so much @soon!
thanks a lot :) I couldn't come around to do this, but this will definitely help with all my projects + a few others I know :) |
any idea when's the new release? |
@cyberhck good idea! I'll aim for releasing one this weekend. |
@cyberhck Could you please provide the code which causes the issue? |
export class HomePage extends React.Component {
public render(): JSX.Element {
return (
<div className={classNames.container}>
<h2>Register</h2>
<button onClick={this.handleClick}>Click to register</button>
</div>
);
}
@autobind
private async handleClick(): Promise<void> {
const sdk = Api.getInstance();
const response = await sdk.users.create({email: "[email protected]", password: "secret", username: "user"});
console.info("registered new user: ", response);
}
} And my tslint has this:
|
@cyberhck It seems like 6.1.1 does not include these changes. Quick check - download https://registry.npmjs.org/tslint-microsoft-contrib/-/tslint-microsoft-contrib-6.1.1.tgz (or find it in /cc @JoshuaKGoldberg |
ahh, okay, next release then :) thanks. |
@IllusionMH hey have you considered using semantic-release for releasing? 🙂 I was wondering if that'd fit this project :) |
@cyberhck we've discussed some improvements to release process (and using tools like semantic-release), however no concrete steps yet. Current release workflow is a bit cumbersome and will require effort to migrate (given my limited access to configurations and experience with mentioned tools). We think of possible improvements to the process again and hopefully come up with more concrete plan. Feel free to create new issue if you have proposals or info to share - would be glad to discuss them. UPD. I don't think that it will be fully automatic (on CI) as semantic-release supports, but still would make it easier to up version, compose release notes, update docs and publish package and will reduce likelihood of similar issues. |
And sorry for the inconvenience. P.S. More details on proposal for automation next week |
No worries, that's not much of inconvenience actually, being in FOSS world, PR is already merged, so sooner or later we're gonna get it, all we can do is improve the workflow.
I'm not sure if you saw, but I did create a new issue for this |
PR checklist
Overview of change:
This MR fixes a bug with
react-this-binding-issue
rule when the decorated method was declared after usage.