stylelint: Fix corrupt terminal output for list of warnings and errors
Describe the issue. Is it a bug or a feature request (new rule, new option, etc.)?
If you have a piece of CSS like this:
table.some_class {
border-style: none;
}
It will fail the stylelint test. It would pass if you change it to:
table.some_class {
border-style: none none none none;
}
This makes me think that stylelint is enforcing all borders to be specified, which is not what most (any?) browsers require.
This also passes the test:
table.some_class {
border: 0;
}
But this fails:
table.some_class {
border: none;
}
Which rule, if any, is this issue related to?
Unfortunately the output of npm test doesn’t specify which rule is triggered.
What stylelint configuration is needed to reproduce this issue?
Unsure.
Which version of stylelint are you using?
8.2.0
How are you running stylelint: CLI, PostCSS plugin, Node API?
Through npm test which in turn runs grunt test
Does your issue relate to non-standard syntax (e.g. SCSS, nesting, etc.)?
No
What did you expect to happen?
No warnings to be flagged.
What actually happened (e.g. what warnings or errors you are getting)?
Test fails, see https://integration.wikimedia.org/ci/job/mwgate-npm-node-6-docker/25835/console for instance (the code is in https://gerrit.wikimedia.org/r/#/c/411593/19)
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (8 by maintainers)
@jeddy3 that was the output of CI. Running stylelint through CLI generated useful output:
Our focus is on the latter. It claims “none” is not an expected value for “border”. I looked up W3C CSS2 documentation on https://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#border-properties and learned that
borderis supposed process what is given to it in the following order:<border-width> <border-style> <'border-top-color'>and “none” is in fact not allowed for border-width, so indeed stylelint is correct in refusing to accept it, and browsers are just being too generous.Closing this issue as invalid. Was very educational for me.