Skip to content

feat!: move environment-specific plugins to optional peer dependencies#546

Open
JoshTheWanderer wants to merge 4 commits intomainfrom
feat/optional-peer-deps
Open

feat!: move environment-specific plugins to optional peer dependencies#546
JoshTheWanderer wants to merge 4 commits intomainfrom
feat/optional-peer-deps

Conversation

@JoshTheWanderer
Copy link
Copy Markdown
Member

Summary

  • Moves environment-specific ESLint plugins from optionalDependencies to optional peerDependencies
  • Consumers now only install the plugins they actually need for their environment
  • Reduces unnecessary dependency bloat for projects that don't use all supported frameworks

BREAKING CHANGE

Environment-specific plugins are no longer installed automatically. Users must manually install the peer dependencies required for their chosen config. For example:

# Angular project
npm install @etchteam/eslint-config angular-eslint

# Next.js project
npm install @etchteam/eslint-config eslint-plugin-react eslint-plugin-jsx-a11y eslint-plugin-react-hooks @next/eslint-plugin-next

# Node.js project (no extra deps needed)
npm install @etchteam/eslint-config

Affected plugins

Plugin Used by
angular-eslint angular
@next/eslint-plugin-next nextjs
eslint-plugin-react react, nextjs, preact, default
eslint-plugin-jsx-a11y react, nextjs, preact, default
eslint-plugin-react-hooks nextjs
eslint-plugin-lit web-components
@darraghor/eslint-plugin-nestjs-typed nestjs

🤖 Generated with Claude Code

Environment-specific ESLint plugins (angular-eslint, @next/eslint-plugin-next,
eslint-plugin-react, eslint-plugin-jsx-a11y, eslint-plugin-react-hooks,
eslint-plugin-lit, @darraghor/eslint-plugin-nestjs-typed) are now optional
peer dependencies instead of optional dependencies. This means npm will no
longer automatically install them — consumers must explicitly install only
the plugins they need for their environment.

BREAKING CHANGE: Environment-specific plugins are no longer installed
automatically. Users must manually install the peer dependencies required
for their chosen config (e.g. `npm install angular-eslint` when using
`@etchteam/eslint-config/angular`).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mergify mergify bot requested review from a team and ella-etch and removed request for a team March 31, 2026 12:49
@mergify mergify bot requested a review from a team March 31, 2026 12:49
The plugins are needed as devDependencies so they're available when
linting the source code and running test configs in CI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@JoshTheWanderer JoshTheWanderer marked this pull request as draft March 31, 2026 17:09
DanWebb
DanWebb previously approved these changes Mar 31, 2026
},
"eslint-plugin-react-hooks": {
"optional": true
},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🎯 suggestion: ‏It'd probably be helpful to document which peer dep(s) is needed for which config in the readme

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 1, 2026

@JoshTheWanderer JoshTheWanderer marked this pull request as ready for review April 1, 2026 17:03
@mergify mergify bot requested a review from a team April 1, 2026 17:03
@mergify mergify bot requested a review from a team April 1, 2026 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants