Skip to content

Conversation

christian-bromann
Copy link
Member

VS Code Workspace Configuration Enhancement

This PR adds minimal but effective VS Code workspace configuration to improve the developer experience while maintaining consistency with the existing tooling used in this repository.

I personally would not prefer to have settings dictated by project configurations so I tried to be careful and only include auto-formatting. I believe a lot of contributors will benefit from it as it will just automatically prettify the code without having to run yarn format which can take some time to complete.

That said, I would totally understand if the team doesn't prefer any settings at all.

What's Changed

Recommended Extensions (.vscode/extensions.json)

  • ESLint (dbaeumer.vscode-eslint) - For JavaScript/TypeScript linting
  • Prettier (esbenp.prettier-vscode) - For consistent code formatting
  • TypeScript Next (ms-vscode.vscode-typescript-next) - Latest TypeScript language features
  • Code Spell Checker (streetsidesoftware.code-spell-checker) - Catch typos in code and comments
  • YAML (redhat.vscode-yaml) - For GitHub workflows and config files
  • JSON (ms-vscode.vscode-json) - Enhanced JSON editing for package.json and configs

Editor Settings (.vscode/settings.json)

Auto-formatting on save:

  • "editor.formatOnSave": true - Automatically formats code with Prettier when saving
  • "editor.defaultFormatter": "esbenp.prettier-vscode" - Uses Prettier as the default formatter for all files
  • Language-specific Prettier formatting for JavaScript and TypeScript

Performance optimizations:

  • Excludes build artifacts (dist/, dist-cjs/, .turbo/) from file watching and search
  • Excludes node_modules and yarn.lock from search to improve performance

Why These Changes?

Minimal and Non-Invasive:
These settings only enhance the existing tooling (ESLint, Prettier, TypeScript) that's already configured in the repository. No new tools or breaking changes are introduced.

Prevent CI Failures:
By automatically fixing ESLint issues and formatting code with Prettier on save, developers are less likely to have their CI builds fail due to linting or formatting violations. This saves time in the development cycle and reduces the need for "fix formatting" commits.

Consistent Developer Experience:
All team members will have the same formatting and linting behavior regardless of their individual VS Code setup, leading to more consistent code contributions.

Performance Benefits:
The exclusion patterns prevent VS Code from indexing build artifacts and dependencies, making the editor more responsive in this large monorepo.

- Add recommended extensions for optimal development experience
  - ESLint, Prettier, TypeScript Next, Code Spell Checker, YAML, JSON
- Improve editor settings with auto-formatting and code actions
  - Enable format on save with Prettier as default formatter
  - Add explicit ESLint fix and import organization on save
- Configure search and file exclusions for better performance
  - Exclude build artifacts, node_modules, and turbo cache
- Set TypeScript preferences for relative import paths
- Fix cSpell configuration format (enabledFileTypes vs enableFiletypes)
Copy link

vercel bot commented Jun 17, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchainjs-docs ✅ Ready (Inspect) Visit Preview Jun 17, 2025 3:18am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ⬜️ Ignored (Inspect) Jun 17, 2025 3:18am

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. auto:nit Small modifications/deletions, fixes, deps or improvements to existing code or docs labels Jun 17, 2025
@hntrl
Copy link
Member

hntrl commented Jun 17, 2025

Thank you @christian-bromann!

@hntrl hntrl merged commit 2cb064d into langchain-ai:main Jun 17, 2025
5 checks passed
@christian-bromann christian-bromann deleted the cb/vscode-settings branch June 17, 2025 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto:nit Small modifications/deletions, fixes, deps or improvements to existing code or docs size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants