code-style: eslint fixes

This commit is contained in:
Chika 2022-05-08 21:32:40 +03:00
parent ff6a669c1e
commit 3a52ce3647
7 changed files with 11 additions and 5 deletions

View File

@ -4,4 +4,5 @@ node_modules
yarn.lock
package-lock.json
**/*.test.js
coverage
coverage
mocks

View File

@ -1,3 +1,4 @@
/* eslint-disable import/prefer-default-export */
import { createGlobalStyle } from 'styled-components';
export const GlobalStyle = createGlobalStyle`

View File

@ -1,3 +1,5 @@
/* eslint-disable no-underscore-dangle */
/* eslint-disable @typescript-eslint/naming-convention */
import { ApolloClient, InMemoryCache } from '@apollo/client';
/** @type {import('@apollo/client').ApolloClient<NormalizedCacheObject>} */
@ -16,7 +18,7 @@ function createApolloClient() {
});
}
export function initializeApollo(initialState = null) {
export default function initializeApollo(initialState = null) {
const _apolloClient = apolloClient ?? createApolloClient();
// If your page has Next.js data fetching methods that use Apollo Client, the initial state

View File

@ -1,5 +1,6 @@
/* eslint-disable import/prefer-default-export */
import { useMemo } from 'react';
import { initializeApollo } from './client';
import initializeApollo from './client';
export function useApollo(initialState) {
const client = useMemo(() => initializeApollo(initialState), [initialState]);

View File

@ -1,4 +1,4 @@
import { initializeApollo } from 'apollo/client';
import initializeApollo from 'apollo/client';
import type { GetServerSideProps } from 'next';
import { fetchUser } from 'services/user';
import type { BasePageProps } from 'types/page';

View File

@ -1,3 +1,4 @@
/* eslint-disable import/prefer-default-export */
import axios, { AxiosRequestConfig } from 'axios';
import type { User } from './types';

View File

@ -1,6 +1,6 @@
/* eslint-disable object-curly-newline */
/* eslint-disable import/no-cycle */
import type { Elements } from 'Components/Calculation/types/elements';
import type { Elements } from 'Components/Calculation/config/map';
import { makeAutoObservable } from 'mobx';
import RootStore from 'stores/root';
import type { CalculationStatuses, Status } from './types';