-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
CLI option --color is missing in documentation #5928
Comments
It's present as |
Since it doesn't really seem like an issue, I'm closing this. Please reopen if there is something I am missing here |
Actually, the colors are missing when writing to a pipe. So the I don't quite understand why you do not care to document parameters that are available. I would re-open but it seems I can't. |
Can you please provide exact repro steps showing where the absence of Incidentally, the tone in this sentence:
Is non-constructive and makes assumptions about our values and practices that simply aren't true. Please let's try to figure this out in a constructive manner. Thanks! |
The |
Hi @ralfstx, thanks for the issue. It looks like there's not enough information for us to know how to help you. If you're reporting a bug, please be sure to include:
Requesting a new rule? Please see Proposing a New Rule for instructions. If it's something else, please just provide as much additional information as possible. Thanks! |
Sorry for that, I didn't mean to offend anyone. However, it's frustrating when you take the time to report a minor issue and see it being closed without the issue being addressed.
Given a file with linting errors, the following command's output contains colors:
while the following command does not:
It's all expected behavior, I'm just asking to add |
Hi :D I agree that it would be useful for the @ralfstx mentioned piping it through An example of a project that documents both Appropriate verbiage could then be:
Thanks! |
@ralfstx @meeber as I mentioned above, our tool for handling CLI output, optionator, does not support outputting both options. We use this both on the command line and to generate the documentation, so this isnt a matter of just updated the docs. If anyone has a suggestion for how to overcome that limitation, we are open to suggestions. Also, keep in mind that we have almost 200 open issues. We can't fix every issue that is filed, so we need to prioritize and close issues that we don't intend to address. That may be frustrating, and that's unfortunate. I just ask you to keep in mind that the ESLint team is entirely a volunteer team working in their free time on ESLint, and we are doing the best we can. |
@nzakas I played around with it a bit and was able to come up with one potential solution: Modifying /lib/options from: {
option: "color",
type: "Boolean",
default: "true",
description: "Disable color in piped output"
}, To: {
option: "color",
type: "Boolean",
alias: "no-color",
description: "Force enabling/disabling of colors"
}, Produces -h output of:
I tested using each option, as well as no option at all, and it behaved as expected each time. Thoughts? :D |
@meeber that looks great! Can you submit a pull request? |
@nzakas sure thing. |
The command line option
--color
is actually useful to enforce ANSI color codes when outputting to a pipe, e.g. in a Grunt task.Apparently, this options is supported in ESLint 2.8.0, but it's missing in the online doc and also in the output of
The text was updated successfully, but these errors were encountered: