OfficeDev / OfficeDev/Office-Addin-Scripts
eslint-plugin-office-addins: no-empty-load when variable is used
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 194
- Forks
- 117
- Avg merge
- 1d 32m
- Merged PRs (30d)
- 2
Description
Expected behavior
no-empty-load should not be violated if load has as argument.
Current behavior
The following violates no-empty-load:
const loadProperties = ['rowIndex', 'columnIndex'];
range.load(loadProperties);
It can be fixed by providing the argument without using a variable:
range.load(['rowIndex', 'columnIndex']);
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 locating the TypeScript implementation of the no-empty-load rule and its tests. Reproduce the issue with a variable passed to load, then update the rule so this usage is accepted while the existing invalid cases remain covered by the test suite.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100