eslint-plugin-flowtype icon indicating copy to clipboard operation
eslint-plugin-flowtype copied to clipboard

Destructored vars (const, let, var) do not need type

Open shall-git opened this issue 6 years ago • 0 comments

const {links, history} = this.props

Expected: No error.

Actual: ESlint: missing variable type annotation. (flowtype-/require-variable-type)

Maybe I'm missing something, but I can't figure out a valid configuration for this case

"flowtype/require-variable-type": [
  2,
  {
    "excludeVariableMatch": "^map", // mapStateToProps & mapDispatchToProps
    "excludeVariableTypes": {
      "let": false,
      "const": false
    }
  }
]

shall-git avatar Nov 15 '18 09:11 shall-git