Skip to content

eslint-plugin-office-addins: no-navigational-load conflict with load-objects-before-read #940

@lbennett-stacki

Description

@lbennett-stacki

Expected behavior

Rules + docs should lead me to a solution

Current behavior

The following results in load-object-before-read violation, suggesting to load values/length, but this code works in the Excel add-in.

const range = worksheet.getUsedRange();
range.load('values');

for (let row = 0; row < range.values.length; row++) { }

Changing the load arguments to the following results in no-navigational-load violation.

range.load(['values', 'values/length']);

Steps to Reproduce

Please see snippet above

Context

  • Operating System: MacOS
  • Node version: v22.14.0
  • Office version: 16.98 (and latest sharepoint version)
  • Tool version: ^4.0.3

Failure Logs

Please see snippet above

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