Upgrade prettier before it will be removed forever

This commit is contained in:
SleepWalker
2020-05-20 19:35:52 +03:00
parent 39576c0480
commit 2d903f96fc
108 changed files with 422 additions and 547 deletions

View File

@@ -22,11 +22,11 @@ export function getApp(
state: { apps: Apps },
clientId: string,
): OauthAppResponse | null {
return state.apps.available.find(app => app.clientId === clientId) || null;
return state.apps.available.find((app) => app.clientId === clientId) || null;
}
export function fetchApp(clientId: string): ThunkAction<Promise<void>> {
return async dispatch => {
return async (dispatch) => {
const app = await oauth.getApp(clientId);
dispatch(addApp(app));
@@ -88,7 +88,7 @@ export function resetApp(
clientId: string,
resetSecret: boolean,
): ThunkAction<Promise<void>> {
return async dispatch => {
return async (dispatch) => {
const { data: app } = await oauth.reset(clientId, resetSecret);
if (resetSecret) {

View File

@@ -19,7 +19,7 @@ const ApplicationTypeSwitcher: ComponentType<Props> = ({
}) => (
<div>
{((Object.keys(appTypes) as unknown) as Array<ApplicationType>).map(
type => (
(type) => (
<div className={styles.radioContainer} key={type}>
<Radio
onChange={() => setType(type)}

View File

@@ -151,7 +151,7 @@ export default class ApplicationItem extends React.Component<
<div
className={styles.appActionContainer}
ref={el => {
ref={(el) => {
this.actionContainer = el;
}}
>

View File

@@ -55,10 +55,10 @@ export default class ApplicationsList extends React.Component<Props, State> {
/>
</div>
<div className={styles.appsListContainer}>
{applications.map(app => (
{applications.map((app) => (
<div
key={app.clientId}
ref={elem => {
ref={(elem) => {
this.appsRefs[app.clientId] = elem;
}}
>
@@ -83,7 +83,7 @@ export default class ApplicationsList extends React.Component<Props, State> {
if (
clientId &&
expandedApp !== clientId &&
applications.some(app => app.clientId === clientId)
applications.some((app) => app.clientId === clientId)
) {
requestAnimationFrame(() =>
this.onTileClick(clientId, { noReset: true }),

View File

@@ -21,7 +21,9 @@ export default function apps(state: Apps = defaults, action: Action): Apps {
case 'apps:addApp': {
const { payload } = action;
const available = [...state.available];
let index = available.findIndex(app => app.clientId === payload.clientId);
let index = available.findIndex(
(app) => app.clientId === payload.clientId,
);
if (index === -1) {
index = available.length;
@@ -39,7 +41,7 @@ export default function apps(state: Apps = defaults, action: Action): Apps {
return {
...state,
available: state.available.filter(
app => app.clientId !== action.payload,
(app) => app.clientId !== action.payload,
),
};
}