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

Clarify that not all configuration options can be overridden by CLI flags #1989

Closed
novemberborn opened this issue Nov 25, 2018 · 5 comments
Closed

Comments

@novemberborn
Copy link
Member

Prompted by @Christilut, it's not entirely clear that not all configurations can be overridden by CLI flags. This line should be updated:

Arguments passed to the CLI will always take precedence over the configuration in package.json.

See https://github.com/avajs/ava/blob/master/docs/06-configuration.md.

@havenchyk
Copy link

@novemberborn isn't it better to allow overriding by cli?

@novemberborn
Copy link
Member Author

There's some features that should just be configured once and for all, not constantly tweaked through CLI flags.

@sholladay
Copy link

sholladay commented Dec 1, 2018

This hasn't been a problem for me, but still seems like a strange limitation. Wouldn't it simplify the code to not special-case the configuration? What's actually gained from doing this?

If the goal is just to encourage people to use best practices, a more prominent suggestion to use package.json in the docs might be a simpler approach. Or a console warning, rather than actually preventing config on the command line.

@itskolli
Copy link
Contributor

itskolli commented Dec 2, 2018

@novemberborn I have updated the docs to clarify the usage of CLI options along with options in package.json. Please take a look into this PR #1993

@novemberborn
Copy link
Member Author

Wouldn't it simplify the code to not special-case the configuration?

With say the require option, it makes it easier to know which files are required in which order. Specifying different types of glob patterns on the CLI can easily lead to confusion.

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

No branches or pull requests

4 participants