Skip to content

Commit 39bf82c

Browse files
committed
Fix indent rules
Signed-off-by: Gerald Hoxha <gerald.hoxha@devoteam.com>
1 parent 37f73b2 commit 39bf82c

File tree

37 files changed

+718
-718
lines changed

37 files changed

+718
-718
lines changed

.storybook/main.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
import type { StorybookConfig } from '@storybook/react-vite';
22

33
const config: StorybookConfig = {
4-
"stories": [
5-
"../src/**/*.mdx",
6-
"../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"
7-
],
8-
"addons": [
9-
"@chromatic-com/storybook",
10-
"@storybook/addon-docs",
11-
"@storybook/addon-a11y",
12-
"@storybook/addon-vitest"
13-
],
14-
"framework": {
15-
"name": "@storybook/react-vite",
16-
"options": {}
17-
}
4+
"stories": [
5+
"../src/**/*.mdx",
6+
"../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"
7+
],
8+
"addons": [
9+
"@chromatic-com/storybook",
10+
"@storybook/addon-docs",
11+
"@storybook/addon-a11y",
12+
"@storybook/addon-vitest"
13+
],
14+
"framework": {
15+
"name": "@storybook/react-vite",
16+
"options": {}
17+
}
1818
};
1919
export default config;

.storybook/preview.ts

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,29 @@ import theme from '../src/core/theme';
44
import { ThemeProvider } from '@emotion/react';
55

66
const preview: Preview = {
7-
parameters: {
8-
controls: {
9-
matchers: {
10-
color: /(background|color)$/i,
11-
date: /Date$/i,
12-
},
13-
},
7+
parameters: {
8+
controls: {
9+
matchers: {
10+
color: /(background|color)$/i,
11+
date: /Date$/i,
12+
},
13+
},
1414

15-
a11y: {
16-
// 'todo' - show a11y violations in the test UI only
17-
// 'error' - fail CI on a11y violations
18-
// 'off' - skip a11y checks entirely
19-
test: 'todo',
20-
}
21-
},
22-
decorators: [
23-
withThemeFromJSXProvider({
24-
themes: {
25-
theme
26-
},
27-
Provider: ThemeProvider
28-
})
29-
]
15+
a11y: {
16+
// 'todo' - show a11y violations in the test UI only
17+
// 'error' - fail CI on a11y violations
18+
// 'off' - skip a11y checks entirely
19+
test: 'todo',
20+
}
21+
},
22+
decorators: [
23+
withThemeFromJSXProvider({
24+
themes: {
25+
theme
26+
},
27+
Provider: ThemeProvider
28+
})
29+
]
3030
};
3131

3232
export default preview;

