Skip to content

[RFC] Improve peer dependency handling #249

@reiv

Description

@reiv

Currently the package pulls in dependencies which might not always be required (e.g. React). This makes the setup very easy right now but could bloat in the future.

Approach 1:

  • Mark dependencies like eslint-plugin-react as peer dependencies
  • Mark peer dependencies as optional if they aren't strictly required in all cases
  • Install peer dependencies as part of the setup script (depending on the presets used)
  • No monorepo required
  • Plugins leak into the project's package.json (like in the old days)

Approach 2:

  • Split up into separate packages with (non-peer) dependencies (e.g. linting-preset-react)
  • Setup script assembles these packages
  • Monorepo
  • Plugins remain encapsulated

I think the second approach would also benefit projects which are themselves monorepos (microfrontends anyone?). But versioning everything might become a bit of a pain point.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions