Skip to content

Commit 06e7e4c

Browse files
committed
fix(lint): re-enable stricter rules and fix violations
- Enable no-plusplus, arrow-body-style, sort-keys, and react/no-array-index-key in oxlintrc - Add sort-keys override for Better Auth localization map - Fix sort order, stable React keys, and small style fixes across portal and web - Use useId-based slide keys in testimonials carousel to avoid duplicate keys Made-with: Cursor
1 parent a2b754a commit 06e7e4c

File tree

65 files changed

+1554
-1532
lines changed

Some content is hidden

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

65 files changed

+1554
-1532
lines changed

.oxlintrc.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
"import/no-namespace": "error",
2929
"oxc/no-barrel-file": "error",
3030
"func-style": "off",
31-
"sort-keys": "off",
3231
"global-require": "off",
3332
"unicorn/prefer-module": "off",
3433
"no-inline-comments": "off",
@@ -48,7 +47,6 @@
4847
"no-warning-comments": "off",
4948
"no-empty-function": "off",
5049
"unicorn/prefer-dom-node-remove": "off",
51-
"no-plusplus": "off",
5250
"unicorn/prefer-string-replace-all": "off",
5351
"typescript/consistent-type-imports": "off",
5452
"unicorn/consistent-function-scoping": "off",
@@ -67,9 +65,7 @@
6765
"react/no-danger": "off",
6866
"no-useless-return": "off",
6967
"max-classes-per-file": "off",
70-
"complexity": "off",
71-
"arrow-body-style": "off",
72-
"react/no-array-index-key": "off"
68+
"complexity": "off"
7369
},
7470
"overrides": [
7571
{
@@ -147,6 +143,12 @@
147143
"no-param-reassign": "off"
148144
}
149145
},
146+
{
147+
"files": ["apps/portal/src/features/auth/lib/localization.ts"],
148+
"rules": {
149+
"sort-keys": "off"
150+
}
151+
},
150152
{
151153
"files": ["packages/ui/**/*.{ts,tsx}"],
152154
"rules": {

apps/portal/next.config.ts

Lines changed: 162 additions & 162 deletions
Large diffs are not rendered by default.

apps/portal/packages/api/src/query-client.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ function makeQueryClient() {
2222
shouldRedactErrors: () => false,
2323
},
2424
queries: {
25-
// With SSR, we usually want to set some default staleTime
26-
// above 0 to avoid refetching immediately on the client
27-
staleTime: QUERY_CACHE.STALE_TIME_DEFAULT,
2825
gcTime: QUERY_CACHE.GC_TIME_DEFAULT,
29-
retry: 0, // No retries by default
3026
// Refetch on window focus is good for keeping data fresh
3127
refetchOnWindowFocus: true,
28+
retry: 0, // No retries by default
29+
// With SSR, we usually want to set some default staleTime
30+
// above 0 to avoid refetching immediately on the client
31+
staleTime: QUERY_CACHE.STALE_TIME_DEFAULT,
3232
},
3333
},
3434
});

apps/portal/packages/api/src/query-keys.ts

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -11,55 +11,6 @@ import type {
1111
} from "./types";
1212

