Skip to content

Add ESLint plugin for use-monopackages and use-subpaths codemods #9986

@SimenB

Description

@SimenB

Provide a general summary of the feature here

Hello!

I think #9839 is super cool, but after running the codemod, there is nothing to enforce that whatever of use-monopackages and use-subpaths is picked is followed for new code.

I'd like to see an ESLint plugin that does this with an autofix in addition to the codemod (or instead of the codemod, but presumably the codemod is quicker on larger code bases (and the code is already written)).

🤔 Expected Behavior?

Running eslint should warn if the monopackages are not used (and potentially if subpaths aren't used) and provide the relevant autofix

😯 Current Behavior

There is no way to statically catch "regressions" back to individual packages or no subpaths.

💁 Possible Solution

One could run the codemod on CI and error on diffs, but that iteration loop is way worse than haaving ESLint fix it when saving in the idea (or AI agent runs eslint - whatever the workflow is)

🔦 Context

Making sure we don't start importing from the individual packages or not use subpaths

💻 Examples

No response

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions