Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
10hendersonm opened this issue Jan 4, 2022 · 1 comment
Open

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

10hendersonm opened this issue Jan 4, 2022 · 1 comment

Comments

@10hendersonm
Copy link
Member

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.
@10hendersonm
Copy link
Member Author

We aren't checking for multiple globPatterns, so slapping './**/*.md' and a bunch of paths together is no problemo. It's maybe a little opaque that the staged paths are completely ignored, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant