Skip to content

Commit fbd273c

Browse files
committed
linter
1 parent 65885f8 commit fbd273c

File tree

185 files changed

+4129
-5187
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+4129
-5187
lines changed

client/.prettierrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"semi": true,
3+
"tabWidth": 2,
4+
"printWidth": 100,
5+
"singleQuote": true,
6+
"trailingComma": "all",
7+
"jsxSingleQuote": false,
8+
"bracketSpacing": true
9+
}

client/eslint.config.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,17 @@ import globals from "globals";
33
import reactHooks from "eslint-plugin-react-hooks";
44
import reactRefresh from "eslint-plugin-react-refresh";
55
import tseslint from "typescript-eslint";
6+
import prettier from "eslint-plugin-prettier";
7+
import eslintConfigPrettier from "eslint-config-prettier";
68

79
export default tseslint.config(
810
{ ignores: ["dist"] },
911
{
10-
extends: [js.configs.recommended, ...tseslint.configs.recommended],
12+
extends: [
13+
js.configs.recommended,
14+
...tseslint.configs.recommended,
15+
eslintConfigPrettier,
16+
],
1117
files: ["**/*.{ts,tsx}"],
1218
languageOptions: {
1319
ecmaVersion: 2020,
@@ -16,13 +22,17 @@ export default tseslint.config(
1622
plugins: {
1723
"react-hooks": reactHooks,
1824
"react-refresh": reactRefresh,
25+
prettier: prettier,
1926
},
2027
rules: {
2128
...reactHooks.configs.recommended.rules,
2229
"react-refresh/only-export-components": [
2330
"warn",
2431
{ allowConstantExport: true },
2532
],
33+
"prettier/prettier": "error",
34+
"@typescript-eslint/no-explicit-any": "error",
35+
"@typescript-eslint/no-non-null-assertion": "error",
2636
},
2737
},
2838
);

client/package-lock.json

Lines changed: 117 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,15 @@
6565
"@vitest/ui": "4.0.10",
6666
"autoprefixer": "^10.4.22",
6767
"eslint": "^9.39.1",
68+
"eslint-config-prettier": "^10.1.8",
69+
"eslint-plugin-prettier": "^5.5.4",
6870
"eslint-plugin-react-hooks": "^7.0.1",
6971
"eslint-plugin-react-refresh": "^0.4.24",
7072
"globals": "^16.5.0",
7173
"jsdom": "^27.2.0",
7274
"msw": "^2.12.2",
7375
"postcss": "8.5.6",
76+
"prettier": "^3.6.2",
7477
"tailwindcss": "^4.1.17",
7578
"typescript": "5.9.3",
7679
"typescript-eslint": "8.47.0",

client/src/App.tsx

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
2-
import { BrowserRouter as Router } from "react-router-dom";
3-
import AppRoutes from "./routes";
4-
import { Toaster } from "./components/ui/toaster";
5-
import { UserProvider } from "./contexts/UserContext";
6-
import { WebSocketProvider } from "./contexts/WebSocketContext";
7-
import { SearchProvider } from "./contexts/SearchContext";
8-
import { useUser } from "./contexts/UserContext";
9-
import { GlobalSearch } from "./components/search/GlobalSearch";
1+
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
2+
import { BrowserRouter as Router } from 'react-router-dom';
3+
import AppRoutes from './routes';
4+
import { Toaster } from './components/ui/toaster';
5+
import { UserProvider } from './contexts/UserContext';
6+
import { WebSocketProvider } from './contexts/WebSocketContext';
7+
import { SearchProvider } from './contexts/SearchContext';
8+
import { useUser } from './contexts/UserContext';
9+
import { GlobalSearch } from './components/search/GlobalSearch';
1010

1111
const queryClient = new QueryClient();
1212

@@ -23,11 +23,7 @@ function WebSocketIntegration({ children }: { children: React.ReactNode }) {
2323
}
2424

2525
return (
26-
<WebSocketProvider
27-
serverUrl="http://localhost:4000"
28-
userId={user.id}
29-
userEmail={user.email}
30-
>
26+
<WebSocketProvider serverUrl="http://localhost:4000" userId={user.id} userEmail={user.email}>
3127
{children}
3228
</WebSocketProvider>
3329
);
@@ -41,7 +37,7 @@ function App() {
4137
<SearchProvider>
4238
<WebSocketIntegration>
4339
<AppRoutes />
44-
<GlobalSearch /> <Toaster />
40+
<GlobalSearch /> <Toaster />
4541
</WebSocketIntegration>
4642
</SearchProvider>
4743
</Router>

client/src/__tests__/unit/hooks/useBoards.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,6 @@ describe('useBoard hook', () => {
298298
expect(queryResult.current.isLoading).toBe(false);
299299
});
300300

301-
302-
303301
// Create a new board
304302
await act(async () => {
305303
hookResult.current.createBoard.mutate({

client/src/__tests__/unit/hooks/useCardFilters.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,10 @@ describe('useCardFilters hook', () => {
272272
const sorted = result.current.filterAndSortCards(mockCards);
273273

274274
// Log to debug
275-
console.log('Sorted priorities:', sorted.map(c => c.priority));
275+
console.log(
276+
'Sorted priorities:',
277+
sorted.map((c) => c.priority),
278+
);
276279
console.log('Sort direction:', result.current.filters.sortDirection);
277280
console.log('Sort option:', result.current.filters.sort);
278281

client/src/__tests__/unit/hooks/useCards.test.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,7 @@ describe('useCards hook', () => {
9393
];
9494

9595
await act(async () => {
96-
result.current.updateCardsOrder.mutate([
97-
{ cards: reorderedCards },
98-
'list-123',
99-
]);
96+
result.current.updateCardsOrder.mutate([{ cards: reorderedCards }, 'list-123']);
10097
});
10198

10299
await waitFor(() => {
@@ -234,7 +231,7 @@ describe('useCards hook', () => {
234231
});
235232

236233
expect(result.current.updateCardDetails.data?.data.description).toBe(
237-
'New detailed description'
234+
'New detailed description',
238235
);
239236
});
240237

client/src/__tests__/unit/hooks/useLists.test.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,7 @@ describe('useLists hook', () => {
211211
];
212212

213213
await act(async () => {
214-
result.current.updateListsOrder.mutate([
215-
{ lists: reorderedLists },
216-
testBoardId,
217-
]);
214+
result.current.updateListsOrder.mutate([{ lists: reorderedLists }, testBoardId]);
218215
});
219216

220217
await waitFor(() => {
@@ -301,8 +298,6 @@ describe('useLists hook', () => {
301298
expect(hookResult.current.lists.isLoading).toBe(false);
302299
});
303300

304-
305-
306301
// Create a new list
307302
await act(async () => {
308303
hookResult.current.createList.mutate({

client/src/__tests__/unit/utils/utils.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ describe('utils', () => {
6565
'base-class',
6666
{ active: isActive, disabled: isDisabled },
6767
isActive && 'text-blue-500',
68-
'p-4'
68+
'p-4',
6969
);
7070
expect(result).toBe('base-class active text-blue-500 p-4');
7171
});

0 commit comments

Comments
 (0)