Skip to content

Commit 06446a3

Browse files
atrakhConvex, Inc.
authored andcommitted
dashboard: check node version when linting (#39109)
GitOrigin-RevId: 9c66fb6f6b97f45ee87b278b52a24c5e8120ae08
1 parent 1da1eff commit 06446a3

File tree

5 files changed

+11
-8
lines changed

5 files changed

+11
-8
lines changed

npm-packages/@convex-dev/design-system/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
],
1010
"scripts": {
1111
"build": "tsc && tsc-alias && mkdir -p dist/styles && cp src/styles/shared.css dist/styles/shared.css",
12-
"lint": "eslint ./src --ext .js,.jsx,.ts,.tsx --ignore-pattern '*.stories.tsx'",
13-
"lint:fix": "eslint --fix ./src --ext .js,.jsx,.ts,.tsx --ignore-pattern '*.stories.tsx'"
12+
"lint": "bash ../../dashboard-common/scripts/checkNode20.sh && eslint ./src --ext .js,.jsx,.ts,.tsx --ignore-pattern '*.stories.tsx'",
13+
"lint:fix": "bash ../../dashboard-common/scripts/checkNode20.sh && eslint --fix ./src --ext .js,.jsx,.ts,.tsx --ignore-pattern '*.stories.tsx'"
1414
},
1515
"peerDependencies": {
1616
"@radix-ui/react-icons": "~1.3.0",

npm-packages/dashboard-common/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"scripts": {
88
"build": "npm run build:generated && tsc --noEmit",
99
"build:generated": "python3 scripts/build-convexServerTypes.py",
10-
"lint": "eslint ./src --ext .js,.jsx,.ts,.tsx --ignore-pattern '**/*.stories.tsx'",
11-
"lint:fix": "eslint --fix ./src --ext .js,.jsx,.ts,.tsx --ignore-pattern '**/*.stories.tsx'"
10+
"lint": "bash scripts/checkNode20.sh && eslint ./src --ext .js,.jsx,.ts,.tsx --ignore-pattern '**/*.stories.tsx'",
11+
"lint:fix": "bash scripts/checkNode20.sh && eslint --fix ./src --ext .js,.jsx,.ts,.tsx --ignore-pattern '**/*.stories.tsx'"
1212
},
1313
"peerDependencies": {
1414
"@radix-ui/react-icons": "~1.3.0",
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
node -v | grep -q '^v20' || (echo "Node version must be >= 20 to lint this package. Run \`nvm use 20\` to switch to the correct version." && exit 1)

npm-packages/dashboard-self-hosted/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"build:generated": "python3 ../dashboard-common/scripts/build-convexServerTypes.py",
99
"build:export": "BUILD_TYPE=export NEXT_PUBLIC_DEFAULT_LIST_DEPLOYMENTS_API_PORT=6791 npm run build",
1010
"start": "next start -p 6791",
11-
"lint": "next lint --max-warnings 0 --dir src/ && tsc",
12-
"lint:fix": "next lint --fix --max-warnings 0 --dir src/"
11+
"lint": "bash ../dashboard-common/scripts/checkNode20.sh && next lint --max-warnings 0 --dir src/ && tsc",
12+
"lint:fix": "bash ../dashboard-common/scripts/checkNode20.sh && next lint --fix --max-warnings 0 --dir src/"
1313
},
1414
"dependencies": {
1515
"@convex-dev/design-system": "workspace:*",

npm-packages/dashboard/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"build": "npm run build:generated && next build",
99
"build:generated": "python3 ../dashboard-common/scripts/build-convexServerTypes.py && npm run generateApiSpec",
1010
"start": "next start",
11-
"lint": "next lint --max-warnings 0 --dir src/ && tsc",
12-
"lint:fix": "next lint --fix --max-warnings 0 --dir src/",
11+
"lint": "bash ../dashboard-common/scripts/checkNode20.sh && next lint --max-warnings 0 --dir src/ && tsc",
12+
"lint:fix": "bash ../dashboard-common/scripts/checkNode20.sh && next lint --fix --max-warnings 0 --dir src/",
1313
"export": "next export",
1414
"storybook": "storybook dev -p 6006 --no-open",
1515
"build-storybook": "storybook build",

0 commit comments

Comments
 (0)