eslint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default tseslint.config([
1212
globalIgnores(['dist', 'node_modules', 'public']),
1313
{
1414
rules: {
15-
"indent": ["error", 2, { "SwitchCase": 1 }],
15+
"indent": ["error", 4, { "SwitchCase": 2 }],
1616
"no-tabs": ["error"],
1717
"no-trailing-spaces": ["error"],
1818
"prefer-const": "error",

src/App.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import { Routes, Route } from 'react-router-dom';
22
import LibraryPage from './pages/LiberyPage';
33

44
function App() {
5-
return (
6-
<Routes>
7-
<Route index element={<LibraryPage />} />
8-
</Routes>
9-
);
5+
return (
6+
<Routes>
7+
<Route index element={<LibraryPage />} />
8+
</Routes>
9+
);
1010
}
1111

1212
export default App;

src/api/example.endpoints.ts

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,35 @@ import { axiosClient } from ".";
22

33

44
const createArneAIEndpoints = (getAuthHeaders: () => Promise<{ Authorization: string }>) => ({
5-
chatbot: {
6-
postChatMessage: async (data: { message: string }) => {
7-
try {
8-
const authHeader = await getAuthHeaders();
5+
chatbot: {
6+
postChatMessage: async (data: { message: string }) => {
7+
try {
8+
const authHeader = await getAuthHeaders();
99

10-
return axiosClient.post('https://example/endpoint', data, {
11-
headers: authHeader
12-
});
13-
} catch (error) {
14-
console.error('Failed to send chat message:', error);
15-
throw error;
16-
}
10+
return axiosClient.post('https://example/endpoint', data, {
11+
headers: authHeader
12+
});
13+
} catch (error) {
14+
console.error('Failed to send chat message:', error);
15+
throw error;
16+
}
17+
},
1718
},
18-
},
19-
history: {
20-
deleteAllHistory: async (id: string) => {
21-
try {
22-
const authHeader = await getAuthHeaders();
19+
history: {
20+
deleteAllHistory: async (id: string) => {
21+
try {
22+
const authHeader = await getAuthHeaders();
2323

24-
return axiosClient.delete('/example', {
25-
data: { id },
26-
headers: authHeader
27-
});
28-
} catch (error) {
29-
console.error('Failed to delete chat history:', error);
30-
throw error;
31-
}
24+
return axiosClient.delete('/example', {
25+
data: { id },
26+
headers: authHeader
27+
});
28+
} catch (error) {
29+
console.error('Failed to delete chat history:', error);
30+
throw error;
31+
}
32+
},
3233
},
33-
},
3434
});
3535

3636
export { createArneAIEndpoints };

src/api/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import axios from 'axios';
22

33
export const axiosClient = axios.create({
4-
baseURL: '',
5-
headers: {
6-
Accept: 'application/json',
7-
'Content-Type': 'application/json',
8-
},
4+
baseURL: '',
5+
headers: {
6+
Accept: 'application/json',
7+
'Content-Type': 'application/json',
8+
},
99
});

src/components/common/Layout/Header/Header.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ type Props = {
99
}
1010

1111
export default function BaseLayout({
12-
title = 'Title',
13-
subtitle = '',
14-
actions,
12+
title = 'Title',
13+
subtitle = '',
14+
actions,
1515
}: Props) {
16-
return (
17-
<S.Header role="banner">
18-
<div>
19-
<T.Heading3 bold>{title}</T.Heading3>
20-
<T.BodySmall>{subtitle}</T.BodySmall>
21-
</div>
22-
{actions}
23-
</S.Header>
24-
);
16+
return (
17+
<S.Header role="banner">
18+
<div>
19+
<T.Heading3 bold>{title}</T.Heading3>
20+
<T.BodySmall>{subtitle}</T.BodySmall>
21+
</div>
22+
{actions}
23+
</S.Header>
24+
);
2525
}

src/components/common/atoms/Button/Button.tsx

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,28 @@ type Props = {
2222
}
2323

2424
const Button: React.FC<Props> = ({
25-
onClick,
26-
text,
27-
color = 'primary',
28-
width,
29-
fullWidth = false,
30-
variant = 'filled',
31-
rounded = false,
32-
size = 'medium',
25+
onClick,
26+
text,
27+
color = 'primary',
28+
width,
29+
fullWidth = false,
30+
variant = 'filled',
31+
rounded = false,
32+
size = 'medium',
3333
}) => {
34-
return (
35-
<S.ButtonContainer
36-
onClick={onClick}
37-
color={color}
38-
width={width}
39-
fullWidth={fullWidth}
40-
variant={variant}
41-
rounded={rounded}
42-
size={size}
43-
>
44-
<Typography.BodyBase>{text}</Typography.BodyBase>
45-
</S.ButtonContainer>
46-
);
34+
return (
35+
<S.ButtonContainer
36+
onClick={onClick}
37+
color={color}
38+
width={width}
39+
fullWidth={fullWidth}
40+
variant={variant}
41+
rounded={rounded}
42+
size={size}
43+
>
44+
<Typography.BodyBase>{text}</Typography.BodyBase>
45+
</S.ButtonContainer>
46+
);
4747
};
4848

4949
export default Button;

src/components/common/atoms/Button/styled.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import type { ButtonColor } from './Button';
33
import tokens from '../../../../core/tokens';
44

55
const sizePadding = {
6-
small: `${tokens.padding.BASELINE * 1}px ${tokens.padding.BASELINE * 2}px`,
7-
medium: `${tokens.padding.BASELINE * 2}px ${tokens.padding.BASELINE * 3}px`,
8-
large: `${tokens.padding.BASELINE * 2.5}px ${tokens.padding.BASELINE * 4}px`,
6+
small: `${tokens.padding.BASELINE * 1}px ${tokens.padding.BASELINE * 2}px`,
7+
medium: `${tokens.padding.BASELINE * 2}px ${tokens.padding.BASELINE * 3}px`,
8+
large: `${tokens.padding.BASELINE * 2.5}px ${tokens.padding.BASELINE * 4}px`,
99
};
1010

1111
const sizeMinWidth = { small: 90, medium: 120, large: 160 };
@@ -22,7 +22,7 @@ export const ButtonContainer = styled.button<{
2222
width: ${({ width }) => (width ? `${width}px` : 'auto')};
2323
2424
${({ fullWidth, size = 'medium' }) =>
25-
fullWidth ? `flex: 1 0 ${sizeMinWidth[size]}px;` : `flex: 0 0 auto;`};
25+
fullWidth ? `flex: 1 0 ${sizeMinWidth[size]}px;` : `flex: 0 0 auto;`};
2626
2727
min-width: ${({ size = 'medium' }) => `${sizeMinWidth[size]}px`};
2828
max-width: 100%;
@@ -37,22 +37,22 @@ export const ButtonContainer = styled.button<{
3737
font-weight: ${({ fontWeight }) => fontWeight ?? '600'};
3838
border: none;
3939
border-radius: ${({ rounded }) =>
40-
rounded ? tokens.borderRadius.ROUND : tokens.borderRadius.BASELINE}px;
40+
rounded ? tokens.borderRadius.ROUND : tokens.borderRadius.BASELINE}px;
4141
padding: ${({ size }) => sizePadding[size ?? 'medium']};
4242
box-sizing: border-box;
4343
cursor: pointer;
4444
height: fit-content;
4545
4646
${({ variant, color, theme }) => {
47-
const style = theme.buttonStyles[color]?.[variant];
48-
if (!style) {
49-
return `
47+
const style = theme.buttonStyles[color]?.[variant];
48+
if (!style) {
49+
return `
5050
background: gray;
5151
color: white;
5252
border: none;
5353
`;
54-
}
55-
return `
54+
}
55+
return `
5656
background-color: ${style.background};
5757
color: ${style.text};
5858
box-shadow: ${style.border};
@@ -61,5 +61,5 @@ export const ButtonContainer = styled.button<{
6161
color: ${style.hover?.text ?? style.text};
6262
}
6363
`;
64-
}}
64+
}}
6565
`;

src/components/common/atoms/Fab/Fab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ type Props = {
99
};
1010

1111
const Fab: FC<Props> = ({ onClick, color = "primary" }) => {
12-
return <S.Container onClick={onClick} color={color} />;
12+
return <S.Container onClick={onClick} color={color} />;
1313
};
1414

1515
export default Fab;

0 commit comments

Comments
 (0)