Skip to content
This repository is currently being migrated. It's locked while the migration is in progress.

VACMS-24047: Moderate alerts root#24194

Open
omahane wants to merge 45 commits into
mainfrom
VACMS-24047-moderate-alerts-root
Open

VACMS-24047: Moderate alerts root#24194
omahane wants to merge 45 commits into
mainfrom
VACMS-24047-moderate-alerts-root

Conversation

@omahane
Copy link
Copy Markdown
Contributor

@omahane omahane commented May 1, 2026

Description

Relates to #24047

Generated description

(Select this text, hit the Copilot button, and select "Generate".)

Testing done

Screenshots

QA steps

What needs to be checked to prove this works?
What needs to be checked to prove it didn't break any related things?
What variations of circumstances (users, actions, values) need to be checked?

As user uid with user_role

  1. Do this
    • Validate that
  2. Then
    • Validate that
  3. Then validate Acceptance Criteria from issue
    • a
    • b
    • c

Definition of Done

  • Documentation has been updated, if applicable.
  • Tests have been added if necessary.
  • Automated tests have passed.
  • Code Quality Tests have passed.
  • Acceptance Criteria in related issue are met.
  • Manual Code Review Approved.
  • If there are field changes, front end output has been thoroughly checked.

Select Team for PR review

  • CMS Team
  • Public websites
  • Facilities
  • User support
  • Accelerated Publishing

Is this PR blocked by another PR?

  • DO NOT MERGE

Does this PR need review from a Product Owner

  • Needs PO review

CMS user-facing announcement

Is an announcement needed to let editors know of this change?

  • Yes, and it's written in issue ____ and queued for publication.
    • Merge and ping the UX writer so they are ready to publish after deployment
  • Yes, but it hasn't yet been written
    • Don't merge yet -- ping the UX writer to write and queue content
  • No announcement is needed for this code change.
    • Merge & carry on unburdened by announcements

Copilot AI review requested due to automatic review settings May 1, 2026 02:53
@omahane omahane requested review from a team as code owners May 1, 2026 02:53
@va-cms-bot va-cms-bot temporarily deployed to Tugboat May 1, 2026 02:53 Destroyed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

Checking composer.lock changes...

Copy link
Copy Markdown
Contributor

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

Note

Copilot was unable to run its full agentic suite in this review.

Updates the JavaScript linting toolchain/configuration (likely to address moderate security alerts) by migrating to ESLint 9’s flat config and adjusting CI/scripts accordingly.

Changes:

  • Upgrade ESLint/Prettier (and cypress-parallel) and add a new eslint.config.js flat configuration.
  • Update npm scripts and the CI ESLint workflow flags to rely on the flat config.
  • Remove multiple inline eslint-disable comments across Cypress tests and custom JS.

Reviewed changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
tests/cypress/support/commands.js Removes disable comments (but leaves whitespace and retains console.log).
tests/cypress/support/accessibility.js Removes disable comments (but leaves whitespace).
tests/cypress/integration/step_definitions/common/the_derivative_of_the_media_image_should_match_the_fixture.js Removes disable comment at file header.
tests/cypress/integration/step_definitions/common/i_stub_form_submission.js Removes disable comments near imports.
tests/cypress/integration/step_definitions/common/i_delete_the_derivative_of_the_media_image.js Removes disable comment at file header.
tests/cypress/integration/step_definitions/common/i_create_a_node.js Removes disable comment at file header.
tests/cypress/integration/step_definitions/api/vba_facility_api_data_flow.js Removes disable comment near Chai assertion expression.
tests/cypress/integration/step_definitions/api/vamc_system_medical_records_office_api_data_flow.js Removes disable comments near Chai assertion expressions.
tests/cypress/integration/step_definitions/api/listing_page_api_data_flow.js Removes disable comment near Chai assertion expression.
package.json Switches eslint scripts to default config, upgrades linting deps.
eslint.config.js Adds new ESLint 9+ flat config with prettier/import plugins and globals.
docroot/modules/custom/va_gov_vamc/js/archive_confirm.es6.js Re-formats early returns/focus call (currently not Prettier-formatted).
docroot/modules/custom/va_gov_media/js/google_analytics.es6.js Re-formats early returns and catch blocks (currently not Prettier-formatted).
docroot/modules/custom/va_gov_media/js/alt_text_validation.es6.js Removes no-undef disable comment (but leaves whitespace).
.github/workflows/continuous_integration.yml Updates ESLint flags to rely on flat config.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json Outdated
Comment thread eslint.config.js Outdated
Comment thread eslint.config.js
Comment on lines +70 to +82
"max-nested-callbacks": ["warn", 3],
"import/no-mutable-exports": "warn",
"no-plusplus": ["warn", { allowForLoopAfterthoughts: true }],
"no-param-reassign": "off",
"no-prototype-builtins": "off",
// "valid-jsdoc": ["warn", { "prefer": { "returns": "return", "property": "prop" }, "requireReturn": false }], // Not supported in ESLint 9
"no-unused-vars": "warn",
"operator-linebreak": ["error", "after", { "overrides": { "?": "ignore", ":": "ignore" } }],
// Best practices
"eqeqeq": ["error", "always", { null: "ignore" }],
"radix": "error",
"no-alert": "warn",
"no-console": "warn",
Copy link

Copilot AI May 1, 2026

Choose a reason for hiding this comment

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

Several rules are set to "warn" while CI/scripts enforce --max-warnings 0, which will fail the lint step on any warning. Either change these to "error" (if they should block) or "off"/scoped overrides (if they are informational), or adjust the max-warnings policy—otherwise this configuration is self-contradictory and likely to break CI once warnings are encountered.

