Skip to content

Removes cli eslint from npm package#7161

Merged
milanholemans merged 2 commits intopnp:mainfrom
milanholemans:remove-eslint-dependency
Mar 7, 2026
Merged

Removes cli eslint from npm package#7161
milanholemans merged 2 commits intopnp:mainfrom
milanholemans:remove-eslint-dependency

Conversation

@milanholemans
Copy link
Contributor

Closes #7159


This PR:

  • Refactors our ESLint rules to ESM.
  • Removes ESLint rules from the project dependencies.
  • Excludes ESLint rules from the NPM package.

Copilot AI review requested due to automatic review settings March 6, 2026 23:49
@milanholemans milanholemans added pr-bugfix pr-priority Process this PR asap labels Mar 6, 2026
@milanholemans milanholemans changed the title Removes cli es-lint from npm package Removes cli eslint from npm package Mar 6, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-microsoft365 dependency and its shrinkwrap entries.
  • Refactored the internal ESLint rules implementation from CommonJS to ESM and updated eslint.config.mjs to 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>
@milanholemans milanholemans merged commit 2fc15cc into pnp:main Mar 7, 2026
10 checks passed
@milanholemans milanholemans deleted the remove-eslint-dependency branch March 7, 2026 14:15
@kjenney
Copy link

kjenney commented Mar 7, 2026

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug report: Major security advisory

3 participants