Enforces that all mapStateToProps parameters have specific names. (teactn/mapStateToProps-prefer-parameters-names)
teactn mapStateToProps function has 2 optional arguments:
- global
- ownProps
This rule enforces that all of the provided parameters should follow the above naming conventions.
The following pattern is considered incorrect:
const mapStateToProps = (anyOtherName) => {}
withGlobal(function(anyOtherName) {}, null)(App)
The following patterns are considered correct:
const mapStateToProps = (global, ownProps) => {}
const mapStateToProps = (global) => {}
const mapStateToProps = ({isActive}) => {isActive}
withGlobal((global) => global, null)(App)