OfficeDev / OfficeDev/Office-Addin-Scripts

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

Open
#940 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs triage
Dominant language
TypeScript
Stars
194
Forks
117
Avg merge
1d 32m
Merged PRs (30d)
2

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the TypeScript snippet with Office-Addin-Scripts tool version ^4.0.3, then inspect the load-object-before-read and no-navigational-load rules and their documentation. Done means the interaction has a documented or validated resolution that does not produce contradictory violations.

Written by the indexing model from the issue text.

Assessment

Tech stack
eslint, typescript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.