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

Implement --config flag #2166

Merged
merged 4 commits into from
Jul 7, 2019
Merged

Implement --config flag #2166

merged 4 commits into from
Jul 7, 2019

Conversation

novemberborn
Copy link
Member

@novemberborn novemberborn commented Jun 23, 2019

Fixes #1857.

To do:

docs/06-configuration.md Outdated Show resolved Hide resolved
@novemberborn
Copy link
Member Author

@vladimiry pointed out in #2152 (comment) that users may place their config file in nested directories. We resolve glob patterns and requires relative to the project directory, however. And, since the proposed solution for merging configurations is to use object rest/spread, even if we were to resolve things relative to the config file that doesn't work when you merge with another config file.

So instead, until such time as we have a better solution for this, I've opted to require config files to be in the same directory as the package.json file.

@vladimiry, @sindresorhus thoughts?

@vladimiry
Copy link

@novemberborn my opinion won't be relevant here since I'm already using a loader script that resolves the glob pattern and passes the absolute file paths to ava then. But if I were using ava.config.js then I could live with its location to be forced.

@sindresorhus
Copy link
Member

So instead, until such time as we have a better solution for this, I've opted to require config files to be in the same directory as the package.json file.

👍

Copy link

@StarpTech StarpTech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@StarpTech
Copy link

What is blocking this PR?

@novemberborn
Copy link
Member Author

What is blocking this PR?

I wanted to ship it last week, but then I noticed our tests started failing on Node.js 12. I didn't have time to work on this until now.

@novemberborn novemberborn merged commit 2dae2bf into master Jul 7, 2019
@novemberborn novemberborn deleted the config-flag branch July 7, 2019 15:25
@novemberborn
Copy link
Member Author

This is now available in v2.2.0.

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

Successfully merging this pull request may close these issues.

feature request: cli option of config file --config-file [path]
4 participants