You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 14, 2021. It is now read-only.
Hello, I believe I have found in a bug regarding nested template strings, as described below. Minimal cases can be found in this repo. Any component in the array also exhibits this behavior on its own.
When running the linter on a file with nested multi-line templates (tagged or not), stylelint detects Expected empty line before comment (comment-empty-line-before) and Unexpected empty block (block-no-empty) errors. Upon fixing with --fix, the whole file is replaced with extracted CSS with /* dummy comment */ in place of the nested templates. The errors are not shown when the nested template is in a single line (for example ${css`display: block;`}.
Hello, I believe I have found in a bug regarding nested template strings, as described below. Minimal cases can be found in this repo. Any component in the array also exhibits this behavior on its own.
IMO this might be connected with #165
As is
When running the linter on a file with nested multi-line templates (tagged or not), stylelint detects Expected empty line before comment (
comment-empty-line-before
) and Unexpected empty block (block-no-empty
) errors. Upon fixing with--fix
, the whole file is replaced with extracted CSS with/* dummy comment */
in place of the nested templates. The errors are not shown when the nested template is in a single line (for example${css`display: block;`}
.Before fix:
After
--fix
:To be
No errors should be reported. However, in case of an error, the fixer should not convert JS files to CSS files.
Environment
v10.0.0
stylelint: "^9.2.1"
stylelint-config-standard": "^18.2.0
,stylelint-config-styled-components": "^0.1.1"
stylelint-processor-styled-components": "^1.3.1"
The text was updated successfully, but these errors were encountered: