Skip to content

Commit

Permalink
Merge pull request #1202 from AlexKVal/fix-eslint-warnings
Browse files Browse the repository at this point in the history
Fix eslint warnings
  • Loading branch information
taion committed Aug 23, 2015
2 parents c749703 + 7b233f2 commit 9dad63e
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"react/no-did-mount-set-state": 2,
"react/no-did-update-set-state": 2,
"react/no-multi-comp": 2,
"react/prop-types": [1, { "ignore": [ "children", "className" ] }],
"react/prop-types": [2, { "ignore": [ "children", "className", "style" ] }],
"react/react-in-jsx-scope": 2,
"react/self-closing-comp": 2,
"react/wrap-multilines": 2,
Expand Down
10 changes: 10 additions & 0 deletions src/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,11 @@ Dropdown.propTypes = {
CustomPropTypes.exclusiveRoles(MENU_ROLE)
]),

/**
* Whether or not component is disabled.
*/
disabled: React.PropTypes.bool,

/**
* Align the menu to the right side of the Dropdown toggle
*/
Expand All @@ -259,6 +264,11 @@ Dropdown.propTypes = {
*/
open: React.PropTypes.bool,

/**
* A callback fired when the Dropdown closes.
*/
onClose: React.PropTypes.func,

/**
* A callback fired when the Dropdown wishes to change visibility. Called with the requested
* `open` value.
Expand Down
1 change: 1 addition & 0 deletions src/MenuItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ MenuItem.propTypes = {
]),
header: React.PropTypes.bool,
href: React.PropTypes.string,
target: React.PropTypes.string,
title: React.PropTypes.string,
onKeyDown: React.PropTypes.func,
onSelect: React.PropTypes.func
Expand Down
3 changes: 1 addition & 2 deletions src/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,7 @@ const Modal = React.createClass({
this.iosClickHack();
}

this.setState(this._getStyles() //eslint-disable-line react/no-did-mount-set-state
, () => this.focusModalContent());
this.setState(this._getStyles(), () => this.focusModalContent());
},

onHide() {
Expand Down
4 changes: 2 additions & 2 deletions src/NavDropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ import Dropdown from './Dropdown';
class NavDropdown extends React.Component {

render() {
let { children, title, noCaret, bsStyle, ...props } = this.props;
let { children, title, noCaret, ...props } = this.props;

return (
<Dropdown {...props} componentClass='li'>
<Dropdown.Toggle
useAnchor
bsStyle={bsStyle}
disabled={props.disabled}
noCaret={noCaret}
>
Expand All @@ -25,6 +24,7 @@ class NavDropdown extends React.Component {
}

NavDropdown.propTypes = {
noCaret: React.PropTypes.bool,
title: React.PropTypes.node.isRequired,
...Dropdown.propTypes
};
Expand Down
9 changes: 8 additions & 1 deletion src/SplitButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ class SplitButton extends React.Component {

render() {
let {
children, title, onClick, target, href, bsStyle, ...props } = this.props;
children,
title,
onClick,
target,
href,
// bsStyle is validated by 'Button' component
bsStyle, // eslint-disable-line
...props } = this.props;

let { disabled } = props;

Expand Down
2 changes: 1 addition & 1 deletion src/Tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const Tabs = React.createClass({
let {
id,
className,
style, // eslint-disable-line react/prop-types
style,
position,
bsStyle,
tabWidth,
Expand Down
3 changes: 1 addition & 2 deletions src/Tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ const Tooltip = React.createClass({
const style = {
'left': this.props.positionLeft,
'top': this.props.positionTop,
// we don't want to expose the `style` property
...this.props.style // eslint-disable-line react/prop-types
...this.props.style
};

const arrowStyle = {
Expand Down

0 comments on commit 9dad63e

Please sign in to comment.