Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Super call missing arguments in some rule docs #1294

Merged
merged 5 commits into from Sep 20, 2021

Conversation

StephanH90
Copy link
Contributor

You should call super with ...arguments otherwise bad things happen.

You should call `super` with `...arguments` otherwise bad things happen.
@bmish bmish changed the title Doc: Call super with ...arguments in "Update classic-decorator-hooks.md" Call super in constructor in classic-decorator-hooks rule doc Sep 7, 2021
@bmish bmish changed the title Call super in constructor in classic-decorator-hooks rule doc Super call should include arguments in classic-decorator-hooks rule doc Sep 7, 2021
fix: add `...args` to the constructor as param.
Copy link
Contributor Author

@StephanH90 StephanH90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx for the feedback, I just made another commit to fix this.

@bmish
Copy link
Member

bmish commented Sep 8, 2021

Shouldn't we also fix no-component-lifecycle-hooks.md in this same PR?

but I'm new to Ember and I'm not sure if this is correct:
```javascript
export default class MyComponent extends Component {
  init(...args) {
    this._super(args);
  }
  willDestroy() {} // Both a classic and Glimmer component lifecycle hook
}
```
docs/rules/no-component-lifecycle-hooks.md Outdated Show resolved Hide resolved
docs/rules/no-component-lifecycle-hooks.md Outdated Show resolved Hide resolved
StephanH90 and others added 2 commits September 10, 2021 13:02
Co-authored-by: Bryan Mishkin <698306+bmish@users.noreply.github.com>
Co-authored-by: Bryan Mishkin <698306+bmish@users.noreply.github.com>
@bmish bmish changed the title Super call should include arguments in classic-decorator-hooks rule doc Super call missing arguments in some rule docs Sep 10, 2021
Copy link
Member

@bmish bmish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@bmish bmish merged commit 0d991e9 into ember-cli:master Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants