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
+4 -4
View File
@@ -3,7 +3,7 @@ import {
AppBar as RAAppBar,
MenuItemLink,
UserMenu,
useTranslate
useTranslate,
} from 'react-admin'
import { makeStyles } from '@material-ui/core'
import InfoIcon from '@material-ui/icons/Info'
@@ -11,8 +11,8 @@ import config from '../config'
const useStyles = makeStyles((theme) => ({
menuItem: {
color: theme.palette.text.secondary
}
color: theme.palette.text.secondary,
},
}))
const VersionMenu = forwardRef((props, ref) => {
@@ -23,7 +23,7 @@ const VersionMenu = forwardRef((props, ref) => {
ref={ref}
to="#"
primaryText={translate('menu.version', {
version: config.version
version: config.version,
})}
leftIcon={<InfoIcon />}
className={classes.menuItem}
+1 -1
View File
@@ -7,7 +7,7 @@ import AppBar from './AppBar'
import themes from '../themes'
const useStyles = makeStyles({
root: { paddingBottom: (props) => (props.addPadding ? '80px' : 0) }
root: { paddingBottom: (props) => (props.addPadding ? '80px' : 0) },
})
export default (props) => {
+10 -10
View File
@@ -27,35 +27,35 @@ const useStyles = makeStyles((theme) => ({
background: `url(${config.loginBackgroundURL})`,
backgroundRepeat: 'no-repeat',
backgroundSize: 'cover',
backgroundPosition: 'center'
backgroundPosition: 'center',
},
card: {
minWidth: 300,
marginTop: '6em'
marginTop: '6em',
},
avatar: {
margin: '1em',
display: 'flex',
justifyContent: 'center'
justifyContent: 'center',
},
icon: {
backgroundColor: theme.palette.secondary.main
backgroundColor: theme.palette.secondary.main,
},
systemName: {
marginTop: '1em',
display: 'flex',
justifyContent: 'center',
color: 'blue' //theme.palette.grey[500]
color: 'blue', //theme.palette.grey[500]
},
form: {
padding: '0 1em 1em 1em'
padding: '0 1em 1em 1em',
},
input: {
marginTop: '1em'
marginTop: '1em',
},
actions: {
padding: '0 1em 1em 1em'
}
padding: '0 1em 1em 1em',
},
}))
const renderInput = ({
@@ -274,7 +274,7 @@ const Login = ({ location }) => {
Login.propTypes = {
authProvider: PropTypes.func,
previousRoute: PropTypes.string
previousRoute: PropTypes.string,
}
// We need to put the ThemeProvider decoration in another component
+3 -3
View File
@@ -17,9 +17,9 @@ const translatedResourceName = (resource, translate) =>
resource.options && resource.options.label
? translate(resource.options.label, {
smart_count: 2,
_: resource.options.label
_: resource.options.label,
})
: inflection.humanize(inflection.pluralize(resource.name))
: inflection.humanize(inflection.pluralize(resource.name)),
})
const Menu = ({ onMenuClick, dense, logout }) => {
@@ -31,7 +31,7 @@ const Menu = ({ onMenuClick, dense, logout }) => {
// TODO State is not persisted in mobile when you close the sidebar menu. Move to redux?
const [state, setState] = useState({
menuLibrary: true,
menuSettings: false
menuSettings: false,
})
const handleToggle = (menu) => {
+2 -2
View File
@@ -5,8 +5,8 @@ import TuneIcon from '@material-ui/icons/Tune'
const useStyles = makeStyles((theme) => ({
menuItem: {
color: theme.palette.text.secondary
}
color: theme.palette.text.secondary,
},
}))
const PersonalMenu = forwardRef(({ onClick, sidebarIsOpen, dense }, ref) => {
+4 -4
View File
@@ -14,12 +14,12 @@ const useStyles = makeStyles((theme) => ({
icon: { minWidth: theme.spacing(5) },
sidebarIsOpen: {
paddingLeft: 25,
transition: 'padding-left 195ms cubic-bezier(0.4, 0, 0.6, 1) 0ms'
transition: 'padding-left 195ms cubic-bezier(0.4, 0, 0.6, 1) 0ms',
},
sidebarIsClosed: {
paddingLeft: 0,
transition: 'padding-left 195ms cubic-bezier(0.4, 0, 0.6, 1) 0ms'
}
transition: 'padding-left 195ms cubic-bezier(0.4, 0, 0.6, 1) 0ms',
},
}))
const SubMenu = ({
@@ -29,7 +29,7 @@ const SubMenu = ({
name,
icon,
children,
dense
dense,
}) => {
const translate = useTranslate()
const classes = useStyles()