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

Fix --report-needless-disables to accept a boolean value and not a string #3818

Closed
remcohaszing opened this issue Nov 23, 2018 · 1 comment
Closed
Labels
good first issue is good for newcomers status: ready to implement is ready to be worked on by someone type: bug a problem with a feature or rule

Comments

@remcohaszing
Copy link
Contributor

remcohaszing commented Nov 23, 2018

Clearly describe the bug

According to the documentation, The CLI accepts a argument --report-needless-disables. However, it is treated by the truthiness of its string value.

For example:

# Lints directory
$ stylelint .
# Reports needless disables
$ stylelint --report-needless-disables any-non-empty-string .
# Reports needless disables
$ stylelint . --report-needless-disables
# Paths are missing. report-needless-disables now has the string value '.'
$ stylelint --report-needless-disables .

Which rule, if any, is the bug related to?

None

What CSS is needed to reproduce the bug?

None

What stylelint configuration is needed to reproduce the bug?

None

Which version of stylelint are you using?

9.8.0

How are you running stylelint: CLI, PostCSS plugin, Node API?

CLI

Does the bug relate to non-standard syntax (e.g. SCSS, Less etc.)?

No

What did you expect to happen?

For the option --report-needless-disables to be treated as a boolean CLI argument

What actually happened (e.g. what warnings or errors did you get)?

--report-needless-disables accepts a string value. If it’s non empty, it is treated as truthy.

@jeddy3
Copy link
Member

jeddy3 commented Nov 23, 2018

@remcohaszing Thanks for the report and for using the template. Good catch. It looks like we've forgotten to give the the flag a type: boolean property/value pair.

@jeddy3 jeddy3 added status: ready to implement is ready to be worked on by someone type: bug a problem with a feature or rule good first issue is good for newcomers labels Nov 23, 2018
@jeddy3 jeddy3 changed the title --report-needless-disables should accept a boolean value, not a string Fix --report-needless-disables to accept a boolean value and not a string Nov 23, 2018
ntwb pushed a commit that referenced this issue Nov 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue is good for newcomers status: ready to implement is ready to be worked on by someone type: bug a problem with a feature or rule
Development

No branches or pull requests

2 participants