chore: lint require and how to import react (#30041)

This commit is contained in:
Stephen Zhou
2025-12-23 18:02:10 +08:00
committed by GitHub
parent 72ca3607a3
commit 403adefc07
1078 changed files with 1680 additions and 1216 deletions

View File

@ -1,9 +1,7 @@
import fs from 'node:fs'
import path from 'node:path'
// Mock functions to simulate the check-i18n functionality
const vm = require('node:vm')
const transpile = require('typescript').transpile
import vm from 'node:vm'
import { transpile } from 'typescript'
describe('check-i18n script functionality', () => {
const testDir = path.join(__dirname, '../i18n-test')

View File

@ -1,5 +1,5 @@
import { fireEvent, render, screen, waitFor } from '@testing-library/react'
import React from 'react'
import * as React from 'react'
import CheckCode from '@/app/(shareLayout)/webapp-signin/check-code/page'
import MailAndPasswordAuth from '@/app/(shareLayout)/webapp-signin/components/mail-and-password-auth'

View File

@ -1,5 +1,5 @@
import { render, screen, waitFor } from '@testing-library/react'
import React from 'react'
import * as React from 'react'
import WebAppStoreProvider, { useWebAppStore } from '@/context/web-app-context'
import { AccessMode } from '@/models/access-control'

View File

@ -1,6 +1,6 @@
import type { ActionItem } from '../../app/components/goto-anything/actions/types'
import { fireEvent, render, screen } from '@testing-library/react'
import React from 'react'
import * as React from 'react'
import CommandSelector from '../../app/components/goto-anything/command-selector'
vi.mock('cmdk', () => ({

View File

@ -1,5 +1,5 @@
import { render, screen } from '@testing-library/react'
import React from 'react'
import * as React from 'react'
// Type alias for search mode
type SearchMode = 'scopes' | 'commands' | null

View File

@ -6,7 +6,7 @@
*/
import { render, screen } from '@testing-library/react'
import React from 'react'
import * as React from 'react'
// Mock environment variables before importing constants
const originalEnv = process.env.NEXT_PUBLIC_MAX_PARALLEL_LIMIT

View File

@ -6,7 +6,7 @@
*/
import { cleanup, render } from '@testing-library/react'
import React from 'react'
import * as React from 'react'
import BlockInput from '../app/components/base/block-input'
import SupportVarInput from '../app/components/workflow/nodes/_base/components/support-var-input'