chore: run lint and prettier on entire codebase

This commit is contained in:
Alessio Gravili
2024-07-11 15:27:01 -04:00
parent f8ab5a9f1e
commit 83fd4c6622
364 changed files with 2578 additions and 2658 deletions

View File

@@ -8,9 +8,9 @@ import RichText from '../../_components/RichText/index.js'
import classes from './index.module.scss'
export const ArchiveBlock: React.FC<
ArchiveBlockProps & {
{
id?: string
}
} & ArchiveBlockProps
> = (props) => {
const {
id,

View File

@@ -11,9 +11,9 @@ import classes from './index.module.scss'
type Props = Extract<Exclude<Page['layout'], undefined>[0], { blockType: 'cta' }>
export const CallToActionBlock: React.FC<
Props & {
{
id?: string
}
} & Props
> = ({ invertBackground, links, richText }) => {
return (
<Gutter>

View File

@@ -10,9 +10,9 @@ import classes from './index.module.scss'
type Props = Extract<Exclude<Page['layout'], undefined>[0], { blockType: 'content' }>
export const ContentBlock: React.FC<
Props & {
{
id?: string
}
} & Props
> = (props) => {
const { columns } = props

View File

@@ -9,10 +9,10 @@ import { Media } from '../../_components/Media/index.js'
import RichText from '../../_components/RichText/index.js'
import classes from './index.module.scss'
type Props = Extract<Exclude<Page['layout'], undefined>[0], { blockType: 'mediaBlock' }> & {
type Props = {
id?: string
staticImage?: StaticImageData
}
} & Extract<Exclude<Page['layout'], undefined>[0], { blockType: 'mediaBlock' }>
export const MediaBlock: React.FC<Props> = (props) => {
const { media, position = 'default', staticImage } = props

View File

@@ -24,12 +24,12 @@ type Result = {
totalPages: number
}
export type Props = Omit<ArchiveBlockProps, 'blockType'> & {
export type Props = {
className?: string
onResultChange?: (result: Result) => void // eslint-disable-line no-unused-vars
onResultChange?: (result: Result) => void
showPageRange?: boolean
sort?: string
}
} & Omit<ArchiveBlockProps, 'blockType'>
export const CollectionArchiveByCollection: React.FC<Props> = (props) => {
const {

View File

@@ -5,10 +5,10 @@ import type { ArchiveBlockProps } from '../../_blocks/ArchiveBlock/types.js'
import { CollectionArchiveByCollection } from './PopulateByCollection/index.js'
import { CollectionArchiveBySelection } from './PopulateBySelection/index.js'
export type Props = Omit<ArchiveBlockProps, 'blockType'> & {
export type Props = {
className?: string
sort?: string
}
} & Omit<ArchiveBlockProps, 'blockType'>
export const CollectionArchive: React.FC<Props> = (props) => {
const { className, populateBy, selectedDocs } = props

View File

@@ -21,11 +21,7 @@ export const Media: React.FC<Props> = (props) => {
}
: {})}
>
{isVideo ? (
<Video {...props} />
) : (
<Image {...props} /> // eslint-disable-line
)}
{isVideo ? <Video {...props} /> : <Image {...props} />}
</Tag>
)
}

View File

@@ -5,7 +5,6 @@ import { Text } from 'slate'
import { CMSLink } from '../Link/index.js'
import { Media } from '../Media/index.js'
// eslint-disable-next-line no-use-before-define
type Children = Leaf[]
type Leaf = {

View File

@@ -1,11 +1,12 @@
import { rootEslintConfig, rootParserOptions } from '../../eslint.config.js'
import { rootParserOptions } from '../../eslint.config.js'
import testEslintConfig from '../eslint.config.js'
/** @typedef {import('eslint').Linter.FlatConfig} */
let FlatConfig
/** @type {FlatConfig[]} */
export const index = [
...rootEslintConfig,
...testEslintConfig,
{
languageOptions: {
parserOptions: {