[PR #5128] [MERGED] chore: add ESLint to /collector #5309

Closed
opened 2026-06-05 15:20:55 -04:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/5128
Author: @angelplusultra
Created: 3/3/2026
Status: Merged
Merged: 3/5/2026
Merged by: @timothycarambat

Base: masterHead: eslint-collector


📝 Commits (7)

📊 Changes

15 files changed (+641 additions, -82 deletions)

View changed files

collector/eslint.config.mjs (+38 -0)
📝 collector/extensions/index.js (+21 -9)
📝 collector/extensions/resync/index.js (+45 -33)
📝 collector/middleware/setDataSigner.js (+12 -9)
📝 collector/middleware/verifyIntegrity.js (+11 -5)
📝 collector/package.json (+7 -1)
📝 collector/processRawText/index.js (+27 -13)
📝 collector/utils/OCRLoader/index.js (+1 -0)
📝 collector/utils/extensions/Confluence/index.js (+1 -1)
📝 collector/utils/extensions/DrupalWiki/DrupalWiki/index.js (+1 -1)
📝 collector/utils/extensions/DrupalWiki/index.js (+1 -1)
📝 collector/utils/extensions/RepoLoader/GitlabRepo/RepoLoader/index.js (+2 -0)
📝 collector/utils/files/index.js (+3 -1)
📝 collector/utils/http/index.js (+1 -1)
📝 collector/yarn.lock (+470 -7)

📄 Description

Pull Request Type

  • feat (New feature)
  • 🐛 fix (Bug fix)
  • ♻️ refactor (Code refactoring without changing behavior)
  • 💄 style (UI style changes)
  • 🔨 chore (Build, CI, maintenance)
  • 📝 docs (Documentation updates)

Relevant Issues

resolves #

Description

Adds ESLint to the /collector package, which previously had no linting beyond a basic Prettier pass. This brings the collector in line with the rest of the monorepo's code quality tooling.

What changed:

  • Added collector/eslint.config.mjs with a flat config using @eslint/js, eslint-plugin-prettier, eslint-config-prettier, and eslint-plugin-unused-imports
  • Updated collector/package.json lint script from prettier --write to eslint --fix, and added all required ESLint devDependencies
  • Applied the resulting auto-fixes across the collector source:
    • Converted all single-quoted strings to double quotes (Prettier enforcement)
    • Reformatted long lines to respect print width
    • Removed unused catch binding variables (e.g. catch (e)catch {})
    • Removed unused function parameters flagged by eslint-plugin-unused-imports
    • Added //eslint-disable-next-line comments on necessary regex literals and control character patterns that would otherwise trigger false positives
    • Fixed missing trailing newlines and trailing commas in module exports

Visuals (if applicable)

N/A

Additional Information

All changes are purely stylistic/tooling — no logic was altered. The yarn.lock is updated to include the new ESLint dependency tree.

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated (if applicable)
  • I have tested my code functionality
  • Docker build succeeds locally

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Mintplex-Labs/anything-llm/pull/5128 **Author:** [@angelplusultra](https://github.com/angelplusultra) **Created:** 3/3/2026 **Status:** ✅ Merged **Merged:** 3/5/2026 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `eslint-collector` --- ### 📝 Commits (7) - [`69be7b4`](https://github.com/Mintplex-Labs/anything-llm/commit/69be7b42df8f925584f1538c459559baed96d42d) add eslint config to /collector - [`f1b8333`](https://github.com/Mintplex-Labs/anything-llm/commit/f1b83339e338ff361092fef2f1a5e1af0064d22c) prettier formatting - [`71f6f2d`](https://github.com/Mintplex-Labs/anything-llm/commit/71f6f2dd89df3f48d0f28844f69f6b87fe05eeed) fix unused - [`e1a7f1b`](https://github.com/Mintplex-Labs/anything-llm/commit/e1a7f1b7e4be88ec50aed3dab7767b25a508b9a4) fix undefined - [`28f0eed`](https://github.com/Mintplex-Labs/anything-llm/commit/28f0eed6d98d1ea703f26d302f52ccb9791835dd) disable lines - [`bb2c59e`](https://github.com/Mintplex-Labs/anything-llm/commit/bb2c59ea7f995de1ec950deff03ad55d7b61b91c) Merge branch 'master' into eslint-collector - [`443dc96`](https://github.com/Mintplex-Labs/anything-llm/commit/443dc96e8d7611580768706f9972649ec4af8184) lockfile ### 📊 Changes **15 files changed** (+641 additions, -82 deletions) <details> <summary>View changed files</summary> ➕ `collector/eslint.config.mjs` (+38 -0) 📝 `collector/extensions/index.js` (+21 -9) 📝 `collector/extensions/resync/index.js` (+45 -33) 📝 `collector/middleware/setDataSigner.js` (+12 -9) 📝 `collector/middleware/verifyIntegrity.js` (+11 -5) 📝 `collector/package.json` (+7 -1) 📝 `collector/processRawText/index.js` (+27 -13) 📝 `collector/utils/OCRLoader/index.js` (+1 -0) 📝 `collector/utils/extensions/Confluence/index.js` (+1 -1) 📝 `collector/utils/extensions/DrupalWiki/DrupalWiki/index.js` (+1 -1) 📝 `collector/utils/extensions/DrupalWiki/index.js` (+1 -1) 📝 `collector/utils/extensions/RepoLoader/GitlabRepo/RepoLoader/index.js` (+2 -0) 📝 `collector/utils/files/index.js` (+3 -1) 📝 `collector/utils/http/index.js` (+1 -1) 📝 `collector/yarn.lock` (+470 -7) </details> ### 📄 Description ### Pull Request Type - [ ] ✨ feat (New feature) - [ ] 🐛 fix (Bug fix) - [ ] ♻️ refactor (Code refactoring without changing behavior) - [ ] 💄 style (UI style changes) - [x] 🔨 chore (Build, CI, maintenance) - [ ] 📝 docs (Documentation updates) ### Relevant Issues resolves # ### Description Adds ESLint to the `/collector` package, which previously had no linting beyond a basic Prettier pass. This brings the collector in line with the rest of the monorepo's code quality tooling. **What changed:** - Added `collector/eslint.config.mjs` with a flat config using `@eslint/js`, `eslint-plugin-prettier`, `eslint-config-prettier`, and `eslint-plugin-unused-imports` - Updated `collector/package.json` lint script from `prettier --write` to `eslint --fix`, and added all required ESLint devDependencies - Applied the resulting auto-fixes across the collector source: - Converted all single-quoted strings to double quotes (Prettier enforcement) - Reformatted long lines to respect print width - Removed unused `catch` binding variables (e.g. `catch (e)` → `catch {}`) - Removed unused function parameters flagged by `eslint-plugin-unused-imports` - Added `//eslint-disable-next-line` comments on necessary regex literals and control character patterns that would otherwise trigger false positives - Fixed missing trailing newlines and trailing commas in module exports ### Visuals (if applicable) N/A ### Additional Information All changes are purely stylistic/tooling — no logic was altered. The `yarn.lock` is updated to include the new ESLint dependency tree. ### Developer Validations - [x] I ran `yarn lint` from the root of the repo & committed changes - [ ] Relevant documentation has been updated (if applicable) - [x] I have tested my code functionality - [ ] Docker build succeeds locally --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-06-05 15:20:55 -04:00
yindo closed this issue 2026-06-05 15:20:56 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#5309