Skip to content

Commit

Permalink
chore(eslint): fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
donskov committed Jan 13, 2025
1 parent 5cf5a96 commit deb4e75
Show file tree
Hide file tree
Showing 118 changed files with 1,811 additions and 619 deletions.
27 changes: 27 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,33 @@ export default tseslint.config([
next: 'export',
},
],
'@stylistic/jsx-max-props-per-line': [
'error',
{
maximum: 2,
},
],
'@stylistic/object-curly-newline': [
'error',
{
ObjectExpression: {
multiline: true,
minProperties: 1,
},
ObjectPattern: {
multiline: true,
minProperties: 1,
},
ImportDeclaration: {
multiline: true,
minProperties: 3,
},
ExportDeclaration: {
multiline: true,
minProperties: 3,
},
},
],
},
},
]);
4 changes: 3 additions & 1 deletion packages/react-components/.storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ const ThemeWrapper: Decorator = (story) => {
const preview: Preview = {
decorators: [ThemeWrapper],
parameters: {
actions: { argTypesRegex: '^on[A-Z].*' },
actions: {
argTypesRegex: '^on[A-Z].*',
},
darkMode: {
dark: themeDark,
light: themeLight,
Expand Down
4 changes: 3 additions & 1 deletion packages/react-components/src/Alert/alert.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ const meta: Meta<typeof Alert> = {
},
tags: ['autodocs'],
argTypes: {
children: { control: 'text' },
children: {
control: 'text',
},
},
};

Expand Down
16 changes: 12 additions & 4 deletions packages/react-components/src/Alert/alert.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import { Alert } from './index';

describe('<Alert />', () => {
it('should render with default styles', () => {
const { asFragment } = render(
const {
asFragment,
} = render(
<Alert>
Alert message
</Alert>,
Expand All @@ -14,7 +16,9 @@ describe('<Alert />', () => {
});

it('should pass className', () => {
const { asFragment } = render(
const {
asFragment,
} = render(
<Alert className="my-class-name">
Alert message
</Alert>,
Expand All @@ -34,7 +38,9 @@ describe('<Alert />', () => {
variants.forEach((variant) => {
describe(`variant "${variant}"`, () => {
it('enable icon', () => {
const { asFragment } = render(
const {
asFragment,
} = render(
<Alert variant={variant} disableIcon={false}>
Message
{variant}
Expand All @@ -45,7 +51,9 @@ describe('<Alert />', () => {
});

it('disable icon', () => {
const { asFragment } = render(
const {
asFragment,
} = render(
<Alert variant={variant} disableIcon>
Message
{variant}
Expand Down
Loading

0 comments on commit deb4e75

Please sign in to comment.