Skip to content

Conversation

@rjrudin
Copy link
Contributor

@rjrudin rjrudin commented Oct 17, 2025

Zillion little changes, but any issues should cause test failures locally and on Jenkins.

Copilot used auto-fix for these changes. There are 55 more issues to be fixed that require human judgment. Those will be dealt with later.

Zillion little changes, but any issues should cause test failures locally and on Jenkins.
Copilot AI review requested due to automatic review settings October 17, 2025 14:05
@github-actions
Copy link

github-actions bot commented Oct 17, 2025

Copyright Validation Results
Total: 28 | Passed: 27 | Failed: 0 | Skipped: 1 | at: 2025-10-17 14:09:17 UTC | commit: 746bc77

⏭️ Skipped (Excluded) Files

  • lib/www-authenticate-patched/md5.js

✅ Valid Files

  • eslint.config.js
  • lib/documents.js
  • lib/extlibs.js
  • lib/graphs.js
  • lib/internal.js
  • lib/marklogic.js
  • lib/mllog.js
  • lib/mlutil.js
  • lib/operation.js
  • lib/optional.js
  • lib/patch-builder.js
  • lib/plan-builder-base.js
  • lib/query-builder.js
  • lib/requester.js
  • lib/resources-config.js
  • lib/resources-exec.js
  • lib/responder.js
  • lib/rest-server-properties.js
  • lib/rows.js
  • lib/server-exec.js
  • lib/transactions.js
  • lib/transforms.js
  • lib/values-builder.js
  • lib/values.js
  • lib/www-authenticate-patched/parsers.js
  • lib/www-authenticate-patched/user-credentials.js
  • lib/www-authenticate-patched/www-authenticate.js

✅ All files have valid copyright headers!

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces linting enforcement for modern JavaScript (ES6+) and refactors many variable declarations from var to const or let across the codebase to align with the new rules.

  • Adds ESLint rules prefer-const and no-var (both as errors).
  • Refactors numerous files replacing var with const/let; adds semicolons and minor stylistic braces.
  • No functional logic changes intended; primarily modernization for consistency with new lint standards.

Reviewed Changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
lib/www-authenticate-patched/www-authenticate.js Replaces var with const/let; adds braces and semicolons for clarity.
lib/www-authenticate-patched/user-credentials.js Modernizes variable declarations to const/let.
lib/www-authenticate-patched/parsers.js Updates var to const/let in parsing logic.
lib/www-authenticate-patched/md5.js Uses const for crypto import.
lib/values.js Converts var to const/let across read logic.
lib/values-builder.js Modernizes builder helper variables.
lib/transforms.js Replaces var with const/let in transform operations.
lib/transactions.js Updates transaction handling with const/let.
lib/server-exec.js Refactors execution logic variable declarations; minor property access change.
lib/rows.js Changes var to const/let in row query and streaming functions.
lib/rest-server-properties.js Modernizes variable declarations.
lib/responder.js Large refactor replacing var with const/let; adds braces and gzip handling with updated syntax.
lib/resources-exec.js Updates request construction to const/let.
lib/resources-config.js Modernizes resource config code.
lib/requester.js Refactors request orchestration using const/let.
lib/query-builder.js Extensive var-to-const/let refactor across query construction utilities.
lib/plan-builder-base.js Adjusts loop counters and temp variables to const/let.
lib/patch-builder.js Modernizes patch operation helpers.
lib/optional.js Updates helper to use const.
lib/operation.js Refactors internals with const/let.
lib/mlutil.js Modernizes utilities (asArray, copyProperties, etc.).
lib/mllog.js Uses const for util import.
lib/marklogic.js Broad refactor of client setup to const/let.
lib/internal.js Minor update (let→const) in request options.
lib/graphs.js Modernizes graph handling functions.
lib/extlibs.js Uses const/let for extension library management.
lib/documents.js Large refactor adopting const/let throughout document CRUD and batch operations.
eslint.config.js Adds prefer-const and no-var lint rules (error level).

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

"no-undef": "error",

// ES6+ modernization - GO TIME! 🚀
"prefer-const": "error", // Use const for variables never reassigned
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

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

Adding prefer-const as an error will cause lint failures because this PR leaves numerous let declarations that are never reassigned (e.g., server-exec.js line 247 source is not reassigned). Either convert such let usages to const in this PR or temporarily set prefer-const to 'warn' to avoid blocking builds.

Suggested change
"prefer-const": "error", // Use const for variables never reassigned
"prefer-const": "warn", // Use const for variables never reassigned (temporarily set to warn to avoid blocking builds)

Copilot uses AI. Check for mistakes.
var source = isInvoke ? arg.path : arg.source;
var variables = null;
var txid = null;
let source = isInvoke ? arg.path : arg.source;
Copy link

Copilot AI Oct 17, 2025

Choose a reason for hiding this comment

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

source is assigned once and never reassigned; with prefer-const enforced, change let to const to satisfy the new lint rule and improve immutability.

Copilot uses AI. Check for mistakes.
@rjrudin rjrudin merged commit 305041d into develop Oct 17, 2025
5 checks passed
@rjrudin rjrudin deleted the feature/24763-lint-const branch October 17, 2025 16:37
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.

4 participants