Skip to content

--all and lint-staged don't play well together #34

@10hendersonm

Description

@10hendersonm

When calling markdown-inject --all with lint-staged, lint-staged will tack staged files onto the end of the call.

Example call from lint-staged:

markdown-inject --all --no-follow-symbolic-links "/Users/<me>/development/projects/<my-project>/package.json"

This check causes a code 1 exit:

if (options.all && globPattern) {
console.error(
`Options -a / --all and a globPattern ('${globPattern}') can not be provided together. Please select one or the other.`
)
return process.exit(1)
}

Example:

Options -a / --all and a globPattern ('/Users/<me>/development/projects/<my-project>/package.json') can not be provided together. Please select one or the other.

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