Skip to content

Commit

Permalink
chore: autofix eslint errors after config change
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoerge committed Feb 12, 2024
1 parent e01c101 commit b14622e
Show file tree
Hide file tree
Showing 2,352 changed files with 9,795 additions and 7,630 deletions.
2 changes: 1 addition & 1 deletion dev/design-studio/components/CustomPane/CustomPane.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {useCallback} from 'react'
import {Button, Card, Code, Stack} from '@sanity/ui'
import {useCallback} from 'react'
import {usePaneRouter} from 'sanity/structure'

export function CustomPane(props: any) {
Expand Down
28 changes: 14 additions & 14 deletions dev/design-studio/plugins/theme-preview-tool/ColorCanvas.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
import {Tool} from 'sanity'
import {
Box,
Card,
CardTone,
type CardTone,
Flex,
Grid,
Stack,
Text,
ThemeColor,
ThemeColorButton,
ThemeColorButtonState,
ThemeColorButtonStates,
ThemeColorButtonTones,
ThemeColorMuted,
ThemeColorMutedTone,
type ThemeColor,
type ThemeColorButton,
type ThemeColorButtonState,
type ThemeColorButtonStates,
type ThemeColorButtonTones,
type ThemeColorMuted,
type ThemeColorMutedTone,
ThemeColorProvider,
ThemeColorScheme,
ThemeColorSelectable,
ThemeColorSelectableStates,
ThemeColorSolid,
ThemeColorSolidTone,
type ThemeColorScheme,
type ThemeColorSelectable,
type ThemeColorSelectableStates,
type ThemeColorSolid,
type ThemeColorSolidTone,
useRootTheme,
} from '@sanity/ui'
import {createContext, useContext, useMemo} from 'react'
import {type Tool} from 'sanity'

interface Features {
button: boolean
Expand Down
3 changes: 2 additions & 1 deletion dev/design-studio/plugins/theme-preview-tool/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {definePlugin} from 'sanity'
import {IceCreamIcon} from '@sanity/icons'
import {definePlugin} from 'sanity'

import {ColorCanvas} from './ColorCanvas'

export function themePreviewTool() {
Expand Down
3 changes: 2 additions & 1 deletion dev/design-studio/sanity.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import {defineConfig} from 'sanity'
import {structureTool} from 'sanity/structure'
import {templates} from './templates'

import {themePreviewTool} from './plugins/theme-preview-tool'
import {schemaTypes} from './schemaTypes'
import {structure} from './structure'
import {templates} from './templates'

export default defineConfig({
plugins: [
Expand Down
2 changes: 1 addition & 1 deletion dev/design-studio/schemaTypes/allInputs.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Rule} from 'sanity'
import {type Rule} from 'sanity'

// import author from './author'

Expand Down
2 changes: 1 addition & 1 deletion dev/design-studio/schemaTypes/author.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {UserIcon} from '@sanity/icons'
import {Rule} from 'sanity'
import {type Rule} from 'sanity'

export default {
type: 'document',
Expand Down
2 changes: 1 addition & 1 deletion dev/design-studio/schemaTypes/live.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Rule} from 'sanity'
import {type Rule} from 'sanity'

export default {
type: 'document',
Expand Down
2 changes: 1 addition & 1 deletion dev/design-studio/schemaTypes/pt.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Rule} from 'sanity'
import {type Rule} from 'sanity'

const objectExample = {
type: 'object',
Expand Down
2 changes: 1 addition & 1 deletion dev/design-studio/schemaTypes/settings.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Rule} from 'sanity'
import {type Rule} from 'sanity'

export default {
type: 'document',
Expand Down
3 changes: 2 additions & 1 deletion dev/design-studio/structure.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {StructureResolver, DefaultDocumentNodeResolver} from 'sanity/structure'
import {CogIcon} from '@sanity/icons'
import {type DefaultDocumentNodeResolver, type StructureResolver} from 'sanity/structure'

import {CustomPane} from './components/CustomPane'
import {IFrameView} from './components/IframeView'
import {JSONPreviewDocumentView} from './components/jsonPreview'
Expand Down
2 changes: 1 addition & 1 deletion dev/design-studio/templates.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Template} from 'sanity'
import {type Template} from 'sanity'

export const templates: Template[] = [
{
Expand Down
10 changes: 5 additions & 5 deletions dev/embedded-studio/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import {Button, Card, Flex, studioTheme, ThemeProvider, usePrefersDark} from '@sanity/ui'
import {useCallback, useMemo, useState} from 'react'
import {
defineConfig,
StudioProvider,
StudioLayout,
defineType,
StudioThemeColorSchemeKey,
Studio,
StudioLayout,
StudioProvider,
type StudioThemeColorSchemeKey,
} from 'sanity'
import {structureTool} from 'sanity/structure'
import {Button, Card, Flex, ThemeProvider, studioTheme, usePrefersDark} from '@sanity/ui'
import {useCallback, useMemo, useState} from 'react'

const BLOG_POST_SCHEMA = defineType({
type: 'document',
Expand Down
6 changes: 4 additions & 2 deletions dev/embedded-studio/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import {StrictMode} from 'react'
import ReactDOM from 'react-dom/client'
// eslint-disable-next-line import/no-unassigned-import
import './index.css'

import {StrictMode} from 'react'
import ReactDOM from 'react-dom/client'

import {App} from './App'

ReactDOM.createRoot(document.getElementById('root')!).render(
Expand Down
2 changes: 1 addition & 1 deletion dev/embedded-studio/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {defineConfig} from 'vite'
import react from '@vitejs/plugin-react'
import {defineConfig} from 'vite'

// https://vitejs.dev/config/
export default defineConfig({
Expand Down
4 changes: 2 additions & 2 deletions dev/starter-next-studio/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type {AppProps} from 'next/app'

// eslint-disable-next-line import/no-unassigned-import
import '../reset.css'

import {type AppProps} from 'next/app'

export default function App({Component, pageProps}: AppProps) {
return <Component {...pageProps} />
}
1 change: 1 addition & 0 deletions dev/starter-next-studio/pages/studio/[[...tool]].tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {useRouter} from 'next/router'
import {useState} from 'react'

import Studio from '../../components/Studio'

export default function StudioPage() {
Expand Down
1 change: 1 addition & 0 deletions dev/strict-studio/entry.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {StrictMode} from 'react'
import {createRoot} from 'react-dom/client'
import {Studio} from 'sanity'

import config from './sanity.config'

// eslint-disable-next-line no-console
Expand Down
1 change: 1 addition & 0 deletions dev/strict-studio/sanity.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {defineConfig} from 'sanity'
import {structureTool} from 'sanity/structure'

import {schemaTypes} from './schema'

export default defineConfig({
Expand Down
2 changes: 1 addition & 1 deletion dev/studio-e2e-testing/components-api/DocumentLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Flex} from '@sanity/ui'
import {DocumentLayoutProps} from 'sanity'
import {type DocumentLayoutProps} from 'sanity'

export function DocumentLayout(props: DocumentLayoutProps & {testId: string}) {
const {testId} = props
Expand Down
2 changes: 1 addition & 1 deletion dev/studio-e2e-testing/components-api/FormField.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Stack} from '@sanity/ui'
import {FieldProps} from 'sanity'
import {type FieldProps} from 'sanity'

export function FormField(props: FieldProps & {testId: string}) {
const {testId} = props
Expand Down
2 changes: 1 addition & 1 deletion dev/studio-e2e-testing/components-api/FormInput.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Stack} from '@sanity/ui'
import {InputProps} from 'sanity'
import {type InputProps} from 'sanity'

export function FormInput(props: InputProps & {testId: string}) {
const {testId} = props
Expand Down
2 changes: 1 addition & 1 deletion dev/studio-e2e-testing/components-api/StudioLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Flex} from '@sanity/ui'
import {LayoutProps} from 'sanity'
import {type LayoutProps} from 'sanity'

export function StudioLayout(props: LayoutProps & {testId: string}) {
const {testId} = props
Expand Down
2 changes: 1 addition & 1 deletion dev/studio-e2e-testing/components-api/StudioLogo.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Box} from '@sanity/ui'
import {LogoProps} from 'sanity'
import {type LogoProps} from 'sanity'

export function StudioLogo(props: LogoProps & {testId: string}) {
const {testId} = props
Expand Down
2 changes: 1 addition & 1 deletion dev/studio-e2e-testing/components-api/StudioNavbar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Stack} from '@sanity/ui'
import {NavbarProps} from 'sanity'
import {type NavbarProps} from 'sanity'

export function StudioNavbar(props: NavbarProps & {testId: string}) {
const {testId} = props
Expand Down
2 changes: 1 addition & 1 deletion dev/studio-e2e-testing/components-api/StudioToolMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Stack} from '@sanity/ui'
import {ToolMenuProps} from 'sanity'
import {type ToolMenuProps} from 'sanity'

export function StudioToolMenu(props: ToolMenuProps & {testId: string}) {
const {testId} = props
Expand Down
8 changes: 4 additions & 4 deletions dev/studio-e2e-testing/components-api/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {definePlugin} from 'sanity'

import {DocumentLayout} from './DocumentLayout'
import {FormField} from './FormField'
import {FormInput} from './FormInput'
import {StudioLayout} from './StudioLayout'
import {StudioNavbar} from './StudioNavbar'
import {StudioLogo} from './StudioLogo'
import {StudioToolMenu} from './StudioToolMenu'
import {FormInput} from './FormInput'
import {FormField} from './FormField'
import {DocumentLayout} from './DocumentLayout'

const childComponents = definePlugin({
name: 'child-components',
Expand Down
1 change: 1 addition & 0 deletions dev/studio-e2e-testing/sanity.cli.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {defineCliConfig} from 'sanity/cli'

import {loadEnvFiles} from '../../scripts/utils/loadEnvFiles'

loadEnvFiles()
Expand Down
19 changes: 10 additions & 9 deletions dev/studio-e2e-testing/sanity.config.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
import {googleMapsInput} from '@sanity/google-maps-input'
import {BookIcon} from '@sanity/icons'
import {visionTool} from '@sanity/vision'
import {defineConfig, definePlugin} from 'sanity'
import {structureTool} from 'sanity/structure'
import {visionTool} from '@sanity/vision'
import {BookIcon} from '@sanity/icons'
import {muxInput} from 'sanity-plugin-mux-input'
import {googleMapsInput} from '@sanity/google-maps-input'
import {imageAssetSource} from 'sanity-test-studio/assetSources'
import {resolveDocumentActions as documentActions} from 'sanity-test-studio/documentActions'
import {assistFieldActionGroup} from 'sanity-test-studio/fieldActions/assistFieldActionGroup'
import {copyAction} from 'sanity-test-studio/fieldActions/copyAction'
import {pasteAction} from 'sanity-test-studio/fieldActions/pasteAction'
import {resolveInitialValueTemplates} from 'sanity-test-studio/initialValueTemplates'
import {customInspector} from 'sanity-test-studio/inspectors/custom'
import {languageFilter} from 'sanity-test-studio/plugins/language-filter'
import {defaultDocumentNode, newDocumentOptions, structure} from 'sanity-test-studio/structure'
import {presenceTool} from 'sanity-test-studio/plugins/presence'
import {copyAction} from 'sanity-test-studio/fieldActions/copyAction'
import {assistFieldActionGroup} from 'sanity-test-studio/fieldActions/assistFieldActionGroup'
import {customInspector} from 'sanity-test-studio/inspectors/custom'
import {pasteAction} from 'sanity-test-studio/fieldActions/pasteAction'
import {schemaTypes} from './schemaTypes'
import {defaultDocumentNode, newDocumentOptions, structure} from 'sanity-test-studio/structure'

import {customComponents} from './components-api'
import {schemaTypes} from './schemaTypes'

const sharedSettings = definePlugin({
name: 'sharedSettings',
Expand Down
2 changes: 1 addition & 1 deletion dev/test-next-studio/app/Studio.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client'

import {useMemo} from 'react'
import {defineConfig, Studio, StudioProps} from 'sanity'
import {defineConfig, Studio, type StudioProps} from 'sanity'
import {structureTool} from 'sanity/structure'

export default function StudioRoot({
Expand Down
1 change: 1 addition & 0 deletions dev/test-next-studio/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// eslint-disable-next-line import/no-unassigned-import
import './global.css'

import StyledComponentsRegistry from './registry'

export default function RootLayout({children}: {children: React.ReactNode}) {
Expand Down
2 changes: 1 addition & 1 deletion dev/test-next-studio/app/registry.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// https://beta.nextjs.org/docs/styling/css-in-js#styled-components

'use client'
import {ReactNode, useState} from 'react'
import {useServerInsertedHTML} from 'next/navigation'
import React, {type ReactNode, useState} from 'react'
import {ServerStyleSheet, StyleSheetManager} from 'styled-components'

export default function StyledComponentsRegistry({children}: {children: ReactNode}) {
Expand Down
4 changes: 2 additions & 2 deletions dev/test-next-studio/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type {AppProps} from 'next/app'

// eslint-disable-next-line import/no-unassigned-import
import '../app/global.css'

import {type AppProps} from 'next/app'

export default function App({Component, pageProps}: AppProps) {
return <Component {...pageProps} />
}
2 changes: 1 addition & 1 deletion dev/test-studio/assetSources/imageAssetSource.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {ImagesIcon} from '@sanity/icons'
import {AssetSource, AssetSourceComponentProps} from '@sanity/types'
import {type AssetSource, type AssetSourceComponentProps} from '@sanity/types'
import {Box, Dialog, Text} from '@sanity/ui'

function ImageAssetSource(props: AssetSourceComponentProps) {
Expand Down
4 changes: 2 additions & 2 deletions dev/test-studio/components/TranslateExample.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Translate, useTranslation} from 'sanity'
import {Card, Stack, Text} from '@sanity/ui'
import {InfoFilledIcon} from '@sanity/icons'
import {Card, Stack, Text} from '@sanity/ui'
import {Translate, useTranslation} from 'sanity'

export function TranslateExample() {
const {t} = useTranslation('testStudio')
Expand Down
2 changes: 1 addition & 1 deletion dev/test-studio/components/deskTool/LanguageFilter.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {SchemaType} from '@sanity/types'
import {type SchemaType} from '@sanity/types'
import {Card, Text} from '@sanity/ui'

export function LanguageFilter(props: {schemaType: SchemaType}) {
Expand Down
12 changes: 6 additions & 6 deletions dev/test-studio/components/formComponents.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import {Card} from '@sanity/ui'
import {
type BlockAnnotationProps,
type BlockProps,
definePlugin,
InputProps,
FieldProps,
ItemProps,
PreviewProps,
BlockProps,
BlockAnnotationProps,
type FieldProps,
type InputProps,
type ItemProps,
type PreviewProps,
} from 'sanity'

export function Input(props: InputProps) {
Expand Down
2 changes: 1 addition & 1 deletion dev/test-studio/components/navbar/ToolMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Button, Flex} from '@sanity/ui'
import {ToolLink, ToolMenuProps} from 'sanity'
import {ToolLink, type ToolMenuProps} from 'sanity'

export function ToolMenu(props: ToolMenuProps) {
const {context, tools, closeSidebar} = props
Expand Down
8 changes: 4 additions & 4 deletions dev/test-studio/components/panes/JsonDocumentDump.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import {useClient} from 'sanity'
import {SanityDocument} from '@sanity/types'
import {type SanityDocument} from '@sanity/types'
import {Box, Code, Flex, Spinner, Text} from '@sanity/ui'
import {
ForwardedRef,
type ForwardedRef,
forwardRef,
useCallback,
useEffect,
useImperativeHandle,
useRef,
useState,
} from 'react'
import {Subscription} from 'rxjs'
import {type Subscription} from 'rxjs'
import {useClient} from 'sanity'

export const JsonDocumentDump = forwardRef(function JsonDocumentDump(
props: {itemId: string},
Expand Down
Loading

0 comments on commit b14622e

Please sign in to comment.