Skip to content

Conversation

christian-bromann
Copy link
Member

In this PR we are updating the new Eslint package introduced in #8770. This patch:

  • removes the NODE_OPTIONS env which is not needed
  • adds eslint.config.ts in every project
  • removes outdated .eslintrc.cjs files
  • removes unused eslint dependencies in sub packages

Copy link

vercel bot commented Aug 23, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
langchainjs-docs Ready Ready Preview Comment Sep 9, 2025 11:15pm
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
langchainjs-api-refs Ignored Ignored Sep 9, 2025 11:15pm

@christian-bromann
Copy link
Member Author

FYI: I have stacked the entire change in multiple PRs so this branch is failing - the final PR (#8772) is passing all pipelines.

"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids",
"lint:eslint": "NODE_OPTIONS=--max-old-space-size=4096 eslint --cache --ext .ts,.js src/",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably fine, but I half expect eslint to start erroring after this since the typescript process that eslint runs chews on a lot of memory

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to bring it back but I assume with us relying on a new Node.js version and Eslint v9 having some performance improvements, I don't think we will run into these. Happy to bring it back though if we do.

"postinstall": "prisma generate --schema ./src/indexes/vector_stores/prisma_vectorstore/prisma/schema.prisma",
"start:dist": "pnpm build && node -r dotenv/config dist/index.js",
"lint:eslint": "NODE_OPTIONS=--max-old-space-size=4096 eslint --cache --ext .ts,.js src/",
"lint:eslint": "eslint --cache src/",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"lint:eslint": "eslint --cache src/",
"lint:eslint": "eslint --cache src/",

Comment on lines -126 to -133
"@typescript-eslint/eslint-plugin": "^5.51.0",
"@typescript-eslint/parser": "^5.51.0",
"eslint": "^8.33.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-unused-imports": "^3.0.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

"scripts": {
"test:int": "vitest run --config=example/vitest.config.ts",
"lint": "eslint --cache --ext .ts,.js src/",
"lint": "eslint --cache src/",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"lint": "eslint --cache src/",
"lint": "eslint --cache src/",

"scripts": {
"build": "pnpm --filter @langchain/build compile @langchain/community",
"lint:eslint": "NODE_OPTIONS=--max-old-space-size=4096 eslint --cache --ext .ts,.js src/",
"lint:eslint": "eslint --cache src/",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"lint:eslint": "eslint --cache src/",
"lint:eslint": "eslint --cache src/",

"build": "pnpm --filter @langchain/build compile @langchain/core",
"clean": "rm -rf .turbo dist/",
"lint:eslint": "NODE_OPTIONS=--max-old-space-size=4096 eslint --cache --ext .ts,.js src/",
"lint:eslint": "eslint --cache src/",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think you get the idea

Copy link

changeset-bot bot commented Sep 9, 2025

⚠️ No Changeset found

Latest commit: e3d087a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants