From 7796d543dd572e372995a6b1e50286954eec2b4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Zendran?= Date: Fri, 24 May 2024 15:33:15 +0200 Subject: [PATCH] Fixing eslint errors --- packages/uniforms-antd/__tests__/index.ts | 2 +- packages/uniforms-bootstrap3/__tests__/index.ts | 2 +- packages/uniforms-bootstrap4/__tests__/index.ts | 2 +- packages/uniforms-bootstrap5/__tests__/index.ts | 2 +- packages/uniforms-bridge-zod/src/ZodBridge.ts | 1 - packages/uniforms-material/__tests__/DateField.tsx | 2 +- packages/uniforms-material/__tests__/ErrorField.tsx | 2 +- packages/uniforms-material/__tests__/ErrorsField.tsx | 2 +- packages/uniforms-material/__tests__/NestField.tsx | 2 +- packages/uniforms-material/__tests__/SelectField.tsx | 2 +- packages/uniforms-material/__tests__/index.tsx | 2 +- packages/uniforms-mui/__tests__/index.ts | 2 +- packages/uniforms-semantic/__tests__/index.ts | 2 +- packages/uniforms-unstyled/__tests__/index.ts | 2 +- website/components/Badge.tsx | 2 +- website/components/ExampleCustomizer.tsx | 2 +- website/components/FormWrapper.tsx | 2 +- website/components/TogglerTabs.tsx | 4 ++-- website/components/TutorialForm.tsx | 2 +- website/pages-parts/LandingPage/Footer.tsx | 2 +- website/pages-parts/LandingPage/LandingPage.tsx | 2 +- 21 files changed, 21 insertions(+), 22 deletions(-) diff --git a/packages/uniforms-antd/__tests__/index.ts b/packages/uniforms-antd/__tests__/index.ts index f65bc471c..c5b560b7d 100644 --- a/packages/uniforms-antd/__tests__/index.ts +++ b/packages/uniforms-antd/__tests__/index.ts @@ -1,5 +1,5 @@ -import * as theme from 'uniforms-antd'; import * as suites from 'uniforms/__suites__'; +import * as theme from 'uniforms-antd'; it('exports everything', () => { expect(theme).toEqual({ diff --git a/packages/uniforms-bootstrap3/__tests__/index.ts b/packages/uniforms-bootstrap3/__tests__/index.ts index 73501bc3f..8b6842016 100644 --- a/packages/uniforms-bootstrap3/__tests__/index.ts +++ b/packages/uniforms-bootstrap3/__tests__/index.ts @@ -1,5 +1,5 @@ -import * as theme from 'uniforms-bootstrap3'; import * as suites from 'uniforms/__suites__'; +import * as theme from 'uniforms-bootstrap3'; it('exports everything', () => { expect(theme).toEqual({ diff --git a/packages/uniforms-bootstrap4/__tests__/index.ts b/packages/uniforms-bootstrap4/__tests__/index.ts index 74eb7b3de..66d7812de 100644 --- a/packages/uniforms-bootstrap4/__tests__/index.ts +++ b/packages/uniforms-bootstrap4/__tests__/index.ts @@ -1,5 +1,5 @@ -import * as theme from 'uniforms-bootstrap4'; import * as suites from 'uniforms/__suites__'; +import * as theme from 'uniforms-bootstrap4'; it('exports everything', () => { expect(theme).toEqual({ diff --git a/packages/uniforms-bootstrap5/__tests__/index.ts b/packages/uniforms-bootstrap5/__tests__/index.ts index 374958d94..579e55ae3 100644 --- a/packages/uniforms-bootstrap5/__tests__/index.ts +++ b/packages/uniforms-bootstrap5/__tests__/index.ts @@ -1,5 +1,5 @@ -import * as theme from 'uniforms-bootstrap5'; import * as suites from 'uniforms/__suites__'; +import * as theme from 'uniforms-bootstrap5'; it('exports everything', () => { expect(theme).toEqual({ diff --git a/packages/uniforms-bridge-zod/src/ZodBridge.ts b/packages/uniforms-bridge-zod/src/ZodBridge.ts index 967aa8a8f..573652511 100644 --- a/packages/uniforms-bridge-zod/src/ZodBridge.ts +++ b/packages/uniforms-bridge-zod/src/ZodBridge.ts @@ -307,7 +307,6 @@ export default class ZodBridge extends Bridge { getValidator() { return (model: UnknownObject) => { // TODO: What about async schemas? - // eslint-disable-next-line react/no-this-in-sfc const result = this.schema.safeParse(model); return result.success ? null : result.error; }; diff --git a/packages/uniforms-material/__tests__/DateField.tsx b/packages/uniforms-material/__tests__/DateField.tsx index e9162b0b5..6b340ca00 100644 --- a/packages/uniforms-material/__tests__/DateField.tsx +++ b/packages/uniforms-material/__tests__/DateField.tsx @@ -2,8 +2,8 @@ import FormHelperText from '@material-ui/core/FormHelperText'; import createMuiTheme from '@material-ui/core/styles/createMuiTheme'; import ThemeProvider from '@material-ui/styles/ThemeProvider/ThemeProvider'; import React from 'react'; -import { DateField } from 'uniforms-material'; import { render } from 'uniforms/__suites__'; +import { DateField } from 'uniforms-material'; import createContext from './_createContext'; import mount from './_mount'; diff --git a/packages/uniforms-material/__tests__/ErrorField.tsx b/packages/uniforms-material/__tests__/ErrorField.tsx index 7f55ab1f6..3739e51e4 100644 --- a/packages/uniforms-material/__tests__/ErrorField.tsx +++ b/packages/uniforms-material/__tests__/ErrorField.tsx @@ -1,8 +1,8 @@ import createMuiTheme from '@material-ui/core/styles/createMuiTheme'; import ThemeProvider from '@material-ui/styles/ThemeProvider/ThemeProvider'; import React from 'react'; -import { ErrorField } from 'uniforms-material'; import { renderWithZod } from 'uniforms/__suites__'; +import { ErrorField } from 'uniforms-material'; import z from 'zod'; describe('@RTL - ErrorField tests', () => { diff --git a/packages/uniforms-material/__tests__/ErrorsField.tsx b/packages/uniforms-material/__tests__/ErrorsField.tsx index 207ec2927..00c55f789 100644 --- a/packages/uniforms-material/__tests__/ErrorsField.tsx +++ b/packages/uniforms-material/__tests__/ErrorsField.tsx @@ -1,8 +1,8 @@ import createMuiTheme from '@material-ui/core/styles/createMuiTheme'; import ThemeProvider from '@material-ui/styles/ThemeProvider/ThemeProvider'; import React from 'react'; -import { ErrorsField } from 'uniforms-material'; import { renderWithZod } from 'uniforms/__suites__'; +import { ErrorsField } from 'uniforms-material'; import z from 'zod'; describe('@RTL - ErrorsField tests', () => { diff --git a/packages/uniforms-material/__tests__/NestField.tsx b/packages/uniforms-material/__tests__/NestField.tsx index 468c11de2..7624d7950 100644 --- a/packages/uniforms-material/__tests__/NestField.tsx +++ b/packages/uniforms-material/__tests__/NestField.tsx @@ -3,8 +3,8 @@ import FormLabel from '@material-ui/core/FormLabel'; import createMuiTheme from '@material-ui/core/styles/createMuiTheme'; import ThemeProvider from '@material-ui/styles/ThemeProvider/ThemeProvider'; import React from 'react'; -import { NestField } from 'uniforms-material'; import { render } from 'uniforms/__suites__'; +import { NestField } from 'uniforms-material'; import createContext from './_createContext'; import mount from './_mount'; diff --git a/packages/uniforms-material/__tests__/SelectField.tsx b/packages/uniforms-material/__tests__/SelectField.tsx index 305d0a365..c32d50c01 100644 --- a/packages/uniforms-material/__tests__/SelectField.tsx +++ b/packages/uniforms-material/__tests__/SelectField.tsx @@ -11,8 +11,8 @@ import TextField from '@material-ui/core/TextField'; import createMuiTheme from '@material-ui/core/styles/createMuiTheme'; import ThemeProvider from '@material-ui/styles/ThemeProvider/ThemeProvider'; import React from 'react'; -import { SelectField } from 'uniforms-material'; import { render } from 'uniforms/__suites__'; +import { SelectField } from 'uniforms-material'; import createContext from './_createContext'; import mount from './_mount'; diff --git a/packages/uniforms-material/__tests__/index.tsx b/packages/uniforms-material/__tests__/index.tsx index 647461ce5..12847559b 100644 --- a/packages/uniforms-material/__tests__/index.tsx +++ b/packages/uniforms-material/__tests__/index.tsx @@ -3,8 +3,8 @@ import createMuiTheme, { } from '@material-ui/core/styles/createMuiTheme'; import ThemeProvider from '@material-ui/styles/ThemeProvider/ThemeProvider'; import React, { PropsWithChildren } from 'react'; -import * as theme from 'uniforms-material'; import * as suites from 'uniforms/__suites__'; +import * as theme from 'uniforms-material'; it('exports everything', () => { expect(theme).toEqual({ diff --git a/packages/uniforms-mui/__tests__/index.ts b/packages/uniforms-mui/__tests__/index.ts index 634b6f46f..95d421a29 100644 --- a/packages/uniforms-mui/__tests__/index.ts +++ b/packages/uniforms-mui/__tests__/index.ts @@ -1,5 +1,5 @@ -import * as theme from 'uniforms-mui'; import * as suites from 'uniforms/__suites__'; +import * as theme from 'uniforms-mui'; it('exports everything', () => { expect(theme).toEqual({ diff --git a/packages/uniforms-semantic/__tests__/index.ts b/packages/uniforms-semantic/__tests__/index.ts index 87c1de6f0..67d9cdc9a 100644 --- a/packages/uniforms-semantic/__tests__/index.ts +++ b/packages/uniforms-semantic/__tests__/index.ts @@ -1,5 +1,5 @@ -import * as theme from 'uniforms-semantic'; import * as suites from 'uniforms/__suites__'; +import * as theme from 'uniforms-semantic'; it('exports everything', () => { expect(theme).toEqual({ diff --git a/packages/uniforms-unstyled/__tests__/index.ts b/packages/uniforms-unstyled/__tests__/index.ts index 097876b9d..0b4c72d09 100644 --- a/packages/uniforms-unstyled/__tests__/index.ts +++ b/packages/uniforms-unstyled/__tests__/index.ts @@ -1,5 +1,5 @@ -import * as theme from 'uniforms-unstyled'; import * as suites from 'uniforms/__suites__'; +import * as theme from 'uniforms-unstyled'; it('exports everything', () => { expect(theme).toEqual({ diff --git a/website/components/Badge.tsx b/website/components/Badge.tsx index 42559351e..22f17ec75 100644 --- a/website/components/Badge.tsx +++ b/website/components/Badge.tsx @@ -2,8 +2,8 @@ import Link from '@docusaurus/Link'; import classNames from 'classnames'; import React, { ComponentType } from 'react'; -import styles from '../index.module.css'; import { Oval } from './Oval'; +import styles from '../index.module.css'; export type BadgeProps = { border: number; diff --git a/website/components/ExampleCustomizer.tsx b/website/components/ExampleCustomizer.tsx index 005c866cd..aa444738a 100644 --- a/website/components/ExampleCustomizer.tsx +++ b/website/components/ExampleCustomizer.tsx @@ -1,10 +1,10 @@ import React, { ComponentType } from 'react'; import { Box, Code, Database } from 'react-feather'; -import { themeContext } from '../lib/universal'; import { CodeSection } from './CodeSection'; import { FormWrapper } from './FormWrapper'; import { TogglerTabs } from './TogglerTabs'; +import { themeContext } from '../lib/universal'; const tabs = [ { name: 'Semantic', value: 'semantic' as const }, diff --git a/website/components/FormWrapper.tsx b/website/components/FormWrapper.tsx index 134cba370..66a88a6c1 100644 --- a/website/components/FormWrapper.tsx +++ b/website/components/FormWrapper.tsx @@ -1,9 +1,9 @@ import React, { ReactNode, useContext } from 'react'; +import { PlaygroundWrap } from './Playground'; import styles from '../index.module.css'; import { useFrameAutoResize } from '../lib/autoresize'; import { themeContext } from '../lib/universal'; -import { PlaygroundWrap } from './Playground'; export type FormWrapperProps = { children: ReactNode; diff --git a/website/components/TogglerTabs.tsx b/website/components/TogglerTabs.tsx index fbf23aba1..8b2db1d06 100644 --- a/website/components/TogglerTabs.tsx +++ b/website/components/TogglerTabs.tsx @@ -1,9 +1,9 @@ import React, { ReactNode, useState } from 'react'; -import styles from '../index.module.css'; -import { useTabs } from '../lib/tabs'; import { TabsHeader, TabsItem } from './Tabs'; import { TogglerHeader, TogglerItem } from './Toggler'; +import styles from '../index.module.css'; +import { useTabs } from '../lib/tabs'; export type TogglerTabsProps = { children: (args: { tab: T; toggle: U }) => ReactNode; diff --git a/website/components/TutorialForm.tsx b/website/components/TutorialForm.tsx index fed202c94..a43347d2c 100644 --- a/website/components/TutorialForm.tsx +++ b/website/components/TutorialForm.tsx @@ -1,8 +1,8 @@ import React, { ReactNode } from 'react'; -import { themeContext } from '../lib/universal'; import { FormWrapper } from './FormWrapper'; import { Tabs } from './Tabs'; +import { themeContext } from '../lib/universal'; const tabs = [ { name: 'Semantic', value: 'semantic' as const }, diff --git a/website/pages-parts/LandingPage/Footer.tsx b/website/pages-parts/LandingPage/Footer.tsx index 05aea7036..5509173c8 100644 --- a/website/pages-parts/LandingPage/Footer.tsx +++ b/website/pages-parts/LandingPage/Footer.tsx @@ -3,8 +3,8 @@ import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import classNames from 'classnames'; import React from 'react'; -import styles from '../../index.module.css'; import { ShowcaseCard } from './ShowcaseCard'; +import styles from '../../index.module.css'; export function Footer() { const context = useDocusaurusContext(); diff --git a/website/pages-parts/LandingPage/LandingPage.tsx b/website/pages-parts/LandingPage/LandingPage.tsx index dbb6c0122..eabb6c100 100644 --- a/website/pages-parts/LandingPage/LandingPage.tsx +++ b/website/pages-parts/LandingPage/LandingPage.tsx @@ -1,7 +1,6 @@ import classNames from 'classnames'; import React from 'react'; -import styles from '../../index.module.css'; import { CommercialServices } from './CommercialServices'; import { Comparison } from './Comparison'; import { Discussions } from './Discussions'; @@ -13,6 +12,7 @@ import { OpenSource } from './OpenSource'; import { Testimonials } from './Testimonials'; import { WhoUses } from './WhoUses'; import { WhyUs } from './WhyUs'; +import styles from '../../index.module.css'; export function LandingPage() { return (