question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"sort-comp" Flow property definitions

See original GitHub issue

I was wondering if it was possible to have property definitions at the top when using this rule, cause if I write something like this:

class Something extends Component {

  state: Object;

  constructor(props: Object) {
...

it complains that constructor must be placed before state

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:11
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

7reactions
TSMMarkcommented, Oct 22, 2017

For the record, you can now use the "type-annotations" group to determine where you would like to place your type annotations. https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-comp.md#rule-options

type-annotations. This group is not specified by default, but can be used to enforce flow annotations to be at the top.

0reactions
dozoischcommented, Jul 12, 2016

If people that use flow can use my branch and tell me if it works properly for them, that would be cool! It’s based on 6.0.0-alpha.1

"eslint-plugin-react": "https://github.com/dozoisch/eslint-plugin-react#typeannotations",

Read more comments on GitHub >

github_iconTop Results From Across the Web

reactjs - How to fix warning caused by Flow Function Types ...
The problem is that eslint-plugin-react is not aware of Flow, so there is no group for "type definitions". You can make eslint let...
Read more >
Flow property (SysML item) - PTC Support
A Flow Property signifies a single flow element to or from a Block. Create a Flow Property through a Modeler explorer pane or...
Read more >
Custom event and flow properties - IBM
You can use custom properties to extract that data from the event or flow payload, and then use the non-normalized data in custom...
Read more >
compcams
COMP Cams (R) has never forgotten that performance is defined by ... With the House of Kolors and metal flake, she is a...
Read more >
Flow Property - No Magic Documentation
A Flow Property signifies a single flow element to/from a block with a direction prefix (in, out, inout). Flow properties are listed in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found