Skip to content

Commit

Permalink
Updated lint rule and made fixes
Browse files Browse the repository at this point in the history
Long live `comma-dangle`!
  • Loading branch information
funwithtriangles committed Oct 18, 2018
1 parent e255b8b commit 43cf106
Show file tree
Hide file tree
Showing 203 changed files with 1,522 additions and 1,521 deletions.
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"jsx-quotes" : [2, "prefer-single"],
"max-len" : [2, 120, 2],
"object-curly-spacing" : [2, "always"],
"no-var" : 2
"no-var" : 2,
"comma-dangle" : [2, "always-multiline"]
}
}
10 changes: 5 additions & 5 deletions config/webpack.custom.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ const config = {
rules: [
{
test: /\.icon\.txt$/,
use: 'svg-inline-loader?classPrefix'
}
]
}
use: 'svg-inline-loader?classPrefix',
},
],
},
}

if (process.env.NODE_ENV === 'development') {
Expand All @@ -22,7 +22,7 @@ if (process.env.NODE_ENV === 'development') {
if (sketchesPath) {
devServerOptions = {
contentBase: sketchesPath,
watchContentBase: true
watchContentBase: true,
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/AddSketch/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ AddSketch.propTypes = {
items: PropTypes.arrayOf(
PropTypes.shape({
title: PropTypes.string,
id: PropTypes.string
id: PropTypes.string,
})
).isRequired
).isRequired,
}

export default AddSketch
2 changes: 1 addition & 1 deletion src/components/App/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,5 @@ App.propTypes = {
stats: PropTypes.object.isRequired,
leftWidth: PropTypes.number.isRequired,
onLeftDrag: PropTypes.func.isRequired,
onWrapperClick: PropTypes.func.isRequired
onWrapperClick: PropTypes.func.isRequired,
}
4 changes: 2 additions & 2 deletions src/components/AudioAnalyzer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,12 @@ class AudioAnalyzer extends React.Component {
}

AudioAnalyzer.contextTypes = {
store: PropTypes.object.isRequired
store: PropTypes.object.isRequired,
}
AudioAnalyzer.propTypes = {
isOpen: PropTypes.bool,
onAnalyzerClick: PropTypes.func.isRequired,
onWrapperClick: PropTypes.func.isRequired
onWrapperClick: PropTypes.func.isRequired,
}

export default AudioAnalyzer
2 changes: 1 addition & 1 deletion src/components/BankSelect/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const BankSelect = ({ deviceId }) => (
)

BankSelect.propTypes = {
deviceId: PropTypes.string.isRequired
deviceId: PropTypes.string.isRequired,
}

export default BankSelect
2 changes: 1 addition & 1 deletion src/components/BankSelectItem/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const BankSelectItem = ({ index, onClick, isActive }) => (
BankSelectItem.propTypes = {
index: PropTypes.number.isRequired,
onClick: PropTypes.func.isRequired,
isActive: PropTypes.bool
isActive: PropTypes.bool,
}

export default BankSelectItem
6 changes: 3 additions & 3 deletions src/components/Button/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import { Link as RouterLink } from 'react-router-dom'

const sizes = {
large: '1.5rem',
small: '0.7rem'
small: '0.7rem',
}

const colors = {
channelA: theme.channelAColor,
channelB: theme.channelBColor,
danger: theme.dangerColor
danger: theme.dangerColor,
}

const Inner = styled.span`
Expand Down Expand Up @@ -81,7 +81,7 @@ const Button = ({ onClick, ...props }) =>
Button.propTypes = {
to: PropTypes.string,
children: PropTypes.node.isRequired,
onClick: PropTypes.func
onClick: PropTypes.func,
}

export default Button
2 changes: 1 addition & 1 deletion src/components/Clock/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Clock.propTypes = {
phrase: PropTypes.number.isRequired,
bpm: PropTypes.number,
onResetClick: PropTypes.func.isRequired,
onTapTempoClick: PropTypes.func.isRequired
onTapTempoClick: PropTypes.func.isRequired,
}

export default Clock
2 changes: 1 addition & 1 deletion src/components/Control/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const Control = ({ nodeId, type }) => {

Control.propTypes = {
nodeId: PropTypes.string.isRequired,
type: PropTypes.string.isRequired
type: PropTypes.string.isRequired,
}

export default Control
2 changes: 1 addition & 1 deletion src/components/Crossfader/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Crossfader.propTypes = {
titleA: PropTypes.string,
titleB: PropTypes.string,
onClickA: PropTypes.func.isRequired,
onClickB: PropTypes.func.isRequired
onClickB: PropTypes.func.isRequired,
}

export default Crossfader
2 changes: 1 addition & 1 deletion src/components/CurrentScene/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const CurrentScene = ({ match }) => (
)

CurrentScene.propTypes = {
match: PropTypes.object.isRequired
match: PropTypes.object.isRequired,
}

export default CurrentScene
2 changes: 1 addition & 1 deletion src/components/CurrentSketch/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const CurrentSketch = (props) =>
</div>

CurrentSketch.propTypes = {
isSketch: PropTypes.bool
isSketch: PropTypes.bool,
}

export default CurrentSketch
4 changes: 2 additions & 2 deletions src/components/Devices/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ Devices.propTypes = {
items: PropTypes.arrayOf(PropTypes.shape({
title: PropTypes.string.isRequired,
id: PropTypes.string.isRequired,
manufacturer: PropTypes.string.isRequired
}))
manufacturer: PropTypes.string.isRequired,
})),
}

export default Devices
4 changes: 2 additions & 2 deletions src/components/EditingOverlay/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ EditingOverlay.propTypes = {
title: PropTypes.string,
id: PropTypes.oneOfType([
PropTypes.string,
PropTypes.bool
PropTypes.bool,
]),
type: PropTypes.string
type: PropTypes.string,
}

export default EditingOverlay
2 changes: 1 addition & 1 deletion src/components/EditingOverlayForm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class EditingOverlayForm extends React.Component {
}

EditingOverlayForm.propTypes = {
handleSubmit: PropTypes.func.isRequired
handleSubmit: PropTypes.func.isRequired,
}

export default EditingOverlayForm
2 changes: 1 addition & 1 deletion src/components/ErrorOverlay/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ ErrorOverlay.propTypes = {
onCancelClick: PropTypes.func,
code: PropTypes.string,
message: PropTypes.string,
onChooseSketchFolderClick: PropTypes.func.isRequired
onChooseSketchFolderClick: PropTypes.func.isRequired,
}

export default ErrorOverlay
2 changes: 1 addition & 1 deletion src/components/Home/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const Home = ({ onChooseFolderClick, onLoadClick }) =>

Home.propTypes = {
onChooseFolderClick: PropTypes.func.isRequired,
onLoadClick: PropTypes.func.isRequired
onLoadClick: PropTypes.func.isRequired,
}

export default Home
2 changes: 1 addition & 1 deletion src/components/Icon/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const Icon = (props) => {
)
}
Icon.propTypes = {
glyph: PropTypes.string.isRequired
glyph: PropTypes.string.isRequired,
}

export default Icon
2 changes: 1 addition & 1 deletion src/components/Input/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Input.propTypes = {
label: PropTypes.string,
type: PropTypes.string,
id: PropTypes.string,
name: PropTypes.string.isRequired
name: PropTypes.string.isRequired,
}

export default Input
2 changes: 1 addition & 1 deletion src/components/InputLink/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ InputLink.propTypes = {
id: PropTypes.string.isRequired,
sequencerGridId: PropTypes.string,
toggleActionId: PropTypes.string.isRequired,
isActivateVisible: PropTypes.bool
isActivateVisible: PropTypes.bool,
}

export default InputLink
2 changes: 1 addition & 1 deletion src/components/InputLinkMidiControl/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const InputLinkMidiControl = ({ onAssignClick, inputLinkIds }) => (

InputLinkMidiControl.propTypes = {
onAssignClick: PropTypes.func.isRequired,
inputLinkIds: PropTypes.array.isRequired
inputLinkIds: PropTypes.array.isRequired,
}

export default InputLinkMidiControl
2 changes: 1 addition & 1 deletion src/components/InputLinkTags/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const InputLinkTags = ({ ids }) => (
)

InputLinkTags.propTypes = {
ids: PropTypes.arrayOf(PropTypes.string)
ids: PropTypes.arrayOf(PropTypes.string),
}

export default InputLinkTags
4 changes: 2 additions & 2 deletions src/components/InputLinkUI/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ InputLinkUI.propTypes = {
).isRequired,
toggledActive: PropTypes.arrayOf(
PropTypes.string
).isRequired
).isRequired,
}).isRequired,
nodeId: PropTypes.string.isRequired,
currentInputLinkId: PropTypes.string
currentInputLinkId: PropTypes.string,
}

export default InputLinkUI
2 changes: 1 addition & 1 deletion src/components/InputSelect/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ InputSelect.propTypes = {
onInputChange: PropTypes.func.isRequired,
options: PropTypes.arrayOf(
PropTypes.object
).isRequired
).isRequired,
}

export default InputSelect
2 changes: 1 addition & 1 deletion src/components/Item/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const Item = ({ children }) => (
)

Item.propTypes = {
children: PropTypes.node
children: PropTypes.node,
}

export default Item
2 changes: 1 addition & 1 deletion src/components/Items/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const Items = ({ children, direction }) => (

Items.propTypes = {
children: PropTypes.node,
direction: PropTypes.string
direction: PropTypes.string,
}

export default Items
4 changes: 2 additions & 2 deletions src/components/MacroItem/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const Button = styled(ButtonComponent)`
const MacroItem = ({
nodeId, onLearningClick, onDeleteClick, paramLinks, inputLinkIds, isLearning,
macroId, inputSettingsAreVisible, paramLinksAreVisible, isOpen, title, onOpenClick, numInputs,
inputLinkTitle, onRenameClick
inputLinkTitle, onRenameClick,
}) => (
<div>
<Param
Expand Down Expand Up @@ -92,7 +92,7 @@ MacroItem.propTypes = {
onOpenClick: PropTypes.func.isRequired,
numInputs: PropTypes.number.isRequired,
inputLinkTitle: PropTypes.string,
onRenameClick: PropTypes.func.isRequired
onRenameClick: PropTypes.func.isRequired,
}

export default MacroItem
2 changes: 1 addition & 1 deletion src/components/MacroLink/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const MacroLink = (
MacroLink.propTypes = {
title: PropTypes.string.isRequired,
nodeId: PropTypes.string.isRequired,
onDeleteClick: PropTypes.func.isRequired
onDeleteClick: PropTypes.func.isRequired,
}

export default MacroLink
4 changes: 2 additions & 2 deletions src/components/Macros/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ Macros.propTypes = {
items: PropTypes.arrayOf(
PropTypes.shape({
id: PropTypes.string,
title: PropTypes.string
title: PropTypes.string,
})
)
),
}

export default Macros
2 changes: 1 addition & 1 deletion src/components/MainViewOuter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@ MainViewOuter.propTypes = {
notificationText: PropTypes.string,
notificationButtonText: PropTypes.string,
onNotificationButtonClick: PropTypes.func,
isActive: PropTypes.bool
isActive: PropTypes.bool,
}
2 changes: 1 addition & 1 deletion src/components/MidiButton/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const MidiButton = ({ onClick }) => (
)

MidiButton.propTypes = {
onClick: PropTypes.func.isRequired
onClick: PropTypes.func.isRequired,
}

export default MidiButton
2 changes: 1 addition & 1 deletion src/components/MidiLearn/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ export default MidiLearn

MidiLearn.propTypes = {
isVisible: PropTypes.bool,
onCancelClick: PropTypes.func.isRequired
onCancelClick: PropTypes.func.isRequired,
}
2 changes: 1 addition & 1 deletion src/components/Modifier/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const Modifier = (
Modifier.propTypes = {
title: PropTypes.string.isRequired,
nodeId: PropTypes.string.isRequired,
onAssignClick: PropTypes.func.isRequired
onAssignClick: PropTypes.func.isRequired,
}

export default Modifier
2 changes: 1 addition & 1 deletion src/components/NavItem/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const NavItem = (props) => {
}

NavItem.propTypes = {
to: PropTypes.string
to: PropTypes.string,
}

export default NavItem
4 changes: 2 additions & 2 deletions src/components/NodeInputInfo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'
import InputLinkTags from '../InputLinkTags'

const NodeInputInfo = ({
inputLinkIds, isLearningMidi
inputLinkIds, isLearningMidi,
}) => (
<div>
{isLearningMidi
Expand All @@ -17,7 +17,7 @@ NodeInputInfo.propTypes = {
inputLinkIds: PropTypes.arrayOf(
PropTypes.string
),
isLearningMidi: PropTypes.bool
isLearningMidi: PropTypes.bool,
}

export default NodeInputInfo
2 changes: 1 addition & 1 deletion src/components/NodeTabItem/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ NodeTabItem.propTypes = {
title: PropTypes.string.isRequired,
isSelected: PropTypes.bool,
isActive: PropTypes.bool,
onClick: PropTypes.func.isRequired
onClick: PropTypes.func.isRequired,
}

export default NodeTabItem
Loading

0 comments on commit 43cf106

Please sign in to comment.