OfficeDev / OfficeDev/Office-Addin-Scripts
eslint-plugin-office-addins: no-navigational-load conflict with load-objects-before-read
Nobody has claimed this yet.
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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