Removes cli eslint from npm package#7161
Merged
milanholemans merged 2 commits intopnp:mainfrom Mar 7, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses the security advisory in #7159 by removing the eslint-plugin-cli-microsoft365 package footprint from installation/audit results, while keeping the repository’s internal ESLint rules usable for development.
Changes:
- Removed the local
eslint-plugin-cli-microsoft365dependency and its shrinkwrap entries. - Refactored the internal ESLint rules implementation from CommonJS to ESM and updated
eslint.config.mjsto consume it. - Ensured
eslint-rules/is excluded from the published npm package.
Reviewed changes
Copilot reviewed 8 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| package.json | Removes the local eslint-plugin-cli-microsoft365 devDependency reference. |
| npm-shrinkwrap.json | Drops the linked local package entries so npm audit no longer reports it. |
| eslint.config.mjs | Switches to importing the internal rules module without depending on an installed plugin package. |
| eslint-rules/package.json | Removes the nested package identity for the internal rules (no longer an npm package). |
| eslint-rules/package-lock.json | Removes the nested lockfile for the internal rules package. |
| eslint-rules/lib/rules/no-by-server-relative-url-usage.js | Converts the rule export to ESM. |
| eslint-rules/lib/rules/correct-command-name.js | Converts the rule export to ESM. |
| eslint-rules/lib/rules/correct-command-class-name.js | Converts the rule export to ESM and preserves named exports for testing. |
| eslint-rules/lib/index.js | Converts the plugin entry point to ESM imports/exports. |
| .npmignore | Excludes eslint-rules/ from the npm package. |
Files not reviewed (2)
- eslint-rules/package-lock.json: Language not supported
- npm-shrinkwrap.json: Language not supported
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #7159
This PR: