OfficeDev / OfficeDev/Office-Addin-Scripts

eslint-plugin-office-addins: no-empty-load when variable is used

Open
#941 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

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

  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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.