From ac50db52a9e86bfef9a47fbea3feb7fe78947566 Mon Sep 17 00:00:00 2001 From: Chi Kei Chan Date: Mon, 2 Oct 2017 11:08:34 -0700 Subject: Fix linter --- ui/app/components/account-dropdowns.js | 5 +++++ ui/app/components/dropdown.js | 4 ++++ ui/app/components/editable-label.js | 1 + ui/app/components/identicon.js | 2 ++ ui/app/components/menu-droppo.js | 2 ++ ui/app/components/notice.js | 2 ++ 6 files changed, 16 insertions(+) (limited to 'ui/app/components') diff --git a/ui/app/components/account-dropdowns.js b/ui/app/components/account-dropdowns.js index 1b46e532a..6abdd4757 100644 --- a/ui/app/components/account-dropdowns.js +++ b/ui/app/components/account-dropdowns.js @@ -297,6 +297,11 @@ AccountDropdowns.propTypes = { identities: PropTypes.objectOf(PropTypes.object), selected: PropTypes.string, keyrings: PropTypes.array, + actions: PropTypes.objectOf(PropTypes.func), + network: PropTypes.string, + style: PropTypes.object, + enableAccountOptions: PropTypes.bool, + enableAccountsSelector: PropTypes.bool, } const mapDispatchToProps = (dispatch) => { diff --git a/ui/app/components/dropdown.js b/ui/app/components/dropdown.js index 73710acc2..cdd864cc3 100644 --- a/ui/app/components/dropdown.js +++ b/ui/app/components/dropdown.js @@ -52,6 +52,9 @@ Dropdown.propTypes = { onClick: PropTypes.func.isRequired, children: PropTypes.node, style: PropTypes.object.isRequired, + onClickOutside: PropTypes.func, + innerStyle: PropTypes.object, + useCssTransition: PropTypes.bool, } class DropdownMenuItem extends Component { @@ -86,6 +89,7 @@ DropdownMenuItem.propTypes = { closeMenu: PropTypes.func.isRequired, onClick: PropTypes.func.isRequired, children: PropTypes.node, + style: PropTypes.object, } module.exports = { diff --git a/ui/app/components/editable-label.js b/ui/app/components/editable-label.js index 167be7eaf..8a5c8954f 100644 --- a/ui/app/components/editable-label.js +++ b/ui/app/components/editable-label.js @@ -48,6 +48,7 @@ EditableLabel.prototype.saveIfEnter = function (event) { } EditableLabel.prototype.saveText = function () { + // eslint-disable-next-line react/no-find-dom-node var container = findDOMNode(this) var text = container.querySelector('.editable-label input').value var truncatedText = text.substring(0, 20) diff --git a/ui/app/components/identicon.js b/ui/app/components/identicon.js index c754bc6ba..bb476ca7b 100644 --- a/ui/app/components/identicon.js +++ b/ui/app/components/identicon.js @@ -41,6 +41,7 @@ IdenticonComponent.prototype.componentDidMount = function () { if (!address) return + // eslint-disable-next-line react/no-find-dom-node var container = findDOMNode(this) var diameter = props.diameter || this.defaultDiameter @@ -56,6 +57,7 @@ IdenticonComponent.prototype.componentDidUpdate = function () { if (!address) return + // eslint-disable-next-line react/no-find-dom-node var container = findDOMNode(this) var children = container.children diff --git a/ui/app/components/menu-droppo.js b/ui/app/components/menu-droppo.js index 66ab18954..a4e498c6b 100644 --- a/ui/app/components/menu-droppo.js +++ b/ui/app/components/menu-droppo.js @@ -95,6 +95,7 @@ MenuDroppoComponent.prototype.componentDidMount = function () { if (this && document.body) { this.globalClickHandler = this.globalClickOccurred.bind(this) document.body.addEventListener('click', this.globalClickHandler) + // eslint-disable-next-line react/no-find-dom-node var container = findDOMNode(this) this.container = container } @@ -108,6 +109,7 @@ MenuDroppoComponent.prototype.componentWillUnmount = function () { MenuDroppoComponent.prototype.globalClickOccurred = function (event) { const target = event.target + // eslint-disable-next-line react/no-find-dom-node const container = findDOMNode(this) if (target !== container && diff --git a/ui/app/components/notice.js b/ui/app/components/notice.js index c26505193..09d461c7b 100644 --- a/ui/app/components/notice.js +++ b/ui/app/components/notice.js @@ -117,6 +117,7 @@ Notice.prototype.render = function () { } Notice.prototype.componentDidMount = function () { + // eslint-disable-next-line react/no-find-dom-node var node = findDOMNode(this) linker.setupListener(node) if (document.getElementsByClassName('notice-box')[0].clientHeight < 310) { @@ -125,6 +126,7 @@ Notice.prototype.componentDidMount = function () { } Notice.prototype.componentWillUnmount = function () { + // eslint-disable-next-line react/no-find-dom-node var node = findDOMNode(this) linker.teardownListener(node) } -- cgit