Suggested change
"max-nested-callbacks": ["warn", 3],
"import/no-mutable-exports": "warn",
"no-plusplus": ["warn", { allowForLoopAfterthoughts: true }],
"no-param-reassign": "off",
"no-prototype-builtins": "off",
// "valid-jsdoc": ["warn", { "prefer": { "returns": "return", "property": "prop" }, "requireReturn": false }], // Not supported in ESLint 9
"no-unused-vars": "warn",
"operator-linebreak": ["error", "after", { "overrides": { "?": "ignore", ":": "ignore" } }],
// Best practices
"eqeqeq": ["error", "always", { null: "ignore" }],
"radix": "error",
"no-alert": "warn",
"no-console": "warn",
"max-nested-callbacks": ["error", 3],
"import/no-mutable-exports": "error",
"no-plusplus": ["error", { allowForLoopAfterthoughts: true }],
"no-param-reassign": "off",
"no-prototype-builtins": "off",
// "valid-jsdoc": ["warn", { "prefer": { "returns": "return", "property": "prop" }, "requireReturn": false }], // Not supported in ESLint 9
"no-unused-vars": "error",
"operator-linebreak": ["error", "after", { "overrides": { "?": "ignore", ":": "ignore" } }],
// Best practices
"eqeqeq": ["error", "always", { null: "ignore" }],
"radix": "error",
"no-alert": "error",
"no-console": "error",

Copilot uses AI. Check for mistakes.
Comment thread eslint.config.js
"eqeqeq": ["error", "always", { null: "ignore" }],
"radix": "error",
"no-alert": "warn",
"no-console": "warn",
Copy link

Copilot AI May 1, 2026

Choose a reason for hiding this comment

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

Several rules are set to "warn" while CI/scripts enforce --max-warnings 0, which will fail the lint step on any warning. Either change these to "error" (if they should block) or "off"/scoped overrides (if they are informational), or adjust the max-warnings policy—otherwise this configuration is self-contradictory and likely to break CI once warnings are encountered.

Suggested change
"no-console": "warn",
"no-console": "error",

Copilot uses AI. Check for mistakes.
Comment thread tests/cypress/support/commands.js Outdated
Comment thread docroot/modules/custom/va_gov_vamc/js/archive_confirm.es6.js Outdated
Comment thread docroot/modules/custom/va_gov_media/js/google_analytics.es6.js Outdated
Comment thread docroot/modules/custom/va_gov_media/js/google_analytics.es6.js Outdated
Comment thread docroot/modules/custom/va_gov_media/js/google_analytics.es6.js Outdated
Comment on lines 24 to 25
expect(uuid, `Expected to find a UUID for path: ${path}`).to.not.be
.undefined;
Copy link

Copilot AI May 1, 2026

Choose a reason for hiding this comment

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

Removing the no-unused-expressions disable comment may reintroduce lint failures if no-unused-expressions (commonly enabled via ESLint recommended) is active, because Chai’s property assertions like .to.not.be.undefined; are treated as unused expressions. To avoid needing disables, prefer an assertion form that doesn’t rely on property side effects (e.g., to.exist, or to.not.equal(undefined)), or configure the rule appropriately for Chai/Cypress tests.

Suggested change
expect(uuid, `Expected to find a UUID for path: ${path}`).to.not.be
.undefined;
expect(uuid, `Expected to find a UUID for path: ${path}`).to.not.equal(
undefined
);

Copilot uses AI. Check for mistakes.
@va-cms-bot va-cms-bot temporarily deployed to Tugboat May 1, 2026 03:12 Destroyed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

Checking composer.lock changes...

@va-cms-bot va-cms-bot temporarily deployed to Tugboat May 1, 2026 03:24 Destroyed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

Checking composer.lock changes...

@va-cms-bot va-cms-bot temporarily deployed to Tugboat May 1, 2026 08:39 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat May 1, 2026 13:50 Destroyed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

Checking composer.lock changes...

@va-cms-bot va-cms-bot temporarily deployed to Tugboat May 1, 2026 13:59 Destroyed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

Checking composer.lock changes...

@va-cms-bot va-cms-bot temporarily deployed to Tugboat May 1, 2026 14:37 Destroyed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

Checking composer.lock changes...

@va-cms-bot va-cms-bot temporarily deployed to Tugboat May 1, 2026 15:31 Destroyed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

Checking composer.lock changes...

@va-cms-bot va-cms-bot temporarily deployed to Tugboat May 2, 2026 13:20 Destroyed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 2, 2026

Checking composer.lock changes...

@va-cms-bot va-cms-bot temporarily deployed to Tugboat May 2, 2026 13:22 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat May 2, 2026 13:33 Destroyed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 2, 2026

Checking composer.lock changes...

@va-cms-bot va-cms-bot temporarily deployed to Tugboat May 2, 2026 14:53 Destroyed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 2, 2026

Checking composer.lock changes...

@va-cms-bot va-cms-bot temporarily deployed to Tugboat May 3, 2026 08:39 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat May 4, 2026 08:40 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat May 4, 2026 17:00 Destroyed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

Checking composer.lock changes...

@va-cms-bot va-cms-bot temporarily deployed to Tugboat May 4, 2026 17:02 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat May 4, 2026 19:38 Destroyed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

Checking composer.lock changes...

@va-cms-bot va-cms-bot temporarily deployed to Tugboat May 5, 2026 08:35 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat May 6, 2026 08:37 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat May 7, 2026 08:33 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat May 8, 2026 08:28 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat May 9, 2026 08:29 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat May 10, 2026 08:28 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat May 11, 2026 08:30 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat May 12, 2026 08:30 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat May 13, 2026 08:31 Destroyed
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.

3 participants