Skip to content

Add a feature for sharing include/exclude lists across commands #73

@autarch

Description

@autarch

It's pretty common to run multiple tools on the same set of files. For example, with JS code you might run prettier and eslint. It'd be nice if there was a way to share these lists across commands. Otherwise if you have a long list you just have to copy it, which is a maintenance hassle.

Here's an idea of the syntax off the top of my head:

[shared.includes]
js = [ "..." ]

[shared.excludes]
js = [ "..." ]

[commands.prettier]
shared-include = "js"
shared-exclude = "js"

[commands.eslint]
shared-include = "js"
shared-exclude = "js"

I think the shared.(include|exclude) bit makes sense. I'm less certain of the shared-(include|exclude) naming. I would also note that these should be strings or arrays of strings, to allow for using multiple shared lists. When these are used, we also want to allow an include or exclude key. I think these would be combined, with the per-command keys coming last in the list, so that they override anything in the shared lists.

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