Releases: LaunchPadLab/eslint-config
Releases · LaunchPadLab/eslint-config
v3.0.1
v3.0.0
v2.7.0
Added the skipUndeclared
option to react/prop-types
. This makes it so that the props associated with additional helper components declared in the same file of the parent component do not get flagged by eslint
.
import PropTypes from 'prop-types'
const propTypes = {
school: PropTypes.object.isRequired,
}
// name will not be flagged by eslint
function Row ({ name }) {
return <tr><td>name</td></tr>
}
// school will be flagged by eslint if not declared
function Table ({ school }) {
return (
<table>
<thead>
<tr>Name</tr>
</thead>
<Row name={school.displayName} />
</table>
)
}
Table.propTypes = propTypes // this is the "declaration"