mirror of
https://github.com/ascribe/onion.git
synced 2024-11-15 17:45:10 +01:00
Disable eslint check on specific proptype
This commit is contained in:
parent
01cea9ad3d
commit
2869cbc125
@ -17,7 +17,6 @@ let InputCheckbox = React.createClass({
|
|||||||
//
|
//
|
||||||
// Since this component even has checkbox in its name, it felt wrong to expose defaultValue
|
// Since this component even has checkbox in its name, it felt wrong to expose defaultValue
|
||||||
// as the default-setting prop to other developers, which is why we choose defaultChecked.
|
// as the default-setting prop to other developers, which is why we choose defaultChecked.
|
||||||
defaultValue: React.PropTypes.string,
|
|
||||||
defaultChecked: React.PropTypes.bool,
|
defaultChecked: React.PropTypes.bool,
|
||||||
children: React.PropTypes.oneOfType([
|
children: React.PropTypes.oneOfType([
|
||||||
React.PropTypes.arrayOf(React.PropTypes.element),
|
React.PropTypes.arrayOf(React.PropTypes.element),
|
||||||
@ -52,7 +51,7 @@ let InputCheckbox = React.createClass({
|
|||||||
|
|
||||||
// Developer's are used to define defaultValues for inputs via defaultValue, but since this is a
|
// Developer's are used to define defaultValues for inputs via defaultValue, but since this is a
|
||||||
// input of type checkbox we warn the dev to not do that.
|
// input of type checkbox we warn the dev to not do that.
|
||||||
if(this.props.defaultValue) {
|
if(this.props.defaultValue) { //eslint-disable-line react/prop-types
|
||||||
console.warn('InputCheckbox is of type checkbox. Therefore its value is represented by checked and defaultChecked. defaultValue will do nothing!');
|
console.warn('InputCheckbox is of type checkbox. Therefore its value is represented by checked and defaultChecked. defaultValue will do nothing!');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user