-
Notifications
You must be signed in to change notification settings - Fork 61
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
group errors by file #409
Comments
This is possible today. https://github.com/SimenB/stylint/blob/master/README.md#groupoutputbyfile--default-true-true--false- Ping me if it doesn't work, and I'll reopen. |
Oh thanks. Good to know. One unexpected part of this is the following: I have a |
I agree |
As far as I can see, this could be fixed by returning var group = this.config.groupOutputByFile || true I have a PR ready for this if agreed. |
@PalleZingmark I don't think that would work. If the person set it to false, that would override it to make it true. We only want to default it to true if the |
@charlierudolph Lol, of course, those damn false javascript false being false. ;) So I guess checking that the key actually exists would be a better way, e.g. var group = ('groupOutputByFile' in this.config) ? this.config.groupOutputByFile : true |
There is a default config already: https://github.com/SimenB/stylint/blob/master/src/core/config.js Don't create another defaults in more places. This will be unmaintainable in the future. The correct flow is to merge config files from various sources and use final value everywhere. Lets find why this fail first. |
@wojciechczerniak True, good point. As far as I can see the config used is set in
It only overrides the default config object with a new config object, hence a check for non-existent props in that config will return |
Changed my PR to use this approach instead of doing a check to whether the value exists or not.
Update: Tests are in |
Currently you get an output like:
while I would prefer output that looks like
The text was updated successfully, but these errors were encountered: