Skip to content

refactor: update eslint to v10#7509

Merged
jasonsaayman merged 2 commits intov1.xfrom
refactor/eslint-upgrade-to-latest
Mar 15, 2026
Merged

refactor: update eslint to v10#7509
jasonsaayman merged 2 commits intov1.xfrom
refactor/eslint-upgrade-to-latest

Conversation

@jasonsaayman
Copy link
Copy Markdown
Member

@jasonsaayman jasonsaayman commented Mar 15, 2026

Summary by cubic

Upgrade eslint to v10 and migrate to flat config for cleaner, modern linting across lib. Adds a lint script and removes a stale ESLint directive.

  • Description

    • Replaced .eslintrc.cjs with eslint.config.js using @eslint/js + globals.
    • Scoped to lib/**/*.js; added per-env globals and ignores for adapters and platform files.
    • Disabled reportUnusedDisableDirectives; turned off no-cond-assign and no-useless-assignment; tightened no-unused-vars (args: 'none', caughtErrors: 'none', varsIgnorePattern: '^_').
    • Removed obsolete ESLint comment in lib/core/Axios.js.
    • Dev deps: bumped eslint to ^10.0.3; added @eslint/js and globals.
    • Scripts: added lint (eslint lib/**/*.js); kept fix.
    • Addressed feedback by refining ignore patterns and globals.
  • Testing

    • No tests changed; none needed for config refactor.
    • Verify locally with npm run lint and npm run fix.
    • Note: eslint v10 requires Node 20+. Ensure dev environment meets this.

Written for commit 31dd93f. Summary will update on new commits.

@jasonsaayman jasonsaayman self-assigned this Mar 15, 2026
@jasonsaayman jasonsaayman added priority::medium A medium priority commit::refactor The PR is related to refactoring labels Mar 15, 2026
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 5 files

Confidence score: 4/5

  • This PR is likely safe to merge, with minimal risk: the reported issue is configuration-level and does not indicate an immediate runtime break.
  • In eslint.config.js, enabling both browser and node globals for all lib files can hide environment-specific mistakes, reducing linting’s ability to catch cross-platform global misuse in adapters.
  • Because the issue is moderate severity (5/10) and focused on static checks rather than confirmed functional regression, it looks important to fix soon but not necessarily merge-blocking.
  • Pay close attention to eslint.config.js - mixed global settings may mask browser/node boundary errors.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="eslint.config.js">

<violation number="1" location="eslint.config.js:15">
P2: Don't enable both browser and node globals for every `lib` file. This masks environment-specific mistakes in the browser and node adapters, so cross-platform global usage stops being linted.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@jasonsaayman jasonsaayman merged commit 8077435 into v1.x Mar 15, 2026
13 checks passed
@jasonsaayman jasonsaayman deleted the refactor/eslint-upgrade-to-latest branch March 15, 2026 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commit::refactor The PR is related to refactoring priority::medium A medium priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant