[sort comp] error when defining static async before lifecycle methods
See original GitHub issuewe are using eslint-plugin-react
in a next.js project.
common pattern is:
class Comp extends React.Component {
static async getInitialProps() {
...
}
componentDidMount() {
...
}
}
since last update 7.9.1
you get a sort-comp error complaining that the static method should be placed after componentDidMount. Was that intended? Looks like a bug to me.
this is maybe related to #1808
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:11 (4 by maintainers)
Top Results From Across the Web
[sort comp] error when defining static async before lifecycle ...
we are using eslint-plugin-react in a next.js project. common pattern is: class Comp extends React.Component { static async getInitialProps() { ...
Read more >reactjs - How to fix warning caused by Flow Function Types ...
But I'm unable to fix the warning. I want the Function Types before constructor the same as the other Type Definition. How can...
Read more >ASP.NET Core Razor component lifecycle | Microsoft Learn
The Razor component processes Razor component lifecycle events in a set of synchronous and asynchronous lifecycle methods.
Read more >Spring Data for Apache Cassandra - Reference Documentation
You can apply static ordering by appending an OrderBy clause to the query method that references a property and by providing a sorting...
Read more >48 answers on StackOverflow to the most popular Angular ...
ngOnInit is a lifecycle hook called by Angular2 to indicate that Angular is done creating the component. We have to import OnInit in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The airbnb config doesn’t allow async functions.
I could not reproduce the bug with the default configuration.
@maerzhase Can you share your rule configuration ?