diff --git a/.eslintrc.yml b/.eslintrc.yml index 59e55278..42db6e35 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -42,3 +42,4 @@ rules: import/imports-first: off jsx-a11y/no-static-element-interactions: off jsx-a11y/anchor-has-content: off + import/extensions: off diff --git a/src/Modal/Prompt.js b/src/Modal/Prompt.js index 330de516..a99f6555 100644 --- a/src/Modal/Prompt.js +++ b/src/Modal/Prompt.js @@ -22,7 +22,7 @@ export default class Prompt extends Component {

{ + ref={(node) => { if (node) { this.input = node } diff --git a/src/Select/Option.js b/src/Select/Option.js index 3b57647a..40091c2b 100644 --- a/src/Select/Option.js +++ b/src/Select/Option.js @@ -1,3 +1,6 @@ +/* eslint-disable */ +// temporary disable linting in this file + import cx from 'classnames' import { Component, PropTypes } from 'react' @@ -23,7 +26,7 @@ export default class Option extends Component { } } - handleBlockEvent = event => { + handleBlockEvent = (event) => { event.preventDefault() event.stopPropagation() } diff --git a/src/Select/Value.js b/src/Select/Value.js index bd9c9a38..e36f652c 100644 --- a/src/Select/Value.js +++ b/src/Select/Value.js @@ -1,3 +1,6 @@ +/* eslint-disable */ +// temporary disable linting in this file + import cx from 'classnames' import { Component, PropTypes } from 'react' @@ -12,13 +15,13 @@ export default class Value extends Component { onRemove: PropTypes.func, // method to handle removal of the value } - handleRemove = event => { + handleRemove = (event) => { event.preventDefault() event.stopPropagation() this.props.onRemove(this.props.value) } - handleMouseDown = event => { + handleMouseDown = (event) => { if (event.type === 'mousedown' && event.button !== 0) { return } @@ -32,7 +35,7 @@ export default class Value extends Component { } } - handleTouchEndRemove = event => { + handleTouchEndRemove = (event) => { // Check if the view is being dragged, In this case // we don't want to fire the click event (because the user only wants to scroll) if (this.dragging) return diff --git a/src/Select/index.js b/src/Select/index.js index 2d184508..19d46994 100644 --- a/src/Select/index.js +++ b/src/Select/index.js @@ -1,3 +1,6 @@ +/* eslint-disable */ +// temporary disable linting in this file + import cx from 'classnames' import Input from 'react-input-autosize' import { Component, PropTypes } from 'react' @@ -517,7 +520,7 @@ export default class Select extends Component { handleRemove = (value) => { const valueArray = this.getValueArray(this.props.value) - this.setValue(valueArray.filter(i => { + this.setValue(valueArray.filter((i) => { if (i.create) { return ( i[this.props.valueKey] !== value[this.props.valueKey] && @@ -529,7 +532,7 @@ export default class Select extends Component { this.focus() } - handleClearValue = event => { + handleClearValue = (event) => { // if the event was triggered by a mousedown and not the primary // button, ignore it. if (event && event.type === 'mousedown' && event.button !== 0) { @@ -656,7 +659,7 @@ export default class Select extends Component { getOptionLabel = op => op[this.props.labelKey] - getValueArray = value => { + getValueArray = (value) => { if (this.props.multi) { let valueArray = value if (typeof valueArray === 'string') valueArray = valueArray.split(this.props.delimiter) @@ -670,7 +673,7 @@ export default class Select extends Component { return expandedValue ? [expandedValue] : [] } - setValue = newValue => { + setValue = (newValue) => { let value = newValue if (this.props.autoBlur) { this.blurInput() @@ -702,7 +705,7 @@ export default class Select extends Component { filterValue = filterValue.toLowerCase() } const skipOptions = excludeOptions ? excludeOptions.map(i => i[this.props.valueKey]) : false - filteredOptions = options.filter(option => { + filteredOptions = options.filter((option) => { if (skipOptions && skipOptions.indexOf(option[this.props.valueKey]) > -1) return false if (this.props.filterOption) return this.props.filterOption.call(this, option, filterValue) if (!filterValue) return true @@ -732,7 +735,7 @@ export default class Select extends Component { if (this.props.allowCreate && filterValue) { let addNewOption = true // @TODO: only add the "Add" option if none of the options are an exact match - filteredOptions.forEach(option => { + filteredOptions.forEach((option) => { if ( String(option.label).toLowerCase() === filterValue || String(option.value).toLowerCase() === filterValue @@ -929,7 +932,7 @@ export default class Select extends Component { } const isSelected = valueArray && valueArray.indexOf(option) > -1 const isFocused = option === focusedOption - const optionRef = isFocused ? node => { + const optionRef = isFocused ? (node) => { if (node) { this.focusedNode = node } @@ -1029,7 +1032,7 @@ export default class Select extends Component { return (

{ + ref={(node) => { if (node) { this.menuContainer = node } @@ -1038,7 +1041,7 @@ export default class Select extends Component {