1313
export const queryKeys = {
14-
// User queries
15-
users: {
16-
all: ["users"] as const,
17-
current: () => [...queryKeys.users.all, "current"] as const,
18-
detail: (id: string) => [...queryKeys.users.details(), id] as const,
19-
details: () => [...queryKeys.users.all, "detail"] as const,
20-
list: (filters?: UserListFilters) =>
21-
[...queryKeys.users.lists(), { filters }] as const,
22-
lists: () => [...queryKeys.users.all, "list"] as const,
23-
stats: () => [...queryKeys.users.all, "stats"] as const,
24-
},
25-
26-
// Session queries
27-
sessions: {
28-
all: ["sessions"] as const,
29-
current: () => [...queryKeys.sessions.all, "current"] as const,
30-
detail: (id: string) => [...queryKeys.sessions.details(), id] as const,
31-
details: () => [...queryKeys.sessions.all, "detail"] as const,
32-
list: (filters?: SessionListFilters) =>
33-
[...queryKeys.sessions.lists(), { filters }] as const,
34-
lists: () => [...queryKeys.sessions.all, "list"] as const,
35-
user: (userId: string) =>
36-
[...queryKeys.sessions.all, "user", userId] as const,
37-
},
38-
39-
// API Key queries
40-
apiKeys: {
41-
all: ["apiKeys"] as const,
42-
detail: (id: string) => [...queryKeys.apiKeys.details(), id] as const,
43-
details: () => [...queryKeys.apiKeys.all, "detail"] as const,
44-
list: (userId?: string) =>
45-
[...queryKeys.apiKeys.lists(), { userId }] as const,
46-
lists: () => [...queryKeys.apiKeys.all, "list"] as const,
47-
user: (userId: string) =>
48-
[...queryKeys.apiKeys.all, "user", userId] as const,
49-
},
50-
51-
// OAuth Client queries
52-
oauthClients: {
53-
all: ["oauthClients"] as const,
54-
detail: (id: string) => [...queryKeys.oauthClients.details(), id] as const,
55-
details: () => [...queryKeys.oauthClients.all, "detail"] as const,
56-
list: (filters?: OAuthClientListFilters) =>
57-
[...queryKeys.oauthClients.lists(), { filters }] as const,
58-
lists: () => [...queryKeys.oauthClients.all, "list"] as const,
59-
user: (userId: string) =>
60-
[...queryKeys.oauthClients.all, "user", userId] as const,
61-
},
62-
6314
// Admin queries
6415
admin: {
6516
all: ["admin"] as const,
@@ -88,6 +39,18 @@ export const queryKeys = {
8839
},
8940
},
9041

42+
// API Key queries
43+
apiKeys: {
44+
all: ["apiKeys"] as const,
45+
detail: (id: string) => [...queryKeys.apiKeys.details(), id] as const,
46+
details: () => [...queryKeys.apiKeys.all, "detail"] as const,
47+
list: (userId?: string) =>
48+
[...queryKeys.apiKeys.lists(), { userId }] as const,
49+
lists: () => [...queryKeys.apiKeys.all, "list"] as const,
50+
user: (userId: string) =>
51+
[...queryKeys.apiKeys.all, "user", userId] as const,
52+
},
53+
9154
// Integration queries
9255
integrations: {
9356
accounts: {
@@ -113,4 +76,41 @@ export const queryKeys = {
11376
list: () => [...queryKeys.integrations.lists()] as const,
11477
lists: () => [...queryKeys.integrations.all, "list"] as const,
11578
},
79+
80+
// OAuth Client queries
81+
oauthClients: {
82+
all: ["oauthClients"] as const,
83+
detail: (id: string) => [...queryKeys.oauthClients.details(), id] as const,
84+
details: () => [...queryKeys.oauthClients.all, "detail"] as const,
85+
list: (filters?: OAuthClientListFilters) =>
86+
[...queryKeys.oauthClients.lists(), { filters }] as const,
87+
lists: () => [...queryKeys.oauthClients.all, "list"] as const,
88+
user: (userId: string) =>
89+
[...queryKeys.oauthClients.all, "user", userId] as const,
90+
},
91+
92+
// Session queries
93+
sessions: {
94+
all: ["sessions"] as const,
95+
current: () => [...queryKeys.sessions.all, "current"] as const,
96+
detail: (id: string) => [...queryKeys.sessions.details(), id] as const,
97+
details: () => [...queryKeys.sessions.all, "detail"] as const,
98+
list: (filters?: SessionListFilters) =>
99+
[...queryKeys.sessions.lists(), { filters }] as const,
100+
lists: () => [...queryKeys.sessions.all, "list"] as const,
101+
user: (userId: string) =>
102+
[...queryKeys.sessions.all, "user", userId] as const,
103+
},
104+
105+
// User queries
106+
users: {
107+
all: ["users"] as const,
108+
current: () => [...queryKeys.users.all, "current"] as const,
109+
detail: (id: string) => [...queryKeys.users.details(), id] as const,
110+
details: () => [...queryKeys.users.all, "detail"] as const,
111+
list: (filters?: UserListFilters) =>
112+
[...queryKeys.users.lists(), { filters }] as const,
113+
lists: () => [...queryKeys.users.all, "list"] as const,
114+
stats: () => [...queryKeys.users.all, "stats"] as const,
115+
},
116116
} as const;

apps/portal/packages/db/src/config.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ if (!process.env.DATABASE_URL) {
3636
}
3737

3838
export default defineConfig({
39-
// Database dialect
40-
// Options: "postgresql" | "mysql" | "sqlite" | "turso" | "singlestore" | "mssql" | "cockroachdb"
41-
dialect: "postgresql",
42-
4339
// Database connection credentials
4440
// For PostgreSQL, you can also specify: host, port, user, password, database, ssl
4541
dbCredentials: {
@@ -53,14 +49,9 @@ export default defineConfig({
5349
// ssl: process.env.NODE_ENV === "production" ? { rejectUnauthorized: false } : false,
5450
},
5551

56-
// Schema file paths (glob-based)
57-
// Can be a string, array of strings, or glob pattern
58-
// Examples:
59-
// "./src/shared/db/schema.ts" - Single file
60-
// "./src/shared/db/schema/*" - All files in schema folder
61-
// ["./src/shared/db/schema/*.ts"] - Array of glob patterns
62-
// "./src/**/schema.ts" - All schema.ts files recursively
63-
schema: "./src/schema/*",
52+
// Database dialect
53+
// Options: "postgresql" | "mysql" | "sqlite" | "turso" | "singlestore" | "mssql" | "cockroachdb"
54+
dialect: "postgresql",
6455

6556
// Output folder for migrations, snapshots, and pulled schemas
6657
// Default: "./drizzle"
@@ -70,15 +61,24 @@ export default defineConfig({
7061
// - Generated schema.ts from drizzle-kit pull
7162
out: "./drizzle",
7263

73-
// Print all SQL statements during operations
74-
// Useful for debugging and understanding what Drizzle Kit is doing
75-
verbose: true,
64+
// Schema file paths (glob-based)
65+
// Can be a string, array of strings, or glob pattern
66+
// Examples:
67+
// "./src/shared/db/schema.ts" - Single file
68+
// "./src/shared/db/schema/*" - All files in schema folder
69+
// ["./src/shared/db/schema/*.ts"] - Array of glob patterns
70+
// "./src/**/schema.ts" - All schema.ts files recursively
71+
schema: "./src/schema/*",
7672

7773
// Prompt confirmation before running SQL statements (push command)
7874
// When true, Drizzle Kit will ask for confirmation before executing SQL
7975
// Recommended: true for production, false for development
8076
strict: true,
8177

78+
// Print all SQL statements during operations
79+
// Useful for debugging and understanding what Drizzle Kit is doing
80+
verbose: true,
81+
8282
// Embed statement breakpoints in generated SQL migrations
8383
// Required for databases that don't support multiple DDL statements in one transaction
8484
// (MySQL and SQLite). Default: true

0 commit comments

Comments
 (0)