[PR #24514] chore: optimize pnpm version management and migrate from next lint to eslint cli #30669

Closed
opened 2026-02-21 20:47:59 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/24514

State: closed
Merged: Yes


Summary

This PR optimizes pnpm version management and migrates from the deprecated next lint command to the modern ESLint CLI as recommended by Next.js 15.5+.

Changes:

  1. DevContainer Optimization: Replace hardcoded pnpm version with corepack enable for automatic version management from package.json
  2. ESLint Migration: Use official Next.js codemod to migrate from next lint to eslint CLI
  3. Dependencies Update: Upgrade to Next.js 15.5.0 and related dependencies
  4. Configuration Enhancement: Add proper Next.js ESLint plugin configuration

Benefits:

  • Fixes "Next.js plugin not detected" warning
  • Future-proof against Next.js 16 (where next lint will be removed)
  • Unified lint system without conflicts
  • Automatic pnpm version management via Corepack
  • Follows official Next.js best practices

Testing:

  • All existing lint rules continue to work
  • pnpm fix command functions correctly
  • No breaking changes to development workflow

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
**Original Pull Request:** https://github.com/langgenius/dify/pull/24514 **State:** closed **Merged:** Yes --- ## Summary This PR optimizes pnpm version management and migrates from the deprecated `next lint` command to the modern ESLint CLI as recommended by Next.js 15.5+. ### Changes: 1. **DevContainer Optimization**: Replace hardcoded pnpm version with `corepack enable` for automatic version management from `package.json` 2. **ESLint Migration**: Use official Next.js codemod to migrate from `next lint` to `eslint` CLI 3. **Dependencies Update**: Upgrade to Next.js 15.5.0 and related dependencies 4. **Configuration Enhancement**: Add proper Next.js ESLint plugin configuration ### Benefits: - ✅ Fixes "Next.js plugin not detected" warning - ✅ Future-proof against Next.js 16 (where `next lint` will be removed) - ✅ Unified lint system without conflicts - ✅ Automatic pnpm version management via Corepack - ✅ Follows official Next.js best practices ### Testing: - All existing lint rules continue to work - `pnpm fix` command functions correctly - No breaking changes to development workflow ## Checklist - [x] This change requires a documentation update, included: [Dify Document](https://github.com/langgenius/dify-docs) - [x] I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!) - [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change. - [x] I've updated the documentation accordingly. - [x] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods
yindo added the pull-request label 2026-02-21 20:47:59 -05:00
yindo closed this issue 2026-02-21 20:48:00 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#30669