chore: run lint and prettier on entire codebase
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user