Skip to content

Comments

Fix ESLint 10 compatibility in eslint.config.mjs#28

Merged
NiveditJain merged 5 commits intodependabot/npm_and_yarn/eslint-10.0.2from
copilot/sub-pr-23
Feb 24, 2026
Merged

Fix ESLint 10 compatibility in eslint.config.mjs#28
NiveditJain merged 5 commits intodependabot/npm_and_yarn/eslint-10.0.2from
copilot/sub-pr-23

Conversation

Copy link
Contributor

Copilot AI commented Feb 24, 2026

Description

Two ESLint 10 compatibility issues are fixed in eslint.config.mjs:

  • Explicit React version — adds settings: { react: { version: "19" } } to prevent eslint-plugin-react from auto-detecting the React version via the now-removed context.getFilename() API
  • Parser override for non-TS fileseslint-config-next uses the Babel parser bundled in next/dist/compiled/babel/eslint-parser for .js/.mjs/.mts/.cts files; that parser's scope manager lacks addGlobals() required by ESLint 10. Overrides those files to use @typescript-eslint/parser (already a transitive dep, supports ESLint ^8 || ^9 || ^10)
import tsParser from "@typescript-eslint/parser";

const config = [
  { ignores: ["dist/"] },
  ...nextConfig,
  { settings: { react: { version: "19" } } },
  {
    files: ["**/*.{js,jsx,mjs,mts,cts}"],
    languageOptions: { parser: tsParser },
  },
];

Note: .ts/.tsx files were already handled by eslint-config-next's built-in TypeScript config which uses @typescript-eslint/parser.

Also updates package.json and package-lock.json to align with the rebased base branch, picking up dependency bumps (lucide-react 0.575.0, tailwindcss 4.2.1, and related packages) that had been merged into main since the original branch was created. The lockfile is kept byte-for-byte identical to the base branch by using npm ci (instead of npm install) to avoid stripping peer dependency entries (@testing-library/dom and related packages).

Note on CI: The CI workflow is scoped to pull_request: branches: [main] only. Since this is a stacked PR targeting dependabot/npm_and_yarn/eslint-10.0.2 (not main), CI will not trigger on this PR — it will run once the base branch is merged into main.

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation

Checklist

  • npm run lint passes
  • npx tsc --noEmit passes
  • npm run test:run passes
  • npm run build succeeds

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

dependabot bot and others added 2 commits February 24, 2026 06:31
Bumps [eslint](https://github.com/eslint/eslint) from 9.39.2 to 10.0.2.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](eslint/eslint@v9.39.2...v10.0.2)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 10.0.2
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/eslint-10.0.2 branch 2 times, most recently from adec602 to c782653 Compare February 24, 2026 06:38
…parser for JS/MTS/CTS files

Co-authored-by: NiveditJain <40313233+NiveditJain@users.noreply.github.com>
Copilot AI changed the title [WIP] Bump eslint from 9.39.2 to 10.0.2 Fix ESLint 10 compatibility in eslint.config.mjs Feb 24, 2026
Copilot AI requested a review from NiveditJain February 24, 2026 06:47
@NiveditJain NiveditJain marked this pull request as ready for review February 24, 2026 07:45
@NiveditJain
Copy link
Member

@copilot resolve conflicts.

… rebased base branch

Co-authored-by: NiveditJain <40313233+NiveditJain@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 24, 2026

@copilot resolve conflicts.

Conflicts resolved in commit bdfeacc. The base branch (dependabot/npm_and_yarn/eslint-10.0.2) had been rebased to pick up newer dependency bumps merged into main (lucide-react 0.575.0, tailwindcss 4.2.1, etc.). Updated package.json and package-lock.json to match the new base while keeping the ESLint 10 compatibility fixes in eslint.config.mjs intact. npm run lint passes.

@NiveditJain
Copy link
Member

@copilot there are still conflicts. resolve these.

…eer deps)

Co-authored-by: NiveditJain <40313233+NiveditJain@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 24, 2026

@copilot there are still conflicts. resolve these.

Fixed in commit 0bd8308. The previous npm install --legacy-peer-deps had stripped peer dependency entries (@testing-library/dom and related packages) from package-lock.json, leaving it 96 lines short of the base branch. Restored the lockfile using npm ci (which installs from the lockfile without modifying it), so it now exactly matches the base branch. npm run lint still passes.

@NiveditJain
Copy link
Member

@copilot why CI is not here? is it not triggered?

Copy link
Contributor Author

Copilot AI commented Feb 24, 2026

@copilot why CI is not here? is it not triggered?

CI isn't triggered on this PR because the workflow in .github/workflows/ci.yml is configured to only run on pull_request events targeting main:

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

This PR (#28) targets dependabot/npm_and_yarn/eslint-10.0.2, not main, so the CI workflow doesn't activate. The lint fix (npm run lint passes locally) can be validated once this PR is merged into the base branch and that branch is then merged into main, which will trigger the CI check.

Copilot AI requested a review from NiveditJain February 24, 2026 07:58
@NiveditJain NiveditJain merged commit accef02 into dependabot/npm_and_yarn/eslint-10.0.2 Feb 24, 2026
1 check passed
NiveditJain added a commit that referenced this pull request Feb 24, 2026
* Bump eslint from 9.39.2 to 10.0.2

Bumps [eslint](https://github.com/eslint/eslint) from 9.39.2 to 10.0.2.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](eslint/eslint@v9.39.2...v10.0.2)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 10.0.2
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix ESLint 10 compatibility in eslint.config.mjs (#28)

* Bump eslint from 9.39.2 to 10.0.2

Bumps [eslint](https://github.com/eslint/eslint) from 9.39.2 to 10.0.2.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](eslint/eslint@v9.39.2...v10.0.2)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 10.0.2
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Initial plan

* Fix ESLint 10 compatibility: set explicit React version and override parser for JS/MTS/CTS files

Co-authored-by: NiveditJain <40313233+NiveditJain@users.noreply.github.com>

* Resolve conflicts: update package.json and package-lock.json to match rebased base branch

Co-authored-by: NiveditJain <40313233+NiveditJain@users.noreply.github.com>

* Fix package-lock.json to exactly match rebased base branch (restore peer deps)

Co-authored-by: NiveditJain <40313233+NiveditJain@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NiveditJain <40313233+NiveditJain@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NiveditJain <40313233+NiveditJain@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants