diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 60ca938b50ba..28f4fd7e6c5b 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -32,6 +32,8 @@ const baseConfig = { additionalHooks: '(useMemoObservable|useObservableCallback|useAsync)', }, ], + 'react/no-unescaped-entities': 'off', + 'react/jsx-uses-react': 'warn', }, settings: { 'import/extensions': ['.cjs', '.mjs', '.js', '.jsx', '.ts', '.tsx'], diff --git a/dev/starter-cra-studio/src/Studio.js b/dev/starter-cra-studio/src/Studio.js index fa2a9ef5cd87..48492ffe9b6d 100644 --- a/dev/starter-cra-studio/src/Studio.js +++ b/dev/starter-cra-studio/src/Studio.js @@ -1,5 +1,4 @@ /* eslint-disable react/jsx-filename-extension */ -/* eslint-disable react/react-in-jsx-scope */ import {defineConfig, Studio} from 'sanity' import {deskTool} from 'sanity/desk' @@ -29,5 +28,6 @@ const config = defineConfig({ }) export function CraStudio() { + // eslint-disable-next-line react/react-in-jsx-scope return } diff --git a/dev/starter-next-studio/components/Studio.tsx b/dev/starter-next-studio/components/Studio.tsx index 15dda6b42e2c..7d408bf21d91 100644 --- a/dev/starter-next-studio/components/Studio.tsx +++ b/dev/starter-next-studio/components/Studio.tsx @@ -1,5 +1,3 @@ -/* eslint-disable react/react-in-jsx-scope */ - import {useMemo} from 'react' import {defineConfig, Studio} from 'sanity' import {deskTool} from 'sanity/desk' diff --git a/dev/starter-next-studio/pages/_app.tsx b/dev/starter-next-studio/pages/_app.tsx index e61540799fba..8dc7e1188a44 100644 --- a/dev/starter-next-studio/pages/_app.tsx +++ b/dev/starter-next-studio/pages/_app.tsx @@ -1,5 +1,3 @@ -/* eslint-disable react/react-in-jsx-scope */ - import type {AppProps} from 'next/app' // eslint-disable-next-line import/no-unassigned-import diff --git a/dev/starter-next-studio/pages/index.tsx b/dev/starter-next-studio/pages/index.tsx index 74fb8b621461..6f26cb4fcfac 100644 --- a/dev/starter-next-studio/pages/index.tsx +++ b/dev/starter-next-studio/pages/index.tsx @@ -1,5 +1,3 @@ -/* eslint-disable react/react-in-jsx-scope */ - import Link from 'next/link' export default function IndexPage() { diff --git a/dev/starter-next-studio/pages/studio/[[...tool]].tsx b/dev/starter-next-studio/pages/studio/[[...tool]].tsx index 4746989245df..2d3c476a32b4 100644 --- a/dev/starter-next-studio/pages/studio/[[...tool]].tsx +++ b/dev/starter-next-studio/pages/studio/[[...tool]].tsx @@ -1,5 +1,3 @@ -/* eslint-disable react/react-in-jsx-scope */ - import {useRouter} from 'next/router' import {useState} from 'react' import Studio from '../../components/Studio' diff --git a/dev/test-next-studio/app/Studio.tsx b/dev/test-next-studio/app/Studio.tsx index 15ae17a5ef3e..f429a323d8f7 100644 --- a/dev/test-next-studio/app/Studio.tsx +++ b/dev/test-next-studio/app/Studio.tsx @@ -1,7 +1,5 @@ 'use client' -/* eslint-disable react/react-in-jsx-scope */ - import {useMemo} from 'react' import {defineConfig, Studio, StudioProps} from 'sanity' import {deskTool} from 'sanity/desk' diff --git a/dev/test-next-studio/app/app-defaults/[[...path]]/page.tsx b/dev/test-next-studio/app/app-defaults/[[...path]]/page.tsx index 9a23d330fccd..86c875a75517 100644 --- a/dev/test-next-studio/app/app-defaults/[[...path]]/page.tsx +++ b/dev/test-next-studio/app/app-defaults/[[...path]]/page.tsx @@ -1,5 +1,3 @@ -/* eslint-disable react/react-in-jsx-scope */ - import Studio from '../../Studio' export default function StudioPage() { diff --git a/dev/test-next-studio/app/app-global-styles/[[...path]]/page.tsx b/dev/test-next-studio/app/app-global-styles/[[...path]]/page.tsx index 3a2554aadf91..4e13f8e0b1d8 100644 --- a/dev/test-next-studio/app/app-global-styles/[[...path]]/page.tsx +++ b/dev/test-next-studio/app/app-global-styles/[[...path]]/page.tsx @@ -1,5 +1,3 @@ -/* eslint-disable react/react-in-jsx-scope */ - import Studio from '../../Studio' export default function StudioPage() { diff --git a/dev/test-next-studio/app/app-no-auth-boundary/[[...path]]/page.tsx b/dev/test-next-studio/app/app-no-auth-boundary/[[...path]]/page.tsx index 15dc9ebbf7f1..41da6ad93a4b 100644 --- a/dev/test-next-studio/app/app-no-auth-boundary/[[...path]]/page.tsx +++ b/dev/test-next-studio/app/app-no-auth-boundary/[[...path]]/page.tsx @@ -1,5 +1,3 @@ -/* eslint-disable react/react-in-jsx-scope */ - import Studio from '../../Studio' export default function StudioPage() { diff --git a/dev/test-next-studio/app/app-scheme-dark/[[...path]]/page.tsx b/dev/test-next-studio/app/app-scheme-dark/[[...path]]/page.tsx index d4ca70756f99..d0164ecbf260 100644 --- a/dev/test-next-studio/app/app-scheme-dark/[[...path]]/page.tsx +++ b/dev/test-next-studio/app/app-scheme-dark/[[...path]]/page.tsx @@ -1,5 +1,3 @@ -/* eslint-disable react/react-in-jsx-scope */ - import Studio from '../../Studio' export default function StudioPage() { diff --git a/dev/test-next-studio/app/app-scheme-light/[[...path]]/page.tsx b/dev/test-next-studio/app/app-scheme-light/[[...path]]/page.tsx index ca47ce71f6ce..5d6f3e481282 100644 --- a/dev/test-next-studio/app/app-scheme-light/[[...path]]/page.tsx +++ b/dev/test-next-studio/app/app-scheme-light/[[...path]]/page.tsx @@ -1,5 +1,3 @@ -/* eslint-disable react/react-in-jsx-scope */ - import Studio from '../../Studio' export default function StudioPage() { diff --git a/dev/test-next-studio/app/app-scheme-system/[[...path]]/page.tsx b/dev/test-next-studio/app/app-scheme-system/[[...path]]/page.tsx index e9b42b6810f3..695297266346 100644 --- a/dev/test-next-studio/app/app-scheme-system/[[...path]]/page.tsx +++ b/dev/test-next-studio/app/app-scheme-system/[[...path]]/page.tsx @@ -1,5 +1,3 @@ -/* eslint-disable react/react-in-jsx-scope */ - import Studio from '../../Studio' export default function StudioPage() { diff --git a/dev/test-next-studio/app/layout.tsx b/dev/test-next-studio/app/layout.tsx index c8b289c4ac28..68f3cff62e52 100644 --- a/dev/test-next-studio/app/layout.tsx +++ b/dev/test-next-studio/app/layout.tsx @@ -1,4 +1,3 @@ -/* eslint-disable react/react-in-jsx-scope */ // eslint-disable-next-line import/no-unassigned-import import './global.css' import StyledComponentsRegistry from './registry' diff --git a/dev/test-next-studio/app/page.tsx b/dev/test-next-studio/app/page.tsx index 4b5aac89b07b..4f85696e8bbb 100644 --- a/dev/test-next-studio/app/page.tsx +++ b/dev/test-next-studio/app/page.tsx @@ -1,4 +1,3 @@ -/* eslint-disable react/react-in-jsx-scope */ import Link from 'next/link' const links = [ diff --git a/dev/test-next-studio/pages/_app.tsx b/dev/test-next-studio/pages/_app.tsx index e75d0e211e38..3f667b55b98d 100644 --- a/dev/test-next-studio/pages/_app.tsx +++ b/dev/test-next-studio/pages/_app.tsx @@ -1,5 +1,3 @@ -/* eslint-disable react/react-in-jsx-scope */ - import type {AppProps} from 'next/app' // eslint-disable-next-line import/no-unassigned-import diff --git a/dev/test-next-studio/pages/_document.tsx b/dev/test-next-studio/pages/_document.tsx index 93876bf2a87f..3d0d5a62146c 100644 --- a/dev/test-next-studio/pages/_document.tsx +++ b/dev/test-next-studio/pages/_document.tsx @@ -1,4 +1,3 @@ -/* eslint-disable react/react-in-jsx-scope */ import Document, {type DocumentContext} from 'next/document' import {ServerStyleSheet} from 'styled-components' diff --git a/dev/test-next-studio/pages/pages-defaults/[[...path]].tsx b/dev/test-next-studio/pages/pages-defaults/[[...path]].tsx index 45bc597f1eee..2e9c9496d345 100644 --- a/dev/test-next-studio/pages/pages-defaults/[[...path]].tsx +++ b/dev/test-next-studio/pages/pages-defaults/[[...path]].tsx @@ -1,5 +1,3 @@ -/* eslint-disable react/react-in-jsx-scope */ - import Studio from '../../app/Studio' export default function StudioPage() { diff --git a/dev/test-next-studio/pages/pages-global-styles/[[...path]].tsx b/dev/test-next-studio/pages/pages-global-styles/[[...path]].tsx index ac3475b12b76..094ca7514ea9 100644 --- a/dev/test-next-studio/pages/pages-global-styles/[[...path]].tsx +++ b/dev/test-next-studio/pages/pages-global-styles/[[...path]].tsx @@ -1,5 +1,3 @@ -/* eslint-disable react/react-in-jsx-scope */ - import Studio from '../../app/Studio' export default function StudioPage() { diff --git a/dev/test-next-studio/pages/pages-no-auth-boundary/[[...path]].tsx b/dev/test-next-studio/pages/pages-no-auth-boundary/[[...path]].tsx index 5e07d6e786d3..a0347444fa39 100644 --- a/dev/test-next-studio/pages/pages-no-auth-boundary/[[...path]].tsx +++ b/dev/test-next-studio/pages/pages-no-auth-boundary/[[...path]].tsx @@ -1,5 +1,3 @@ -/* eslint-disable react/react-in-jsx-scope */ - import Studio from '../../app/Studio' export default function StudioPage() { diff --git a/dev/test-next-studio/pages/pages-scheme-dark/[[...path]].tsx b/dev/test-next-studio/pages/pages-scheme-dark/[[...path]].tsx index b2dcacde1ee8..b64554d6ad63 100644 --- a/dev/test-next-studio/pages/pages-scheme-dark/[[...path]].tsx +++ b/dev/test-next-studio/pages/pages-scheme-dark/[[...path]].tsx @@ -1,5 +1,3 @@ -/* eslint-disable react/react-in-jsx-scope */ - import Studio from '../../app/Studio' export default function StudioPage() { diff --git a/dev/test-next-studio/pages/pages-scheme-light/[[...path]].tsx b/dev/test-next-studio/pages/pages-scheme-light/[[...path]].tsx index 1f863766267e..36ee55d222e0 100644 --- a/dev/test-next-studio/pages/pages-scheme-light/[[...path]].tsx +++ b/dev/test-next-studio/pages/pages-scheme-light/[[...path]].tsx @@ -1,5 +1,3 @@ -/* eslint-disable react/react-in-jsx-scope */ - import Studio from '../../app/Studio' export default function StudioPage() { diff --git a/dev/test-next-studio/pages/pages-scheme-system/[[...path]].tsx b/dev/test-next-studio/pages/pages-scheme-system/[[...path]].tsx index fdf77a09bd14..276be2f12f47 100644 --- a/dev/test-next-studio/pages/pages-scheme-system/[[...path]].tsx +++ b/dev/test-next-studio/pages/pages-scheme-system/[[...path]].tsx @@ -1,5 +1,3 @@ -/* eslint-disable react/react-in-jsx-scope */ - import Studio from '../../app/Studio' export default function StudioPage() {