Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 631 Bytes

withGlobal-prefer-named-arguments.md

File metadata and controls

29 lines (20 loc) · 631 Bytes

Enforces that all withGlobal arguments have recommended names. (teactn/withGlobal-prefer-named-arguments)

teactn withGlobal function has 2 optional arguments:

  • mapStateToProps
  • mapReducersToProps

This rule enforces that all of the provided parameters should follow the above naming conventions.

Rule details

The following patterns are considered incorrect:

withGlobal(mapStateToProps, actionCreators)(TodoApp)
withGlobal(global => global)(TodoApp)

The following patterns are considered correct:

withGlobal(mapStateToProps, mapReducersToProps)(TodoApp)
withGlobal()(TodoApp)