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

11.2.5 breaks config loading #1034

Closed
gael-ian opened this issue Oct 26, 2021 · 4 comments · Fixed by #1035
Closed

11.2.5 breaks config loading #1034

gael-ian opened this issue Oct 26, 2021 · 4 comments · Fixed by #1035

Comments

@gael-ian
Copy link

Description

lint-staged 11.2.5 (and 11.2.4) fails without any message when asked to load configuration with --config path/to/lint-staged.js. Neither the --debug nor the --verbose flag helps to have more information: lint-staged just fail with an exit code of 1.

Seems similar to #1032.

Environment

  • OS: macOS Big Sur
  • Node.js: 16.10.0
  • lint-staged: 11.2.5
@iiroj
Copy link
Member

iiroj commented Oct 26, 2021

Thanks for the report. Since it's proving to be a hassle let's just revert #981 that started this by replaced cosmiconfig with lilconfig

@antonk52
Copy link
Contributor

antonk52 commented Nov 2, 2021

Hello, lilconfig author here. Any chance @gael-ian can share a repro for the bug? I am happy to look into it and fix it if it is in lilconfig itself. I saw there were issues with yaml earlier. However this issue is not clear to me. Thanks

@iiroj
Copy link
Member

iiroj commented Nov 2, 2021

@antonk52 if you use lint-staged@11.2.5 with npx lint-staged --config path/to/config.json, it fails around here:

https://github.com/okonet/lint-staged/blob/e035b80e39da355da57c02db6565b55271ab1afa/lib/index.js#L42

@antonk52
Copy link
Contributor

antonk52 commented Nov 5, 2021

@iiroj once again thanks for highlighting and sorry for a delay, had a bad fever. I've just cut a new release with this bug fixed and a couple patch worthy improvments v2.0.4. If you decide you want a round two with lilconfig for lint-staged feel free to ping me

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

Successfully merging a pull request may close this issue.

3 participants