From b86e3510075884ca15fd9cf8c260e805848b9d6b Mon Sep 17 00:00:00 2001 From: orangecoding Date: Mon, 16 Feb 2026 13:50:50 +0100 Subject: [PATCH] fixing lint even harder --- eslint.config.js | 80 +++---------------- lib/services/extractor/puppeteerExtractor.js | 2 +- .../sql/1.create-fredy-base-structure.js | 4 +- package.json | 2 +- ui/src/Index.jsx | 2 - ui/src/components/ListingDeletionModal.jsx | 2 +- ui/src/components/cards/KpiCard.jsx | 1 - ui/src/components/footer/FredyFooter.jsx | 1 - ui/src/components/grid/jobs/JobGrid.jsx | 2 +- .../components/grid/listings/ListingsGrid.jsx | 2 +- ui/src/components/headline/Headline.jsx | 1 - ui/src/components/logo/Logo.jsx | 1 - ui/src/components/logout/Logout.jsx | 1 - ui/src/components/navigation/Navigation.jsx | 2 +- .../permission/InsufficientPermission.jsx | 1 - .../permission/PermissionAwareRoute.jsx | 2 - ui/src/components/placeholder/Placeholder.jsx | 2 - ui/src/components/segment/SegmentPart.jsx | 1 - .../table/NotificationAdapterTable.jsx | 2 - ui/src/components/table/ProviderTable.jsx | 2 - ui/src/components/table/UserTable.jsx | 2 - ui/src/components/tracking/TrackingModal.jsx | 1 - ui/src/components/version/VersionBanner.jsx | 1 - ui/src/views/jobs/Jobs.jsx | 2 - ui/src/views/jobs/mutation/JobMutation.jsx | 2 +- .../NotificationAdapterMutator.jsx | 2 +- .../NotificationHelpDisplay.jsx | 1 - .../components/provider/ProviderMutator.jsx | 2 +- ui/src/views/listings/ListingDetail.jsx | 2 +- ui/src/views/listings/Listings.jsx | 2 - ui/src/views/listings/Map.jsx | 2 +- .../management/WatchlistManagement.jsx | 2 +- ui/src/views/user/UserRemovalModal.jsx | 1 - ui/src/views/userSettings/UserSettings.jsx | 2 +- yarn.lock | 10 +-- 35 files changed, 32 insertions(+), 115 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index b002e0d..29c93e2 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -8,20 +8,20 @@ import js from '@eslint/js'; import prettier from 'eslint-config-prettier'; import globals from 'globals'; import react from 'eslint-plugin-react'; -import babelParser from '@babel/eslint-parser'; export default [ { - files: ['**/*.{js,jsx,ts,tsx}'], ignores: ['**/node_modules/**', '**/dist/**', '**/build/**', '**/public/**', 'db/**', 'conf/**'], }, - js.configs.recommended, - prettier, + { + files: ['**/*.{js,jsx}'], languageOptions: { - parser: babelParser, + ecmaVersion: 'latest', sourceType: 'module', - ecmaVersion: 2021, + parserOptions: { + ecmaFeatures: { jsx: true }, + }, globals: { ...globals.browser, ...globals.node, @@ -32,70 +32,14 @@ export default [ after: 'readonly', it: 'readonly', }, - parserOptions: { requireConfigFile: false }, }, plugins: { react }, - rules: { - eqeqeq: [2, 'allow-null'], - strict: 0, - 'no-redeclare': [2, { builtinGlobals: false }], - 'class-methods-use-this': 'off', - indent: ['off', 2], - 'linebreak-style': ['error', 'unix'], - quotes: ['error', 'single', { avoidEscape: true, allowTemplateLiterals: true }], - semi: ['error', 'always'], - 'no-console': ['error', { allow: ['warn', 'error'] }], - 'jsx-quotes': ['error', 'prefer-double'], - 'react/display-name': 'off', - 'react/forbid-prop-types': 'off', - 'react/jsx-closing-bracket-location': 'off', - 'react/jsx-curly-spacing': 'off', - 'react/jsx-handler-names': ['off', { eventHandlerPrefix: 'handle', eventHandlerPropPrefix: 'on' }], - 'react/jsx-indent-props': 'off', - 'react/jsx-key': 'off', - 'react/jsx-max-props-per-line': 'off', - 'react/jsx-no-bind': ['error', { ignoreRefs: true, allowArrowFunctions: true, allowBind: false }], - 'react/jsx-no-duplicate-props': ['error', { ignoreCase: true }], - 'react/jsx-no-literals': 'off', - 'react/jsx-no-undef': 'error', - 'react/jsx-pascal-case': ['error', { allowAllCaps: true, ignore: [] }], - 'react/sort-prop-types': ['off', { ignoreCase: true, callbacksLast: false, requiredFirst: false }], - 'react/jsx-sort-prop-types': 'off', - 'react/jsx-sort-props': 'off', - 'react/jsx-uses-react': 'error', - 'react/jsx-uses-vars': 'error', - 'react/no-danger': 'warn', - 'react/no-deprecated': 'error', - 'react/no-did-mount-set-state': 'error', - 'react/no-did-update-set-state': 'warn', - 'react/no-direct-mutation-state': 'off', - 'react/no-is-mounted': 'error', - 'react/no-set-state': 'off', - 'react/no-string-refs': 'warn', - 'react/no-unknown-property': 'error', - 'react/prop-types': ['error', { ignore: [], customValidators: [], skipUndeclared: true }], - 'react/react-in-jsx-scope': 'error', - 'react/require-extension': 'off', - 'react/require-render-return': 'error', - 'react/self-closing-comp': 'warn', - 'react/sort-comp': 'off', - 'react/jsx-wrap-multilines': ['warn', { declaration: true, assignment: true, return: true }], - 'react/wrap-multilines': 'off', - 'react/jsx-first-prop-new-line': 'off', - 'react/jsx-equals-spacing': ['warn', 'never'], - 'react/jsx-no-target-blank': 'error', - 'react/jsx-filename-extension': ['error', { extensions: ['.jsx'] }], - 'react/jsx-no-comment-textnodes': 'error', - 'react/no-comment-textnodes': 'off', - 'react/no-render-return-value': 'error', - 'react/require-optimization': ['off', { allowDecorators: [] }], - 'react/no-find-dom-node': 'warn', - 'react/forbid-component-props': ['off', { forbid: [] }], - 'react/no-danger-with-children': 'error', - 'react/no-unused-prop-types': ['warn', { customValidators: [], skipShapeProps: true }], - 'react/style-prop-object': 'error', - 'react/no-children-prop': 'warn', - }, settings: { react: { version: 'detect' } }, + rules: { + ...js.configs.recommended.rules, + 'no-console': ['error', { allow: ['warn', 'error'] }], + }, }, + + prettier, ]; diff --git a/lib/services/extractor/puppeteerExtractor.js b/lib/services/extractor/puppeteerExtractor.js index 818d319..3db7130 100644 --- a/lib/services/extractor/puppeteerExtractor.js +++ b/lib/services/extractor/puppeteerExtractor.js @@ -22,7 +22,7 @@ puppeteer.use(StealthPlugin()); export default async function execute(url, waitForSelector, options) { let browser; let page; - let result = null; + let result; let userDataDir; let removeUserDataDir = false; try { diff --git a/lib/services/storage/migrations/sql/1.create-fredy-base-structure.js b/lib/services/storage/migrations/sql/1.create-fredy-base-structure.js index 89b7430..82948b4 100644 --- a/lib/services/storage/migrations/sql/1.create-fredy-base-structure.js +++ b/lib/services/storage/migrations/sql/1.create-fredy-base-structure.js @@ -88,7 +88,7 @@ export function up(db) { } } catch (e) { // If parsing fails, let it throw to rollback the migration - throw new Error(`Failed to import users from ${usersJsonPath}: ${e.message}`); + throw new Error(`Failed to import users from ${usersJsonPath}: ${e.message}`, { cause: e }); } } @@ -116,7 +116,7 @@ export function up(db) { } } } catch (e) { - throw new Error(`Failed to import jobs from ${jobsJsonPath}: ${e.message}`); + throw new Error(`Failed to import jobs from ${jobsJsonPath}: ${e.message}`, { cause: e }); } } } diff --git a/package.json b/package.json index b8e37af..1cf91e8 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fredy", - "version": "19.3.8", + "version": "19.3.9", "description": "[F]ind [R]eal [E]states [d]amn eas[y].", "scripts": { "prepare": "husky", diff --git a/ui/src/Index.jsx b/ui/src/Index.jsx index 187dbb3..7cac7bc 100644 --- a/ui/src/Index.jsx +++ b/ui/src/Index.jsx @@ -3,8 +3,6 @@ * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause */ -import React from 'react'; - import { HashRouter } from 'react-router-dom'; import { createRoot } from 'react-dom/client'; import en_US from '@douyinfe/semi-ui-19/lib/es/locale/source/en_US'; diff --git a/ui/src/components/ListingDeletionModal.jsx b/ui/src/components/ListingDeletionModal.jsx index 9549964..224da03 100644 --- a/ui/src/components/ListingDeletionModal.jsx +++ b/ui/src/components/ListingDeletionModal.jsx @@ -3,7 +3,7 @@ * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause */ -import React, { useState } from 'react'; +import { useState } from 'react'; import { Modal, Radio, RadioGroup, Typography } from '@douyinfe/semi-ui-19'; const { Text } = Typography; diff --git a/ui/src/components/cards/KpiCard.jsx b/ui/src/components/cards/KpiCard.jsx index f96435e..7386768 100644 --- a/ui/src/components/cards/KpiCard.jsx +++ b/ui/src/components/cards/KpiCard.jsx @@ -3,7 +3,6 @@ * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause */ -import React from 'react'; import { Card, Typography, Space } from '@douyinfe/semi-ui-19'; import './DashboardCard.less'; diff --git a/ui/src/components/footer/FredyFooter.jsx b/ui/src/components/footer/FredyFooter.jsx index ea8b9a1..fe6f6f8 100644 --- a/ui/src/components/footer/FredyFooter.jsx +++ b/ui/src/components/footer/FredyFooter.jsx @@ -3,7 +3,6 @@ * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause */ -import React from 'react'; import './FredyFooter.less'; import { useSelector } from '../../services/state/store.js'; import { Typography, Layout, Space, Divider } from '@douyinfe/semi-ui-19'; diff --git a/ui/src/components/grid/jobs/JobGrid.jsx b/ui/src/components/grid/jobs/JobGrid.jsx index a82663e..3b763c1 100644 --- a/ui/src/components/grid/jobs/JobGrid.jsx +++ b/ui/src/components/grid/jobs/JobGrid.jsx @@ -3,7 +3,7 @@ * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause */ -import React, { useState, useEffect, useMemo, useRef } from 'react'; +import { useState, useEffect, useMemo, useRef } from 'react'; import { Card, Col, diff --git a/ui/src/components/grid/listings/ListingsGrid.jsx b/ui/src/components/grid/listings/ListingsGrid.jsx index 8d9ca30..d555db2 100644 --- a/ui/src/components/grid/listings/ListingsGrid.jsx +++ b/ui/src/components/grid/listings/ListingsGrid.jsx @@ -3,7 +3,7 @@ * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause */ -import React, { useState, useEffect, useMemo } from 'react'; +import { useState, useEffect, useMemo } from 'react'; import { Card, Col, diff --git a/ui/src/components/headline/Headline.jsx b/ui/src/components/headline/Headline.jsx index 7bb1ef5..2ccdfc7 100644 --- a/ui/src/components/headline/Headline.jsx +++ b/ui/src/components/headline/Headline.jsx @@ -3,7 +3,6 @@ * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause */ -import React from 'react'; import { Typography } from '@douyinfe/semi-ui-19'; export default function Headline({ text, size = 3 } = {}) { diff --git a/ui/src/components/logo/Logo.jsx b/ui/src/components/logo/Logo.jsx index 3014f29..1981a6c 100644 --- a/ui/src/components/logo/Logo.jsx +++ b/ui/src/components/logo/Logo.jsx @@ -3,7 +3,6 @@ * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause */ -import React from 'react'; import logo from '../../assets/logo.png'; import logoWhite from '../../assets/logo_white.png'; diff --git a/ui/src/components/logout/Logout.jsx b/ui/src/components/logout/Logout.jsx index 737a801..231285a 100644 --- a/ui/src/components/logout/Logout.jsx +++ b/ui/src/components/logout/Logout.jsx @@ -3,7 +3,6 @@ * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause */ -import React from 'react'; import { Button } from '@douyinfe/semi-ui-19'; import { xhrPost } from '../../services/xhr'; import { IconUser } from '@douyinfe/semi-icons'; diff --git a/ui/src/components/navigation/Navigation.jsx b/ui/src/components/navigation/Navigation.jsx index 5823fa0..eda88e9 100644 --- a/ui/src/components/navigation/Navigation.jsx +++ b/ui/src/components/navigation/Navigation.jsx @@ -3,7 +3,7 @@ * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause */ -import React, { useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; import { Button, Nav } from '@douyinfe/semi-ui-19'; import { IconStar, IconSetting, IconTerminal, IconHistogram, IconSidebar } from '@douyinfe/semi-icons'; import logoWhite from '../../assets/logo_white.png'; diff --git a/ui/src/components/permission/InsufficientPermission.jsx b/ui/src/components/permission/InsufficientPermission.jsx index ffa2229..a357b7f 100644 --- a/ui/src/components/permission/InsufficientPermission.jsx +++ b/ui/src/components/permission/InsufficientPermission.jsx @@ -3,7 +3,6 @@ * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause */ -import React from 'react'; import insufficientPermission from '../../assets/insufficient_permission.png'; export default function InsufficientPermission() { diff --git a/ui/src/components/permission/PermissionAwareRoute.jsx b/ui/src/components/permission/PermissionAwareRoute.jsx index 88ca1ba..5aec04f 100644 --- a/ui/src/components/permission/PermissionAwareRoute.jsx +++ b/ui/src/components/permission/PermissionAwareRoute.jsx @@ -3,8 +3,6 @@ * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause */ -import React from 'react'; - import { Navigate } from 'react-router-dom'; export default function PermissionAwareRoute({ currentUser, children }) { diff --git a/ui/src/components/placeholder/Placeholder.jsx b/ui/src/components/placeholder/Placeholder.jsx index 7a58186..05494c2 100644 --- a/ui/src/components/placeholder/Placeholder.jsx +++ b/ui/src/components/placeholder/Placeholder.jsx @@ -3,8 +3,6 @@ * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause */ -import React from 'react'; - import './Placeholder.less'; function getPlaceholder(rowCount, className) { diff --git a/ui/src/components/segment/SegmentPart.jsx b/ui/src/components/segment/SegmentPart.jsx index b14c5f4..0ad0425 100644 --- a/ui/src/components/segment/SegmentPart.jsx +++ b/ui/src/components/segment/SegmentPart.jsx @@ -3,7 +3,6 @@ * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause */ -import React from 'react'; import { Card } from '@douyinfe/semi-ui-19'; import './SegmentParts.less'; diff --git a/ui/src/components/table/NotificationAdapterTable.jsx b/ui/src/components/table/NotificationAdapterTable.jsx index 0bebd8d..7cfee26 100644 --- a/ui/src/components/table/NotificationAdapterTable.jsx +++ b/ui/src/components/table/NotificationAdapterTable.jsx @@ -3,8 +3,6 @@ * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause */ -import React from 'react'; - import { Empty, Table, Button } from '@douyinfe/semi-ui-19'; import { IconDelete, IconEdit } from '@douyinfe/semi-icons'; diff --git a/ui/src/components/table/ProviderTable.jsx b/ui/src/components/table/ProviderTable.jsx index 4da52cd..a1c52a2 100644 --- a/ui/src/components/table/ProviderTable.jsx +++ b/ui/src/components/table/ProviderTable.jsx @@ -3,8 +3,6 @@ * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause */ -import React from 'react'; - import { Empty, Table, Button } from '@douyinfe/semi-ui-19'; import { IconDelete, IconEdit } from '@douyinfe/semi-icons'; import { Typography } from '@douyinfe/semi-ui'; diff --git a/ui/src/components/table/UserTable.jsx b/ui/src/components/table/UserTable.jsx index 8c0e3a5..b61195f 100644 --- a/ui/src/components/table/UserTable.jsx +++ b/ui/src/components/table/UserTable.jsx @@ -3,8 +3,6 @@ * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause */ -import React from 'react'; - import { IllustrationNoResult, IllustrationNoResultDark } from '@douyinfe/semi-illustrations'; import { format } from '../../services/time/timeService'; import { Table, Button, Empty } from '@douyinfe/semi-ui-19'; diff --git a/ui/src/components/tracking/TrackingModal.jsx b/ui/src/components/tracking/TrackingModal.jsx index bc328a4..0e5d1e3 100644 --- a/ui/src/components/tracking/TrackingModal.jsx +++ b/ui/src/components/tracking/TrackingModal.jsx @@ -3,7 +3,6 @@ * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause */ -import React from 'react'; import { Modal } from '@douyinfe/semi-ui-19'; import Logo from '../logo/Logo.jsx'; import { xhrPost } from '../../services/xhr.js'; diff --git a/ui/src/components/version/VersionBanner.jsx b/ui/src/components/version/VersionBanner.jsx index 3d57a09..da56fc0 100644 --- a/ui/src/components/version/VersionBanner.jsx +++ b/ui/src/components/version/VersionBanner.jsx @@ -3,7 +3,6 @@ * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause */ -import React from 'react'; import { Collapse, Descriptions } from '@douyinfe/semi-ui-19'; import { useSelector } from '../../services/state/store.js'; import { MarkdownRender } from '@douyinfe/semi-ui-19'; diff --git a/ui/src/views/jobs/Jobs.jsx b/ui/src/views/jobs/Jobs.jsx index a0a0f0b..8b6255a 100644 --- a/ui/src/views/jobs/Jobs.jsx +++ b/ui/src/views/jobs/Jobs.jsx @@ -3,8 +3,6 @@ * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause */ -import React from 'react'; - import JobGrid from '../../components/grid/jobs/JobGrid.jsx'; import './Jobs.less'; diff --git a/ui/src/views/jobs/mutation/JobMutation.jsx b/ui/src/views/jobs/mutation/JobMutation.jsx index 5caa9f7..002d249 100644 --- a/ui/src/views/jobs/mutation/JobMutation.jsx +++ b/ui/src/views/jobs/mutation/JobMutation.jsx @@ -3,7 +3,7 @@ * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause */ -import React, { Fragment, useState } from 'react'; +import { Fragment, useState } from 'react'; import NotificationAdapterMutator from './components/notificationAdapter/NotificationAdapterMutator'; import NotificationAdapterTable from '../../../components/table/NotificationAdapterTable'; diff --git a/ui/src/views/jobs/mutation/components/notificationAdapter/NotificationAdapterMutator.jsx b/ui/src/views/jobs/mutation/components/notificationAdapter/NotificationAdapterMutator.jsx index 2ff301d..fd19e16 100644 --- a/ui/src/views/jobs/mutation/components/notificationAdapter/NotificationAdapterMutator.jsx +++ b/ui/src/views/jobs/mutation/components/notificationAdapter/NotificationAdapterMutator.jsx @@ -3,7 +3,7 @@ * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause */ -import React, { useState } from 'react'; +import { useState } from 'react'; import { transform } from '../../../../../services/transformer/notificationAdapterTransformer'; import { xhrPost } from '../../../../../services/xhr'; diff --git a/ui/src/views/jobs/mutation/components/notificationAdapter/NotificationHelpDisplay.jsx b/ui/src/views/jobs/mutation/components/notificationAdapter/NotificationHelpDisplay.jsx index 87099b0..4ee1e60 100644 --- a/ui/src/views/jobs/mutation/components/notificationAdapter/NotificationHelpDisplay.jsx +++ b/ui/src/views/jobs/mutation/components/notificationAdapter/NotificationHelpDisplay.jsx @@ -3,7 +3,6 @@ * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause */ -import React from 'react'; import { Banner, MarkdownRender } from '@douyinfe/semi-ui-19'; export default function Help({ readme }) { diff --git a/ui/src/views/jobs/mutation/components/provider/ProviderMutator.jsx b/ui/src/views/jobs/mutation/components/provider/ProviderMutator.jsx index 4d1992b..db9d96b 100644 --- a/ui/src/views/jobs/mutation/components/provider/ProviderMutator.jsx +++ b/ui/src/views/jobs/mutation/components/provider/ProviderMutator.jsx @@ -3,7 +3,7 @@ * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause */ -import React, { useState, useEffect } from 'react'; +import { useState, useEffect } from 'react'; import { Banner, Modal, Select, Input } from '@douyinfe/semi-ui-19'; import { transform } from '../../../../../services/transformer/providerTransformer'; diff --git a/ui/src/views/listings/ListingDetail.jsx b/ui/src/views/listings/ListingDetail.jsx index d23494d..24bd81f 100644 --- a/ui/src/views/listings/ListingDetail.jsx +++ b/ui/src/views/listings/ListingDetail.jsx @@ -3,7 +3,7 @@ * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause */ -import React, { useEffect, useRef, useState } from 'react'; +import { useEffect, useRef, useState } from 'react'; import { useParams, useNavigate } from 'react-router-dom'; import { useSelector, useActions } from '../../services/state/store.js'; import { diff --git a/ui/src/views/listings/Listings.jsx b/ui/src/views/listings/Listings.jsx index f670020..1c2c2fd 100644 --- a/ui/src/views/listings/Listings.jsx +++ b/ui/src/views/listings/Listings.jsx @@ -3,8 +3,6 @@ * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause */ -import React from 'react'; - import ListingsGrid from '../../components/grid/listings/ListingsGrid.jsx'; export default function Listings() { diff --git a/ui/src/views/listings/Map.jsx b/ui/src/views/listings/Map.jsx index 5d66b2d..40f3238 100644 --- a/ui/src/views/listings/Map.jsx +++ b/ui/src/views/listings/Map.jsx @@ -3,7 +3,7 @@ * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause */ -import React, { useEffect, useRef, useState } from 'react'; +import { useEffect, useRef, useState } from 'react'; import { renderToString } from 'react-dom/server'; import maplibregl from 'maplibre-gl'; import 'maplibre-gl/dist/maplibre-gl.css'; diff --git a/ui/src/views/listings/management/WatchlistManagement.jsx b/ui/src/views/listings/management/WatchlistManagement.jsx index 85e8e17..6bc2339 100644 --- a/ui/src/views/listings/management/WatchlistManagement.jsx +++ b/ui/src/views/listings/management/WatchlistManagement.jsx @@ -3,7 +3,7 @@ * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause */ -import React, { useState } from 'react'; +import { useState } from 'react'; import { IconHorn } from '@douyinfe/semi-icons'; import { SegmentPart } from '../../../components/segment/SegmentPart.jsx'; import { Banner, Button, Checkbox, Space } from '@douyinfe/semi-ui-19'; diff --git a/ui/src/views/user/UserRemovalModal.jsx b/ui/src/views/user/UserRemovalModal.jsx index 018d4c1..f3f06c1 100644 --- a/ui/src/views/user/UserRemovalModal.jsx +++ b/ui/src/views/user/UserRemovalModal.jsx @@ -3,7 +3,6 @@ * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause */ -import React from 'react'; import { Modal } from '@douyinfe/semi-ui-19'; const UserRemovalModal = function UserRemovalModal({ onOk, onCancel }) { return ( diff --git a/ui/src/views/userSettings/UserSettings.jsx b/ui/src/views/userSettings/UserSettings.jsx index a41df26..a82cf9e 100644 --- a/ui/src/views/userSettings/UserSettings.jsx +++ b/ui/src/views/userSettings/UserSettings.jsx @@ -3,7 +3,7 @@ * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause */ -import React, { useEffect, useState, useMemo } from 'react'; +import { useEffect, useState, useMemo } from 'react'; import { Divider, Button, AutoComplete, Toast, Banner } from '@douyinfe/semi-ui-19'; import { IconSave, IconHome } from '@douyinfe/semi-icons'; import { useSelector, useActions } from '../../services/state/store'; diff --git a/yarn.lock b/yarn.lock index 08dfcc3..c0c3ea2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -48,7 +48,7 @@ "@babel/eslint-parser@7.28.6": version "7.28.6" - resolved "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.28.6.tgz" + resolved "https://registry.yarnpkg.com/@babel/eslint-parser/-/eslint-parser-7.28.6.tgz#6a294a4add732ebe7ded8a8d2792dd03dd81dc3f" integrity sha512-QGmsKi2PBO/MHSQk+AAgA9R6OHQr+VqnniFE0eMWZcVcfBZoA2dKn2hUsl3Csg/Plt9opRUWdY7//VXsrIlEiA== dependencies: "@nicolo-ribaudo/eslint-scope-5-internals" "5.1.1-v1" @@ -1460,7 +1460,7 @@ "@nicolo-ribaudo/eslint-scope-5-internals@5.1.1-v1": version "5.1.1-v1" - resolved "https://registry.npmjs.org/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz" + resolved "https://registry.yarnpkg.com/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz#dbf733a965ca47b1973177dc0bb6c889edcfb129" integrity sha512-54/JRvkLIzzDWshCWfuhadfrfZVPiElY8Fcgmg1HroEly/EDSszzhBAsarCux+D/kOslTRquNzuyGSmUSTTHGg== dependencies: eslint-scope "5.1.1" @@ -3371,7 +3371,7 @@ eslint-plugin-react@7.37.5: eslint-scope@5.1.1: version "5.1.1" - resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== dependencies: esrecurse "^4.3.0" @@ -3389,7 +3389,7 @@ eslint-scope@^9.1.0: eslint-visitor-keys@^2.1.0: version "2.1.0" - resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== eslint-visitor-keys@^3.4.3: @@ -3473,7 +3473,7 @@ esrecurse@^4.3.0: estraverse@^4.1.1: version "4.3.0" - resolved "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== estraverse@^5.1.0, estraverse@^5.2.0, estraverse@^5.3.0: