Unverified Commit 69d42ae9 authored by Bowen Liang's avatar Bowen Liang Committed by GitHub

fix: cover missed source paths for eslint (#1956)

parent 5ff701ca
......@@ -10,20 +10,21 @@ export type WorkspacesContextValue = {
}
const WorkspacesContext = createContext<WorkspacesContextValue>({
workspaces: []
workspaces: [],
})
interface IWorkspaceProviderProps {
type IWorkspaceProviderProps = {
children: React.ReactNode
}
export const WorkspaceProvider = ({
children
children,
}: IWorkspaceProviderProps) => {
const { data } = useSWR({ url: '/workspaces' }, fetchWorkspaces)
return (
<WorkspacesContext.Provider value={{
workspaces: data?.workspaces || []
workspaces: data?.workspaces || [],
}}>
{children}
</WorkspacesContext.Provider>
......
This diff is collapsed.
import { createInstance } from 'i18next'
import resourcesToBackend from 'i18next-resources-to-backend'
import { initReactI18next } from 'react-i18next/initReactI18next'
import { Locale } from '.'
import type { Locale } from '.'
// https://locize.com/blog/next-13-app-dir-i18n/
const initI18next = async (lng: Locale, ns: string) => {
......@@ -21,6 +21,6 @@ export async function useTranslation(lng: Locale, ns = '', options: Record<strin
const i18nextInstance = await initI18next(lng, ns)
return {
t: i18nextInstance.getFixedT(lng, ns, options.keyPrefix),
i18n: i18nextInstance
i18n: i18nextInstance,
}
}
import { Locale } from '@/i18n'
import type { Locale } from '@/i18n'
export type ResponseHolder = {}
......@@ -6,7 +6,7 @@ export type ConversationItem = {
id: string
name: string
inputs: Record<string, any> | null
introduction: string,
introduction: string
}
export type SiteInfo = {
......
......@@ -24,6 +24,7 @@ const nextConfig = {
// Warning: This allows production builds to successfully complete even if
// your project has ESLint errors.
ignoreDuringBuilds: true,
dirs: ['app', 'bin', 'config', 'context', 'hooks', 'i18n', 'models', 'service', 'test', 'types', 'utils'],
},
typescript: {
// https://nextjs.org/docs/api-reference/next.config.js/ignoring-typescript-errors
......
......@@ -61,6 +61,6 @@ export const seedLog = () => {
},
get adminRate() {
return faker.datatype.number(5)
}
},
})
}
......@@ -2,8 +2,7 @@ import { Model, createServer } from 'miragejs'
import type { User } from '@/models/user'
import type { History } from '@/models/history'
import type { Log } from '@/models/log'
import { seedUser, seedHistory, seedLog } from '@/test/factories'
import { seedHistory, seedLog, seedUser } from '@/test/factories'
export function mockAPI() {
if (process.env.NODE_ENV === 'development') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment