chore: use common eslint config for most packages (#4705)

Split from https://github.com/twentyhq/twenty/pull/4518

Related to #4766 

Mutualizes eslint config between projects.
I didn't include `twenty-server` in this PR as this was causing too many
lint errors.
This commit is contained in:
Thaïs
2024-04-04 12:05:26 +02:00
committed by GitHub
parent ff0db8d716
commit bf8ee99ebb
28 changed files with 667 additions and 698 deletions

View File

@ -1,5 +1,4 @@
import { useQuery } from '@apollo/client';
import { gql } from '@apollo/client';
import { gql, useQuery } from '@apollo/client';
import { isNonEmptyArray } from '@sniptt/guards';
import { useRecoilValue } from 'recoil';

View File

@ -2,7 +2,7 @@ import { SafeParseSuccess } from 'zod';
import { CreateObjectInput } from '~/generated-metadata/graphql';
import { settingsCreateObjectInputSchema } from '..//settingsCreateObjectInputSchema';
import { settingsCreateObjectInputSchema } from '../settingsCreateObjectInputSchema';
describe('settingsCreateObjectInputSchema', () => {
it('validates a valid input and adds name properties', () => {

View File

@ -1,5 +1,4 @@
import { createState } from 'twenty-ui';
import { IconApps } from 'twenty-ui';
import { createState, IconApps } from 'twenty-ui';
import { IconComponent } from '@/ui/display/icon/types/IconComponent';

View File

@ -1,8 +1,7 @@
import { useEffect } from 'react';
import { useTheme } from '@emotion/react';
import styled from '@emotion/styled';
import { motion, useMotionValue, useTransform } from 'framer-motion';
import { animate } from 'framer-motion';
import { animate, motion, useMotionValue, useTransform } from 'framer-motion';
import { BACKGROUND } from '@/ui/layout/animated-placeholder/constants/Background';
import { DARK_BACKGROUND } from '@/ui/layout/animated-placeholder/constants/DarkBackground';

View File

@ -2,8 +2,7 @@ import { useMemo } from 'react';
import { Outlet } from 'react-router-dom';
import { css, Global, useTheme } from '@emotion/react';
import styled from '@emotion/styled';
import { motion } from 'framer-motion';
import { AnimatePresence, LayoutGroup } from 'framer-motion';
import { AnimatePresence, LayoutGroup, motion } from 'framer-motion';
import { AuthModal } from '@/auth/components/Modal';
import { useOnboardingStatus } from '@/auth/hooks/useOnboardingStatus';

View File

@ -40,10 +40,13 @@ const Wrapper = ({ children }: { children: React.ReactNode }) => (
</MockedProvider>
</MemoryRouter>
);
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const _renderHookConfig = {
wrapper: Wrapper,
};
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const _viewBarId = 'viewBarTestId';
describe('useViewBar', () => {

View File

@ -41,7 +41,7 @@ export const useHandleViews = (viewBarComponentId?: string) => {
const { saveCurrentViewFilterAndSorts } =
useSaveCurrentViewFiltersAndSorts(viewBarComponentId);
const [_, setSearchParams] = useSearchParams();
const [, setSearchParams] = useSearchParams();
const removeView = useRecoilCallback(
() => async (viewId: string) => {