Skip to content
This repository has been archived by the owner on May 14, 2021. It is now read-only.

Stylelint: Unknown word (CssSyntaxError) when commenting out valid css #299

Open
villesau opened this issue Sep 12, 2020 · 2 comments
Open

Comments

@villesau
Copy link

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)

@villesau villesau changed the title Stylelint: Unknown word (CssSyntaxError) when commenting something out css Stylelint: Unknown word (CssSyntaxError) when commenting out valid css Sep 12, 2020
@fastfedora
Copy link

Experiencing the same issue.

@KornelijusGlinskas
Copy link

+1 for the issue. Would love to find the solution for it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants