Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ export default tseslint.config(
},
rules: {
...reactHooksPlugin.configs.recommended.rules,
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
args: 'none',
},
],
'@typescript-eslint/no-empty-object-type': 'off',
'jsx-a11y/no-autofocus': 'off',
'react/jsx-key': [2, { checkFragmentShorthand: true }],
Expand Down
1 change: 1 addition & 0 deletions packages/client/news/7395.internal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove unused imports present, due to missing rule in ESlint. @sneridagh
2 changes: 1 addition & 1 deletion packages/client/src/restapi/navroot/get.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ploneClient from '../../client';
import { afterEach, beforeEach, describe, expect, test } from 'vitest';
import { describe, expect, test } from 'vitest';
import type { RequestError } from '../types';

const cli = ploneClient.initialize({
Expand Down
1 change: 0 additions & 1 deletion packages/client/src/restapi/rules/update.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { afterEach, beforeEach, describe, expect, test } from 'vitest';

import PloneClient from '../../client';
import { v4 as uuid } from 'uuid';
import { createRule } from './create';

const cli = PloneClient.initialize({
apiPath: 'http://localhost:55001/plone',
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/restapi/users/update_password.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
setup,
teardown,
} from '../../utils/test';
import { afterEach, beforeEach, describe, expect, test } from 'vitest';
import { afterEach, beforeEach, describe, test } from 'vitest';
import PloneClient from '../../client';

const cli = PloneClient.initialize({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import { render, screen } from '@testing-library/react';
import { ControlPanelsList } from './ControlPanelsList';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
import { Link } from '@plone/components';
import config from '@plone/registry';
Expand Down
1 change: 0 additions & 1 deletion packages/cmsui/components/Field/Field.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import {
type FieldErrorProps,
Group,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import { render, screen, fireEvent } from '@testing-library/react';
import { describe, it, expect, vi, beforeEach } from 'vitest';
import { ObjectBrowserContent } from './ObjectBrowserContent';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Hook estratto dal codice originale di ObjectBrowserWidget.tsx
import { useFetcher } from 'react-router';
import { useAtomValue } from 'jotai';
import {
useCallback,
useMemo,
Expand All @@ -18,7 +17,6 @@ import {
processSelection,
initializeSelectedKeys,
type ObjectBrowserWidgetMode,
type WidgetPatternOptions,
useAccumulatedItems,
} from './utils';
import type { loader } from '../../routes/objectBrowserWidget';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import React from 'react';
import { GridListItem, Button } from '@plone/components/quanta';
import { Button } from '@plone/components/quanta';
import { CheckboxIcon, ChevronrightIcon } from '@plone/components/Icons';
import { flattenToAppURL } from '@plone/helpers';
import { useTranslation } from 'react-i18next';
import { getItemLabel, getContentIcon } from './utils';
import { getContentIcon } from './utils';
import type { Brain } from '@plone/types';
import { tv } from 'tailwind-variants';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import { render, screen, fireEvent } from '@testing-library/react';
import { describe, it, expect, vi, beforeEach } from 'vitest';
import { ObjectBrowserModal } from './ObjectBrowserModal';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import { Dialog, Heading } from 'react-aria-components';
import { Modal } from '@plone/components';
import { Button, Input } from '@plone/components/quanta';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import { render, screen, act } from '@testing-library/react';
import { describe, it, expect, beforeEach } from 'vitest';
import { describe, it, expect } from 'vitest';
import {
ObjectBrowserNavigationProvider,
useObjectBrowserNavigation,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Componente Button estratto dal widget originale
import React, { type PropsWithChildren } from 'react';
import { type PropsWithChildren } from 'react';
import { Icon } from '@plone/components';
import { Button } from '@plone/components/quanta';
import { useObjectBrowserContext } from './ObjectBrowserContext';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { describe, it, expect } from 'vitest';
import type { Brain } from '@plone/types';
import type { Selection } from 'react-aria-components';
import {
isAll,
buildObjectBrowserUrl,
Expand Down
1 change: 0 additions & 1 deletion packages/cmsui/components/TextField/TextField.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import type { Meta, StoryObj } from '@storybook/react-vite';
import { Form } from 'react-aria-components';
import { Button } from '@plone/components/quanta';
Expand Down
1 change: 0 additions & 1 deletion packages/cmsui/components/TextField/TextField.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import {
TextField as AriaTextField,
type TextFieldProps as AriaTextFieldProps,
Expand Down
2 changes: 0 additions & 2 deletions packages/cmsui/config/controlpanels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ import type { Controlpanel } from '@plone/types';
// import linkSVG from '@plone/volto/icons/link.svg';
// import relationsSVG from '@plone/volto/icons/ahead.svg';

import config from '@plone/registry';

// export const controlPanelsIcons = {
// default: settingsSVG,
// 'dexterity-types': contentSVG,
Expand Down
1 change: 1 addition & 0 deletions packages/cmsui/news/7395.internal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove unused imports present, due to missing rule in ESlint. @sneridagh
1 change: 0 additions & 1 deletion packages/cmsui/routes/search.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { expect, describe, it, vi, afterEach } from 'vitest';
import { createRoutesStub, unstable_RouterContextProvider } from 'react-router';
import config from '@plone/registry';
import { loader } from './search';

Expand Down
1 change: 1 addition & 0 deletions packages/components/news/7395.internal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove unused imports present, due to missing rule in ESlint. @sneridagh
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
import React from 'react';
import { BlockToolbar } from './BlockToolbar';
import {
Button,
Checkbox,
Group,
Separator,
Text,
ToggleButton,
} from 'react-aria-components';
import { Group, Separator, Text, ToggleButton } from 'react-aria-components';
import { Menu, MenuItem } from '../Menu/Menu';

import { BoldIcon } from '../icons/BoldIcon';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { Breadcrumb, Breadcrumbs } from './Breadcrumbs.quanta';
import { Menu, MenuItem } from '../Menu/Menu.quanta';
import { Menu } from '../Menu/Menu.quanta';
import {
FolderIcon,
HomeIcon,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { ChevronrightIcon, HomeIcon } from '../../components/icons';
import { ChevronrightIcon } from '../../components/icons';
import {
Breadcrumbs as RACBreadcrumbs,
Breadcrumb as RACBreadcrumb,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import React, { useCallback, useState, useEffect, useRef } from 'react';
import React, { useCallback, useState, useEffect } from 'react';
import { CalendarIcon } from '../../components/icons/CalendarIcon';
import { CloseIcon } from '../../components/icons/CloseIcon';
import {
DatePicker as AriaDatePicker,
Group,
type DatePickerProps as AriaDatePickerProps,
type DateValue,
type ValidationResult,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ import {
type GridListItemProps,
type GridListProps,
} from 'react-aria-components';
import { tv, type ClassProp } from 'tailwind-variants';
import { tv } from 'tailwind-variants';
import { Checkbox } from '../Checkbox/Checkbox.quanta';
import { composeTailwindRenderProps, focusRing } from '../utils';
import { twMerge, type ClassNameValue } from 'tailwind-merge';
import clsx from 'clsx';
import { twMerge } from 'tailwind-merge';

export function GridList<T extends object>({
children,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from 'react';
import React from 'react';
import {
MultiSelect,
type Option,
Expand Down
1 change: 0 additions & 1 deletion packages/layout/components/Image/Image.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import type { ImgHTMLAttributes } from 'react';
import clsx from 'clsx';
import type { ImageScale, ContainedItem } from '@plone/types';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import SectionWrapper from './SectionWrapper';

import type { Meta, StoryObj } from '@storybook/react-vite';
Expand Down
1 change: 0 additions & 1 deletion packages/layout/components/Toast/Toast.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import Toast from './Toast';
import config from '@plone/registry';

Expand Down
1 change: 0 additions & 1 deletion packages/layout/config/slots.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { ConfigType } from '@plone/registry';
import App from '../components/App/App';
import Header from '../components/Header/Header';
import Main from '../components/Main';
import Footer from '../components/Footer';
Expand Down
2 changes: 1 addition & 1 deletion packages/layout/helpers/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { matchPath } from 'react-router';
import type { Content } from '@plone/types';
import type { Location, Path, PathPattern } from 'react-router';
import type { Location, PathPattern } from 'react-router';

export function RouteCondition(path: string | PathPattern) {
return ({ location }: { location: Location }) =>
Expand Down
1 change: 1 addition & 0 deletions packages/layout/news/7395.internal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove unused imports present, due to missing rule in ESlint. @sneridagh
1 change: 1 addition & 0 deletions packages/react-router/news/7395.internal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove unused imports present, due to missing rule in ESlint. @sneridagh
2 changes: 1 addition & 1 deletion packages/react-router/src/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it, afterEach, beforeEach } from 'vitest';
import { describe, expect, it } from 'vitest';
import { getAddonRoutesConfig } from './index';
import type { ReactRouterRouteEntry } from '@plone/types';

Expand Down
1 change: 1 addition & 0 deletions packages/registry/news/7395.internal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove unused imports present, due to missing rule in ESlint. @sneridagh
5 changes: 0 additions & 5 deletions packages/registry/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ import type {
ViewsConfig,
WidgetsConfig,
ReactRouterRouteEntry,
WidgetsConfigByFactory,
WidgetsConfigById,
WidgetsConfigByType,
WidgetsConfigByVocabulary,
WidgetsConfigByWidget,
WidgetKey,
} from '@plone/types';

Expand Down
2 changes: 1 addition & 1 deletion packages/registry/src/registry.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import config from './index';
import { describe, expect, it, afterEach, beforeEach, beforeAll } from 'vitest';
import { describe, expect, it, afterEach, beforeEach } from 'vitest';
import type { WidgetsConfig } from '@plone/types';

const MockDefaultWidget = () => <div data-testid="default-widget">Default</div>;
Expand Down
1 change: 0 additions & 1 deletion packages/registry/src/vite-plugin.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import { describe, expect, it } from 'vitest';
import { relativeToAbsoluteImportPlugin } from '../vite-plugin';

Expand Down
1 change: 1 addition & 0 deletions packages/types/news/7395.internal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove unused imports present, due to missing rule in ESlint. @sneridagh
1 change: 0 additions & 1 deletion packages/types/src/services/types.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type {
WidgetsConfigById,
WidgetsConfigByFactory,
WidgetsConfigByType,
WidgetsConfigByVocabulary,
Expand Down
Loading