Environment
System:
- OS: macOS 10.15.6
- CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
- Memory: 326.75 MB / 32.00 GB
- Shell: 5.7.1 - /bin/zsh
Binaries:
- Node: 12.18.3 - ~/.nodenv/versions/12.18.3/bin/node
- Yarn: 1.22.5 - /usr/local/bin/yarn
- npm: 6.14.6 - ~/.nodenv/versions/12.18.3/bin/npm
npmPackages:
- styled-components: ^5.2.0 => 5.2.0
- stylelint: ^13.7.1 => 13.7.1
- stylelint-config-recommended: ^3.0.0 => 3.0.0
- stylelint-config-styled-components: ^0.1.1 => 0.1.1
- stylelint-processor-styled-components: ^1.10.0 => 1.10.0
sanbox link
https://codesandbox.io/s/unruffled-fermi-5er5j?file=/src/App.js
Reproduction
https://codesandbox.io/s/unruffled-fermi-5er5j?file=/src/App.js
Following code:
import styled from "styled-components";
const Component = styled.ul`
// grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
`;
gives Stylelint: Unknown word (CssSyntaxError)
Steps to reproduce
validate above code with the setup from codesandbox.
Expected Behavior
It should not error out. The css in comment is valid. I think it should not validate the css in comment in the first place since it could be anything. The comment pattern is valid in styled components.
Actual Behavior
the above code snippet gives Stylelint: Unknown word (CssSyntaxError)