Skip to content

Commit 133521b

Browse files
committed
Merge branch 'dev'
* dev: chore: add ESLint cache file for improved linting performance refactor: remove unused env vars and migrate ESLint to flat config
2 parents 0864063 + 84c0739 commit 133521b

23 files changed

Lines changed: 735 additions & 460 deletions

File tree

.eslintcache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"/Users/pseudoyu/Developer/web3insight-ai/web3insight/src/app/HomePageClient.tsx":"1","/Users/pseudoyu/Developer/web3insight-ai/web3insight/src/app/developers/[id]/page.tsx":"2","/Users/pseudoyu/Developer/web3insight-ai/web3insight/src/app/devinsight/DevInsightPageClient.tsx":"3","/Users/pseudoyu/Developer/web3insight-ai/web3insight/src/app/layout.tsx":"4","/Users/pseudoyu/Developer/web3insight-ai/web3insight/src/app/repositories/[id]/page.tsx":"5","/Users/pseudoyu/Developer/web3insight-ai/web3insight/src/components/navbar/useSessionActions.ts":"6","/Users/pseudoyu/Developer/web3insight-ai/web3insight/src/env.ts":"7","/Users/pseudoyu/Developer/web3insight-ai/web3insight/src/providers/PrivyAuthSync.tsx":"8","/Users/pseudoyu/Developer/web3insight-ai/web3insight/src/services/auth/helper/server.ts":"9","/Users/pseudoyu/Developer/web3insight-ai/web3insight/src/services/auth/repository.ts":"10","/Users/pseudoyu/Developer/web3insight-ai/web3insight/src/services/auth/widgets/privy-accounts/PrivyAccountsWidget.tsx":"11","/Users/pseudoyu/Developer/web3insight-ai/web3insight/src/services/auth/widgets/signed-user/SignedUser.tsx":"12","/Users/pseudoyu/Developer/web3insight-ai/web3insight/src/services/profile-analysis/repository.ts":"13","/Users/pseudoyu/Developer/web3insight-ai/web3insight/src/services/repository/views/repository-detail/RepositoryDetail.tsx":"14"},{"size":15988,"mtime":1765092443982,"results":"15","hashOfConfig":"16"},{"size":3358,"mtime":1765092443997,"results":"17","hashOfConfig":"16"},{"size":14262,"mtime":1765092444025},{"size":882,"mtime":1765092426137,"results":"18","hashOfConfig":"16"},{"size":6341,"mtime":1765092444039,"results":"19","hashOfConfig":"16"},{"size":1586,"mtime":1765092444045,"results":"20","hashOfConfig":"16"},{"size":2965,"mtime":1765092444050,"results":"21","hashOfConfig":"16"},{"size":1731,"mtime":1765092444055,"results":"22","hashOfConfig":"16"},{"size":2819,"mtime":1765092444064,"results":"23","hashOfConfig":"16"},{"size":9574,"mtime":1765092426138,"results":"24","hashOfConfig":"16"},{"size":13726,"mtime":1765092444089},{"size":5357,"mtime":1765092444097,"results":"25","hashOfConfig":"16"},{"size":12890,"mtime":1765092444113,"results":"26","hashOfConfig":"16"},{"size":10071,"mtime":1765092444128},{"filePath":"27","messages":"28","suppressedMessages":"29","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1o56msr",{"filePath":"30","messages":"31","suppressedMessages":"32","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"33","messages":"34","suppressedMessages":"35","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"36","messages":"37","suppressedMessages":"38","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"39","messages":"40","suppressedMessages":"41","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"42","messages":"43","suppressedMessages":"44","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"45","messages":"46","suppressedMessages":"47","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"48","messages":"49","suppressedMessages":"50","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"51","messages":"52","suppressedMessages":"53","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"54","messages":"55","suppressedMessages":"56","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"57","messages":"58","suppressedMessages":"59","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/pseudoyu/Developer/web3insight-ai/web3insight/src/app/HomePageClient.tsx",[],[],"/Users/pseudoyu/Developer/web3insight-ai/web3insight/src/app/developers/[id]/page.tsx",[],[],"/Users/pseudoyu/Developer/web3insight-ai/web3insight/src/app/layout.tsx",[],[],"/Users/pseudoyu/Developer/web3insight-ai/web3insight/src/app/repositories/[id]/page.tsx",[],[],"/Users/pseudoyu/Developer/web3insight-ai/web3insight/src/components/navbar/useSessionActions.ts",[],[],"/Users/pseudoyu/Developer/web3insight-ai/web3insight/src/env.ts",[],[],"/Users/pseudoyu/Developer/web3insight-ai/web3insight/src/providers/PrivyAuthSync.tsx",[],[],"/Users/pseudoyu/Developer/web3insight-ai/web3insight/src/services/auth/helper/server.ts",[],[],"/Users/pseudoyu/Developer/web3insight-ai/web3insight/src/services/auth/repository.ts",[],[],"/Users/pseudoyu/Developer/web3insight-ai/web3insight/src/services/auth/widgets/signed-user/SignedUser.tsx",[],[],"/Users/pseudoyu/Developer/web3insight-ai/web3insight/src/services/profile-analysis/repository.ts",[],[]]

.eslintrc.cjs

Lines changed: 0 additions & 97 deletions
This file was deleted.

.lintstagedrc.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

CLAUDE.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,16 +236,15 @@ Environment variables are validated using `@t3-oss/env-nextjs` in `/src/env.ts`:
236236
- `DATA_API_TOKEN` - API authentication token
237237
- `OPENDIGGER_URL` - OpenDigger API URL
238238
- `OSSINSIGHT_URL` - OSS Insight API URL
239-
- `SESSION_SECRET` - Session encryption secret
240239

241240
**Optional Server Variables**:
242241
- `OPENAI_BASE_URL`, `OPENAI_API_KEY` - OpenAI configuration
243242
- `AI_API_URL`, `AI_API_TOKEN` - Alternative AI service
244243
- `HTTP_TIMEOUT` - HTTP client timeout (default: 30000ms)
245244

246-
**Required Client Variables** (prefixed with `NEXT_PUBLIC_`):
247-
- `NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID` - WalletConnect configuration
248-
- `NEXT_PUBLIC_GITHUB_CLIENT_ID` - GitHub OAuth configuration
245+
**Optional Client Variables** (prefixed with `NEXT_PUBLIC_`):
246+
- `NEXT_PUBLIC_PRIVY_APP_ID` - Privy authentication configuration
247+
- `NEXT_PUBLIC_UMAMI_WEBSITE_ID` - Umami analytics configuration
249248

250249
The `predev` script automatically runs environment setup before starting development.
251250

Dockerfile

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ ARG AI_API_URL
3737
ARG DATA_API_TOKEN
3838
ARG DATA_API_URL
3939
ARG OSSINSIGHT_URL
40-
ARG SESSION_SECRET
41-
ARG NEXT_PUBLIC_GITHUB_CLIENT_ID
42-
ARG NEXT_PUBLIC_ORIGIN_CLIENT_ID
4340
ARG NEXT_PUBLIC_PRIVY_APP_ID
4441
ARG NEXT_PUBLIC_UMAMI_WEBSITE_ID
4542

@@ -52,9 +49,6 @@ ENV AI_API_URL=${AI_API_URL}
5249
ENV DATA_API_TOKEN=${DATA_API_TOKEN}
5350
ENV DATA_API_URL=${DATA_API_URL:-https://api.web3insight.ai}
5451
ENV OSSINSIGHT_URL=${OSSINSIGHT_URL:-https://api.ossinsight.io}
55-
ENV SESSION_SECRET=${SESSION_SECRET:-dummy_secret}
56-
ENV NEXT_PUBLIC_GITHUB_CLIENT_ID=${NEXT_PUBLIC_GITHUB_CLIENT_ID}
57-
ENV NEXT_PUBLIC_ORIGIN_CLIENT_ID=${NEXT_PUBLIC_ORIGIN_CLIENT_ID}
5852
ENV NEXT_PUBLIC_PRIVY_APP_ID=${NEXT_PUBLIC_PRIVY_APP_ID}
5953
ENV NEXT_PUBLIC_UMAMI_WEBSITE_ID=${NEXT_PUBLIC_UMAMI_WEBSITE_ID}
6054

@@ -98,7 +92,6 @@ ENV AI_API_URL=""
9892
ENV DATA_API_TOKEN=""
9993
ENV DATA_API_URL="https://api.web3insight.ai"
10094
ENV OSSINSIGHT_URL="https://api.ossinsight.io"
101-
ENV SESSION_SECRET=""
10295

10396
# Note: NEXT_PUBLIC_* variables are baked into the build and cannot be changed at runtime
10497

eslint.config.mjs

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
import globals from "globals";
2+
import js from "@eslint/js";
3+
import tseslint from "typescript-eslint";
4+
import reactPlugin from "eslint-plugin-react";
5+
import reactHooksPlugin from "eslint-plugin-react-hooks";
6+
import jsxA11yPlugin from "eslint-plugin-jsx-a11y";
7+
8+
export default tseslint.config(
9+
js.configs.recommended,
10+
...tseslint.configs.recommended,
11+
{
12+
files: ["**/*.{js,jsx,ts,tsx}"],
13+
plugins: {
14+
react: reactPlugin,
15+
"react-hooks": reactHooksPlugin,
16+
"jsx-a11y": jsxA11yPlugin,
17+
},
18+
languageOptions: {
19+
ecmaVersion: "latest",
20+
sourceType: "module",
21+
globals: {
22+
...globals.browser,
23+
...globals.node,
24+
...globals.es2021,
25+
React: "readonly",
26+
},
27+
parserOptions: {
28+
ecmaFeatures: {
29+
jsx: true,
30+
},
31+
},
32+
},
33+
settings: {
34+
react: {
35+
version: "detect",
36+
},
37+
},
38+
rules: {
39+
// General
40+
"no-empty-function": "error",
41+
semi: ["warn", "always"],
42+
indent: ["error", 2],
43+
"comma-dangle": ["warn", "always-multiline"],
44+
"eol-last": ["error", "always"],
45+
46+
// TypeScript
47+
"@typescript-eslint/no-unused-vars": [
48+
"error",
49+
{
50+
argsIgnorePattern: "^_",
51+
varsIgnorePattern: "^_",
52+
caughtErrorsIgnorePattern: "^_",
53+
},
54+
],
55+
"@typescript-eslint/no-explicit-any": "warn",
56+
"@typescript-eslint/no-require-imports": "off",
57+
58+
// React
59+
"react/react-in-jsx-scope": "off",
60+
"react/prop-types": "off",
61+
"react/self-closing-comp": ["error", { component: true, html: true }],
62+
63+
// React Hooks
64+
"react-hooks/rules-of-hooks": "error",
65+
"react-hooks/exhaustive-deps": "warn",
66+
},
67+
},
68+
{
69+
ignores: [
70+
"node_modules/**",
71+
".next/**",
72+
"out/**",
73+
"public/**",
74+
".knosys/**",
75+
"*.config.js",
76+
"*.config.mjs",
77+
],
78+
},
79+
);

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"build:turbo": "next build",
1313
"predev": "npm run env",
1414
"dev": "next dev --turbopack",
15-
"lint": "ESLINT_USE_FLAT_CONFIG=false eslint . --ext .js,.jsx,.ts,.tsx",
15+
"lint": "eslint .",
1616
"start": "next start",
1717
"typecheck": "tsc --noEmit || true",
1818
"prepare": "husky || exit 0"
@@ -74,12 +74,15 @@
7474
"eslint-plugin-jsx-a11y": "^6.10.2",
7575
"eslint-plugin-react": "^7.35.0",
7676
"eslint-plugin-react-hooks": "^7.0.1",
77+
"globals": "^16.5.0",
7778
"husky": "9.1.7",
7879
"ksio": "^0.0.3",
7980
"lint-staged": "15.3.0",
8081
"postcss": "^8.4.41",
82+
"prettier": "^3.7.4",
8183
"semver": "7.6.3",
8284
"tailwindcss": "^3.4.9",
83-
"typescript": "^5.5.4"
85+
"typescript": "^5.5.4",
86+
"typescript-eslint": "^8.48.1"
8487
}
8588
}

0 commit comments

Comments
 (0)