Registry / devops / eslint-plugin-office-addins

eslint-plugin-office-addins

JSON →
library4.0.7jsnpmunverified

ESLint plugin for Office Add-ins development. Current stable version 4.0.7, released on an as-needed cadence. It enforces rules specific to Office.js APIs, ensuring best practices and compatibility with Office Add-in platform requirements. Differentiates from generic ESLint plugins by providing rules tailored to Office.js patterns, async Office.js usage, and manifest validation. Provides out-of-the-box configuration for Office Add-in projects, and the package ships with TypeScript type definitions for rule options.

npm install eslint-plugin-office-addins
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-OFFI
E
eslint-plugin-office-addins
devopsjavascriptv4.0.7
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

plugin
import plugin from 'eslint-plugin-office-addins'
const plugin = require('eslint-plugin-office-addins')
ESM default import is preferred; CommonJS require works but may lack TypeScript types
configs
import { configs } from 'eslint-plugin-office-addins'
Named export 'configs' is available for accessing predefined configuration sets
rules
import { rules } from 'eslint-plugin-office-addins'
Named export 'rules' is available for accessing individual rule definitions

Configures ESLint to use the office-addins plugin with recommended rules and additional custom rules for Office.js best practices.

// .eslintrc.js (CommonJS) or .eslintrc.cjs module.exports = { plugins: ['office-addins'], extends: ['plugin:office-addins/recommended'], rules: { 'office-addins/call-sync-before-read': 'error', 'office-addins/load-object-before-use': 'warn', }, };
Debug
Known issues
breakingESLint 9+ required; plugin v4 drops support for ESLint 8 and below.
fix
Upgrade ESLint to ^9.0.0, and update any legacy .eslintrc format if needed.
affects: >=4.0.0
breakingPlugin v4 uses flat config format; .eslintrc files may not be compatible without migration.
fix
Use eslint.config.js with flat config structure; see ESLint flat config migration guide.
affects: >=4.0.0
deprecatedRule 'office-addins/no-excel-in-auto-open' is deprecated in v4, use 'office-addins/avoid-auto-open' instead.
fix
Replace 'office-addins/no-excel-in-auto-open' with 'office-addins/avoid-auto-open' in your config.
affects: >=4.0.0
gotchaPlugin does not work with ESLint 8; if locked to ESLint 8, use plugin v3.x.
fix
Either upgrade ESLint to 9+ or pin eslint-plugin-office-addins@3.x.
affects: >=4.0.0
Errors
Common errors & fixes
Error: Failed to load plugin 'office-addins' declared in 'extends': Cannot find module 'eslint-plugin-office-addins'
Plugin not installed or missing from node_modules.
fix
Run npm install eslint-plugin-office-addins --save-dev
ESLint couldn't find the config 'plugin:office-addins/recommended'.
The plugin version is too old or the config name has changed.
fix
Ensure you are using plugin v4 or later, and use 'plugin:office-addins/recommended' (flat config) or check documentation.
TypeError: Cannot read properties of undefined (reading 'someRule')
Using an invalid or misspelled rule name.
fix
Check the list of available rules from the plugin documentation and correct the rule name.
Upgrade
Version history
4.0.7latest on npm
Audit
Dependencies
eslintrequiredpeer dependency; required as the runtime environment for the plugin
Agent activity
4 hits · last 30 days
node
4
Resources
eslint-plugin-office-addins — npm install eslint-plugin-office-addins · libregistry