Skip to content

Commit

Permalink
chore: apply new react linter rules
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan committed Oct 24, 2023
1 parent f81e301 commit 88c9c62
Show file tree
Hide file tree
Showing 23 changed files with 3 additions and 40 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down
2 changes: 1 addition & 1 deletion dev/starter-cra-studio/src/Studio.js
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -29,5 +28,6 @@ const config = defineConfig({
})

export function CraStudio() {
// eslint-disable-next-line react/react-in-jsx-scope
return <Studio config={config} />
}
2 changes: 0 additions & 2 deletions dev/starter-next-studio/components/Studio.tsx
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
2 changes: 0 additions & 2 deletions dev/starter-next-studio/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 0 additions & 2 deletions dev/starter-next-studio/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable react/react-in-jsx-scope */

import Link from 'next/link'

export default function IndexPage() {
Expand Down
2 changes: 0 additions & 2 deletions dev/starter-next-studio/pages/studio/[[...tool]].tsx
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
2 changes: 0 additions & 2 deletions dev/test-next-studio/app/Studio.tsx
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
2 changes: 0 additions & 2 deletions dev/test-next-studio/app/app-defaults/[[...path]]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable react/react-in-jsx-scope */

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

export default function StudioPage() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable react/react-in-jsx-scope */

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

export default function StudioPage() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable react/react-in-jsx-scope */

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

export default function StudioPage() {
Expand Down
2 changes: 0 additions & 2 deletions dev/test-next-studio/app/app-scheme-dark/[[...path]]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable react/react-in-jsx-scope */

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

export default function StudioPage() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable react/react-in-jsx-scope */

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

export default function StudioPage() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable react/react-in-jsx-scope */

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

export default function StudioPage() {
Expand Down
1 change: 0 additions & 1 deletion dev/test-next-studio/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
1 change: 0 additions & 1 deletion dev/test-next-studio/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable react/react-in-jsx-scope */
import Link from 'next/link'

const links = [
Expand Down
2 changes: 0 additions & 2 deletions dev/test-next-studio/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 0 additions & 1 deletion dev/test-next-studio/pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable react/react-in-jsx-scope */
import Document, {type DocumentContext} from 'next/document'
import {ServerStyleSheet} from 'styled-components'

Expand Down
2 changes: 0 additions & 2 deletions dev/test-next-studio/pages/pages-defaults/[[...path]].tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable react/react-in-jsx-scope */

import Studio from '../../app/Studio'

export default function StudioPage() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable react/react-in-jsx-scope */

import Studio from '../../app/Studio'

export default function StudioPage() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable react/react-in-jsx-scope */

import Studio from '../../app/Studio'

export default function StudioPage() {
Expand Down
2 changes: 0 additions & 2 deletions dev/test-next-studio/pages/pages-scheme-dark/[[...path]].tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable react/react-in-jsx-scope */

import Studio from '../../app/Studio'

export default function StudioPage() {
Expand Down
2 changes: 0 additions & 2 deletions dev/test-next-studio/pages/pages-scheme-light/[[...path]].tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable react/react-in-jsx-scope */

import Studio from '../../app/Studio'

export default function StudioPage() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable react/react-in-jsx-scope */

import Studio from '../../app/Studio'

export default function StudioPage() {
Expand Down

0 comments on commit 88c9c62

Please sign in to comment.