Upgrade Prettier to 2.0.4. Reformatted all JS files

This commit is contained in:
Deluan
2020-04-20 09:09:29 -04:00
parent de115ff466
commit b3f70538a9
55 changed files with 318 additions and 286 deletions
+2 -2
View File
@@ -8,11 +8,11 @@ const BitrateField = ({ record = {}, source }) => {
BitrateField.propTypes = {
label: PropTypes.string,
record: PropTypes.object,
source: PropTypes.string.isRequired
source: PropTypes.string.isRequired,
}
BitrateField.defaultProps = {
addLabel: true
addLabel: true,
}
export default BitrateField
+2 -2
View File
@@ -15,11 +15,11 @@ const format = (d) => {
DurationField.propTypes = {
label: PropTypes.string,
record: PropTypes.object,
source: PropTypes.string.isRequired
source: PropTypes.string.isRequired,
}
DurationField.defaultProps = {
addLabel: true
addLabel: true,
}
export default DurationField
+1 -1
View File
@@ -25,6 +25,6 @@ const PlayButton = ({ icon = defaultIcon, action, ...rest }) => {
PlayButton.propTypes = {
icon: PropTypes.element,
action: PropTypes.object
action: PropTypes.object,
}
export default PlayButton
+2 -2
View File
@@ -22,11 +22,11 @@ const RangeField = ({ record = {}, source }) => {
RangeField.propTypes = {
label: PropTypes.string,
record: PropTypes.object,
source: PropTypes.string.isRequired
source: PropTypes.string.isRequired,
}
RangeField.defaultProps = {
addLabel: true
addLabel: true,
}
export { formatRange }
+6 -6
View File
@@ -15,9 +15,9 @@ const useStyles = makeStyles(
{
link: {
textDecoration: 'none',
color: 'inherit'
color: 'inherit',
},
tertiary: { float: 'right', opacity: 0.541176 }
tertiary: { float: 'right', opacity: 0.541176 },
},
{ name: 'RaSimpleList' }
)
@@ -28,7 +28,7 @@ const LinkOrNot = ({
basePath,
id,
record,
children
children,
}) => {
const classes = useStyles({ classes: classesOverride })
return linkType === 'edit' || linkType === true ? (
@@ -129,7 +129,7 @@ SimpleList.propTypes = {
linkType: PropTypes.oneOfType([
PropTypes.string,
PropTypes.bool,
PropTypes.func
PropTypes.func,
]).isRequired,
onToggleItem: PropTypes.func,
primaryText: PropTypes.func,
@@ -137,13 +137,13 @@ SimpleList.propTypes = {
rightIcon: PropTypes.func,
secondaryText: PropTypes.func,
selectedIds: PropTypes.arrayOf(PropTypes.any).isRequired,
tertiaryText: PropTypes.func
tertiaryText: PropTypes.func,
}
SimpleList.defaultProps = {
linkType: 'edit',
hasBulkActions: false,
selectedIds: []
selectedIds: [],
}
export default SimpleList
+2 -2
View File
@@ -20,11 +20,11 @@ function formatBytes(bytes, decimals = 2) {
SizeField.propTypes = {
label: PropTypes.string,
record: PropTypes.object,
source: PropTypes.string.isRequired
source: PropTypes.string.isRequired,
}
SizeField.defaultProps = {
addLabel: true
addLabel: true,
}
export default SizeField
+2 -2
View File
@@ -20,7 +20,7 @@ const SongDetails = (props) => {
bitRate: <BitrateField record={record} source="bitRate" />,
size: <SizeField record={record} source="size" />,
updatedAt: <DateField record={record} source="updatedAt" showTime />,
playCount: <TextField record={record} source="playCount" />
playCount: <TextField record={record} source="playCount" />,
}
if (record.playCount > 0) {
data.playDate = <DateField record={record} source="playDate" showTime />
@@ -34,7 +34,7 @@ const SongDetails = (props) => {
<TableRow key={record.id}>
<TableCell component="th" scope="row">
{translate(`resources.song.fields.${key}`, {
_: inflection.humanize(inflection.underscore(key))
_: inflection.humanize(inflection.underscore(key)),
})}
:
</TableCell>
+1 -1
View File
@@ -18,5 +18,5 @@ export {
SimpleList,
RangeField,
SongDetails,
formatRange
formatRange,
}