Expected behavior
No linting error
Current behavior
An explicit load call on 'selection' for property 'parentContentControlOrNullObject' needs to be made before the property can be read office-addins/load-object-before-read
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
- If I write this JS code :
const selection = context.document.getSelection();
selection.load('parentContentControlOrNullObject/cannotEdit');
await context.sync();
const parentContentControl = selection.parentContentControlOrNullObject;
- I get a linting error that parentContentControlOrNullObject need to be loaded
Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
- Operating System: MacOS 26.2
- Node version: 24
- Office version: latest
- eslint-plugin-office-addins: 4.0.7
Expected behavior
No linting error
Current behavior
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.