chore: enable no-console eslint rule for tests and stories (#4816)
Re-enables no-console eslint rule in stories and tests files: - In stories, use `action` from '@storybook/addon-actions' or `fn` from '@storybook/test' instead of console. - In tests, console methods can be mocked like this: `global.console.error = jest.fn()`.
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import { Meta, StoryObj } from '@storybook/react';
|
||||
import { IconBell } from 'twenty-ui';
|
||||
|
||||
@ -12,8 +13,7 @@ const meta: Meta<typeof DraggableList> = {
|
||||
component: DraggableList,
|
||||
decorators: [ComponentDecorator],
|
||||
parameters: {
|
||||
// eslint-disable-next-line no-console
|
||||
onDragEnd: () => console.log('dragged'),
|
||||
onDragEnd: action('dragged'),
|
||||
},
|
||||
argTypes: {
|
||||
draggableItems: { control: false },
|
||||
|
||||
Reference in New Issue
Block a user