Skip to content

[Code Quality] Fix ESLint no-core-exportvariable-non-string rule: extend alias coverage to coreObj #45864

Description

@github-actions

Description

The ESLint rule gh-aw-custom/no-core-exportvariable-non-string only matches callee.object.name === "core", making it blind to coreObj.exportVariable(...) calls. This diverges from the plugin's own CORE_ALIASES = {core, coreObj} convention used by sibling rules require-return-after-core-setfailed and require-await-core-summary-write.

Grounded blind call sites in actions/setup/js/parse_mcp_gateway_log.cjs:214 and :220 currently pass strings (.toFixed/String), so this is a coverage/consistency gap, not a live bug.

Suggested Changes

  1. Update the rule implementation to match CORE_ALIASES (both core and coreObj)
  2. Add test cases covering coreObj.exportVariable(nonString) to the rule's test suite

Files Affected

  • ESLint rule file for no-core-exportvariable-non-string (in actions/setup/js/ or eslint-plugin-gh-aw-custom/)
  • Corresponding rule test file

Success Criteria

  • Rule triggers on coreObj.exportVariable(nonString) the same as core.exportVariable(nonString)
  • Existing passing tests still pass
  • New test cases added and passing

Source

Extracted from ESLint Refiner Daily Report #45651

Priority

Low — consistency gap, not a live bug; prevents future false negatives as coreObj usage grows

🔍 Task mining by Discussion Task Miner - Code Quality Improvement Agent · 88 AIC · ⌖ 7.45 AIC · ⊞ 7K ·

  • expires on Jul 16, 2026, 5:21 PM UTC-08:00

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions