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

Comments

Projects
None yet
4 participants
@novemberborn
Member

novemberborn commented Nov 25, 2018

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

This comment has been minimized.

havenchyk commented Nov 25, 2018

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

@novemberborn

This comment has been minimized.

Member

novemberborn commented Nov 26, 2018

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

@sholladay

This comment has been minimized.

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

This comment has been minimized.

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 added a commit that referenced this issue Dec 3, 2018

@novemberborn

This comment has been minimized.

Member

novemberborn commented Dec 3, 2018

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