Feat: Run eslint when the project is running to standardize everyone's code #9377 (#9379)

### What problem does this PR solve?

Feat: Run eslint when the project is running to standardize everyone's
code #9377

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-08-11 15:31:38 +08:00
committed by GitHub
parent f022504ef9
commit a060672b31
62 changed files with 330 additions and 179 deletions

View File

@ -5,7 +5,7 @@ import {
PasswordIcon,
ProfileIcon,
TeamIcon,
} from '@/assets/icon/Icon';
} from '@/assets/icon/next-icon';
import { IconFont } from '@/components/icon-font';
import { LLMFactory } from '@/constants/llm';
import { UserSettingRouteKey } from '@/constants/setting';

View File

@ -1,5 +1,5 @@
import { translationTable } from '@/locales/config';
import TranslationTable from './TranslationTable';
import TranslationTable from './translation-table';
function UserSettingLocale() {
return (

View File

@ -46,7 +46,7 @@ const AzureOpenAIModal = ({
{ value: 'image2text', label: 'image2text' },
],
};
const getOptions = (factory: string) => {
const getOptions = () => {
return optionsMap.Default;
};
const handleKeyDown = async (e: React.KeyboardEvent) => {
@ -132,7 +132,7 @@ const AzureOpenAIModal = ({
type: 'number',
message: t('maxTokensInvalidMessage'),
},
({ getFieldValue }) => ({
({}) => ({
validator(_, value) {
if (value < 0) {
return Promise.reject(new Error(t('maxTokensMinMessage')));

View File

@ -121,7 +121,7 @@ const BedrockModal = ({
type: 'number',
message: t('maxTokensInvalidMessage'),
},
({ getFieldValue }) => ({
({}) => ({
validator(_, value) {
if (value < 0) {
return Promise.reject(new Error(t('maxTokensMinMessage')));

View File

@ -103,7 +103,7 @@ const FishAudioModal = ({
type: 'number',
message: t('maxTokensInvalidMessage'),
},
({ getFieldValue }) => ({
({}) => ({
validator(_, value) {
if (value < 0) {
return Promise.reject(new Error(t('maxTokensMinMessage')));

View File

@ -110,7 +110,7 @@ const GoogleModal = ({
type: 'number',
message: t('maxTokensInvalidMessage'),
},
({ getFieldValue }) => ({
({}) => ({
validator(_, value) {
if (value < 0) {
return Promise.reject(new Error(t('maxTokensMinMessage')));

View File

@ -114,7 +114,6 @@ export const useSubmitOllama = () => {
const [initialValues, setInitialValues] = useState<
Partial<IAddLlmRequestBody> | undefined
>();
const [originalModelName, setOriginalModelName] = useState<string>('');
const { addLlm, loading } = useAddLlm();
const {
visible: llmAddingVisible,

View File

@ -1,7 +1,7 @@
import { useTranslate } from '@/hooks/common-hooks';
import { IModalProps } from '@/interfaces/common';
import { IAddLlmRequestBody } from '@/interfaces/request/llm';
import { Form, Input, Modal, Select } from 'antd';
import { Form, Input, Modal } from 'antd';
import omit from 'lodash/omit';
type FieldType = IAddLlmRequestBody & {
@ -10,8 +10,6 @@ type FieldType = IAddLlmRequestBody & {
hunyuan_sk: string;
};
const { Option } = Select;
const HunyuanModal = ({
visible,
hideModal,

View File

@ -34,7 +34,6 @@ import { CircleHelp } from 'lucide-react';
import { useCallback, useMemo } from 'react';
import SettingTitle from '../components/setting-title';
import { isLocalLlmFactory } from '../utils';
import TencentCloudModal from './Tencent-modal';
import ApiKeyModal from './api-key-modal';
import AzureOpenAIModal from './azure-openai-modal';
import BedrockModal from './bedrock-modal';
@ -58,6 +57,7 @@ import {
} from './hooks';
import HunyuanModal from './hunyuan-modal';
import styles from './index.less';
import TencentCloudModal from './next-tencent-modal';
import OllamaModal from './ollama-modal';
import SparkModal from './spark-modal';
import SystemModelSettingModal from './system-model-setting-modal';

View File

@ -140,7 +140,7 @@ const SparkModal = ({
type: 'number',
message: t('maxTokensInvalidMessage'),
},
({ getFieldValue }) => ({
({}) => ({
validator(_, value) {
if (value < 0) {
return Promise.reject(new Error(t('maxTokensMinMessage')));

View File

@ -113,7 +113,7 @@ const VolcEngineModal = ({
type: 'number',
message: t('maxTokensInvalidMessage'),
},
({ getFieldValue }) => ({
({}) => ({
validator(_, value) {
if (value < 0) {
return Promise.reject(new Error(t('maxTokensMinMessage')));

View File

@ -108,7 +108,7 @@ const YiyanModal = ({
type: 'number',
message: t('maxTokensInvalidMessage'),
},
({ getFieldValue }) => ({
({}) => ({
validator(_, value) {
if (value < 0) {
return Promise.reject(new Error(t('maxTokensMinMessage')));