static-property-placement
UnreleasedConfiguration
rslint.config.ts
Enforce where React component static properties are declared in an ES6 class.
The rule checks childContextTypes, contextTypes, contextType,
defaultProps (including legacy getDefaultProps), displayName, and
propTypes. The default placement is static public field.
Options
The first option selects the default placement:
static public field—static propTypes = {...}static getter—static get propTypes() {...}property assignment—MyComponent.propTypes = {...}outside the class
The second option is an object that overrides the placement for individual properties. Unspecified properties use the first option.