stylelint: Ignore trailing semicolon after closing brace of custom property set block in no-extra-semicolons
Describe the issue. Is it a bug or a feature request (new rule, new option, etc.)?
bug where no-extra-semicolons and block-closing-brace-newline-after are triggered on an @apply block nested in :root.
Which rule, if any, is this issue related to?
no-extra-semicolons, block-closing-brace-newline-after
What CSS is needed to reproduce this issue?
/* stylelint-disable root-no-standard-properties, selector-type-case, no-extra-semicolons */
:root {
--ThemeButtonStyles: {
@apply --ThemeAnimationStyles;
border-width: 1px;
font-family: var(--LightFontFamily);
font-size: .875em;
cursor: pointer;
pointer-events: all;
height: var(--UIComponentSize);
box-sizing: border-box;
margin: 0;
transition-property: background-color;
}; /* triggered here: no-extra-semicolons, block-closing-brace-newline-after */
--ThemeButtonLabelProperties: {
font-family: var(--LightFontFamily);
color: currentColor;
}; /* triggered here: no-extra-semicolons */
}
What stylelint configuration is needed to reproduce this issue?
{
"extends": "stylelint-config-standard",
"rules": {
"custom-property-no-outside-root": true,
"declaration-block-no-duplicate-properties": true,
"no-eol-whitespace": true,
"number-leading-zero": "never",
"root-no-standard-properties": true,
"selector-root-no-composition": true,
"selector-type-no-unknown": [true, {
"ignoreTypes": ["/^--/", "--Theme"]
}]
}
}
Which version of stylelint are you using?
7.1.0
How are you running stylelint: CLI, PostCSS plugin, Node API?
Sublime plugin
Does your issue relate to non-standard syntax (e.g. SCSS, nesting, etc.)?
Not that I know of.
What did you expect to happen?
“No warnings to be flagged.”
What actually happened (e.g. what warnings or errors you are getting)?
no-extra-semicolons
block-closing-brace-newline-after triggered
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 18 (15 by maintainers)
Commits related to this issue
- PoC of issue #1830 — committed to stylelint/stylelint by alexander-akait 8 years ago
- PoC of issue #1830 — committed to stylelint/stylelint by alexander-akait 8 years ago
Done in https://github.com/stylelint/stylelint/pull/1900