Merge branch 'master' of github.com:Mintplex-Labs/anything-llm

This commit is contained in:
Timothy Carambat
2026-03-09 14:34:15 -07:00
4 changed files with 76 additions and 1 deletions

72
.github/workflows/lint.yaml vendored Normal file
View File

@@ -0,0 +1,72 @@
name: Lint
concurrency:
group: lint-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
types: [opened, synchronize, reopened]
paths:
- "server/**/*.js"
- "server/eslint.config.mjs"
- "collector/**/*.js"
- "collector/eslint.config.mjs"
- "frontend/src/**/*.js"
- "frontend/src/**/*.jsx"
- "frontend/eslint.config.js"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
- name: Cache server dependencies
uses: actions/cache@v4
with:
path: server/node_modules
key: ${{ runner.os }}-yarn-server-${{ hashFiles('server/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-server-
- name: Cache frontend dependencies
uses: actions/cache@v4
with:
path: frontend/node_modules
key: ${{ runner.os }}-yarn-frontend-${{ hashFiles('frontend/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-frontend-
- name: Cache collector dependencies
uses: actions/cache@v4
with:
path: collector/node_modules
key: ${{ runner.os }}-yarn-collector-${{ hashFiles('collector/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-collector-
- name: Install server dependencies
run: cd server && yarn install --frozen-lockfile
- name: Install frontend dependencies
run: cd frontend && yarn install --frozen-lockfile
- name: Install collector dependencies
run: cd collector && yarn install --frozen-lockfile
- name: Lint server
run: cd server && yarn lint:check
- name: Lint frontend
run: cd frontend && yarn lint:check
- name: Lint collector
run: cd collector && yarn lint:check

View File

@@ -12,7 +12,8 @@
"scripts": {
"dev": "cross-env NODE_ENV=development nodemon --ignore hotdir --ignore storage --trace-warnings index.js",
"start": "cross-env NODE_ENV=production node index.js",
"lint": "eslint --fix ."
"lint": "eslint --fix .",
"lint:check": "eslint ."
},
"dependencies": {
"@langchain/community": "^0.2.23",

View File

@@ -20,6 +20,7 @@
"scripts": {
"test": "jest",
"lint": "cd server && yarn lint && cd ../frontend && yarn lint && cd ../collector && yarn lint",
"lint:ci": "cd server && yarn lint:check && cd ../frontend && yarn lint:check && cd ../collector && yarn lint:check",
"setup": "cd server && yarn && cd ../collector && yarn && cd ../frontend && yarn && cd .. && yarn setup:envs && yarn prisma:setup && echo \"Please run yarn dev:server, yarn dev:collector, and yarn dev:frontend in separate terminal tabs.\"",
"setup:envs": "cp -n ./frontend/.env.example ./frontend/.env; cp -n ./server/.env.example ./server/.env.development; cp -n ./collector/.env.example ./collector/.env; cp -n ./docker/.env.example ./docker/.env; echo \"All ENV files copied!\n\"",
"dev:server": "cd server && yarn dev",

View File

@@ -13,6 +13,7 @@
"dev": "cross-env NODE_ENV=development nodemon --ignore documents --ignore vector-cache --ignore storage --ignore swagger --trace-warnings index.js",
"start": "cross-env NODE_ENV=production node index.js",
"lint": "eslint --fix .",
"lint:check": "eslint .",
"swagger": "node ./swagger/init.js"
},
"prisma": {