Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion playgrounds/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@types/node": "catalog:",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"eslint": "^9.39.2",
"eslint": "^10.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check for ESLint config files in playgrounds/nextjs
echo "=== Searching for ESLint configs in playgrounds/nextjs ==="
find playgrounds/nextjs -maxdepth 2 \( -name ".eslintrc*" -o -name "eslint.config.*" -o -name ".eslintignore" \) 2>/dev/null

echo ""
echo "=== Checking root directory for shared ESLint configs ==="
find . -maxdepth 1 \( -name ".eslintrc*" -o -name "eslint.config.*" \) 2>/dev/null

echo ""
echo "=== Listing contents of playgrounds/nextjs ==="
ls -la playgrounds/nextjs/ 2>/dev/null | head -20

Repository: tailwindlabs/tailwindcss

Length of output: 928


🏁 Script executed:

cat -n playgrounds/nextjs/.eslintrc.json

Repository: tailwindlabs/tailwindcss

Length of output: 260


Migrate to flat config before upgrading ESLint to v10.

This playground uses a legacy .eslintrc.json file, which ESLint 10 no longer supports. Upgrading to ^10.0.0 will break the next lint command. Convert the config to eslint.config.js (flat config format) before this upgrade.

The current .eslintrc.json extends next/core-web-vitals and disables two React rules. Verify that the equivalent Next.js 16+ flat config integration supports this setup.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@playgrounds/nextjs/package.json` at line 23, The package.json bump to
"eslint": "^10.0.0" will break the legacy .eslintrc.json; convert the repo
ESLint config to a flat config file named eslint.config.js and remove/stop using
.eslintrc.json, migrating the extends "next/core-web-vitals" to the Next.js flat
config integration and re-declare the two disabled React rules (the same rule
names from the .eslintrc.json) as turned off in the new config; after creating
eslint.config.js, verify that running `next lint` works and that Next.js 16+
flat config integration is used instead of the old .eslintrc.json.

"eslint-config-next": "^16.1.6",
"typescript": "^5.9.3"
}
Expand Down
2 changes: 1 addition & 1 deletion playgrounds/v3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"autoprefixer": "^10.4.24",
"eslint": "^9.39.2",
"eslint": "^10.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

ESLint 10 breaking changes eslintrc flat config migration

💡 Result:

ESLint 10: key breaking changes (esp. .eslintrc → flat config)

  • Legacy .eslintrc is fully removed: .eslintrc.* and .eslintignore are no longer read; ESLINT_USE_FLAT_CONFIG is no longer honored; /* eslint-env */ comments are now errors; and several eslintrc-era CLI flags are removed (--no-eslintrc, --env, --rulesdir, --ignore-path, --resolve-plugins-relative-to). [1]
  • Config lookup changed: ESLint now finds eslint.config.* starting from each linted file’s directory (not just the current working directory). This enables multiple configs in one run (monorepos), but can change which config gets applied. [1]
  • Node.js support floor moved: Node < 20.19.0 (and Node 21/23) are unsupported (see exact supported ranges in the release notes). [1]
  • Integration/API removals related to legacy config: loadESLint() always returns ESLint; Linter’s configType can only be "flat"; LegacyESLint (and some other /use-at-your-own-risk exports) are removed. [1]

Migration: .eslintrceslint.config.js (flat config)

  1. Generate a starting flat config automatically:

    npx `@eslint/migrate-config` .eslintrc.json

    (Works best for .eslintrc JSON/YAML; .eslintrc.js is converted from evaluated output and may need more manual cleanup.) [2][3]

  2. Move ignore patterns from .eslintignore into flat config using ignores (top-level in your exported config array/object). [1][2]

  3. Replace env / --env usage with languageOptions.globals (and languageOptions.ecmaVersion / sourceType as needed). [1][2]

  4. Update plugins & shareable configs:

    • Flat config generally expects direct plugin imports (rather than string names + resolver behavior). [1][2]
    • If you depend on shareable configs that are still eslintrc-format, use FlatCompat from @eslint/eslintrc to bridge them during migration. [2]
  5. Monorepos: re-check where you place configs because of the new per-file lookup. You may want a root eslint.config.js plus package-level eslint.config.js files. [1]


Sources

  • [1] ESLint v10.0.0 release notes (eslint.org)
  • [2] ESLint “Configuration Migration Guide” (eslintrc → flat config) (eslint.org)
  • [3] “Introducing the ESLint Configuration Migrator” (@eslint/migrate-config) (eslint.org)

Citations:


🏁 Script executed:

# Search for ESLint config files in playgrounds/v3
find playgrounds/v3 -maxdepth 2 \( -name ".eslintrc*" -o -name "eslint.config.*" -o -name ".eslintignore" \) 2>/dev/null

# Check root directory for ESLint configs that might be inherited
find . -maxdepth 1 \( -name ".eslintrc*" -o -name "eslint.config.*" \) 2>/dev/null

# Look for package.json scripts that reference linting
rg -n "eslint|lint" playgrounds/v3/package.json -A 2

Repository: tailwindlabs/tailwindcss

Length of output: 284


🏁 Script executed:

# Check the .eslintrc.json file
cat playgrounds/v3/.eslintrc.json

# Verify no flat config exists
ls -la playgrounds/v3/eslint.config.* 2>/dev/null || echo "No eslint.config.* found"

Repository: tailwindlabs/tailwindcss

Length of output: 236


Migrate playgrounds/v3 to ESLint flat config before upgrading to v10 (Line 22).

ESLint v10 fully removes legacy .eslintrc.* support. The playground currently uses .eslintrc.json (extending next/core-web-vitals) but has no flat config yet. Upgrading to eslint@^10.0.0 will cause next lint to fail.

Migrate to eslint.config.js using:

npx `@eslint/migrate-config` playgrounds/v3/.eslintrc.json

Then move ignore patterns and ensure the shareable config is correctly imported (or use FlatCompat from @eslint/eslintrc as a bridge if needed).

🤖 Prompt for AI Agents
In `@playgrounds/v3/package.json` at line 22, Package.json currently pins
"eslint": "^10.0.0" while the playground still uses a legacy .eslintrc.json;
migrate the project to a flat config before upgrading by running the recommended
migration command (npx `@eslint/migrate-config` playgrounds/v3/.eslintrc.json),
then add an eslint.config.js at the repo root that imports or recreates your
existing settings (or use FlatCompat from `@eslint/eslintrc` to bridge shareable
configs like next/core-web-vitals), and ensure ignore patterns from
.eslintignore are moved into the new flat config so that running next lint
succeeds with "eslint": "^10.0.0".

"eslint-config-next": "^16.1.6",
"typescript": "^5.9.3"
}
Expand Down
Loading