-
Notifications
You must be signed in to change notification settings - Fork 630
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
Fix: Using formatter-stylish
in CI by default.
#2893
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@molant Want to take a look?
My only concern is more general than specific to this change so I won't block on it. As we keep adding more special-case handling to our default configuration I think we should start considering how we can do this in a way that's easier to extend.
Today once someone adds their own .hintrc
file they lose the benefits of this conditional logic. E.g. if someone extends web-recommended
then output in CI will look different than before and they won't be able to analyze file system paths. They can certainly replicate these behaviors by passing different config files to hint
themselves depending on the context, but the sudden change in functionality may be surprising.
@antross can you please open an issue to discuss that? Probably part of the next version discussion we should have. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about checking that stylish
is not used if not in CI in one of the existing tests?
ok |
I'm taking a look to the code and that test case is already there: |
@sarvaje maybe I'm missing something, but I don't see a test that validates it only uses |
not literally, but we are checking that the configuration is { extends: ["web-recommended"]} and {extends: ["development"]} |
It's weird to me that we have a test to check the formatters in one environment and not another. |
The test is there, if it is not CI, the configuration is { extends: ["web-recommended"]} if it is in CI, the configuration is {extends: ["web-recommended"], formatters: ["stylish", "html"]} If we are not in CI, the property formatter is not initialized and we are using whatever comes from the extends. |
I can't check the property formatter, because when I'm not in CI, I only use the extends. And I don't think we should test here what the extends has by default. |
OK, then 👍 |
Fix #2892
Pull request checklist
Make sure you:
For non-trivial changes, please make sure you also:
Short description of the change(s)