custom-property-no-missing-var-function false positives?
See original GitHub issueWhat steps are needed to reproduce the bug?
We use Less, and our comment headers in each file are tripping up on custom-property-no-missing-var-function
.
//
// STACK OVERFLOW
// THE COMPLETE STANDALONE STACKS
//
// This CSS comes from Stacks, our CSS & Pattern library for rapidly building
// Stack Overflow. For documentation of all these classes and how to contribute,
// visit https://stackoverflow.design/
//
// This is where all the magic happens.
//
// ============================================================================
@import "stacks-static.less";
@import "stacks-dynamic.less";
What Stylelint configuration is needed to reproduce the bug?
{
"extends": "stylelint-config-standard",
"rules": {
"indentation": 4,
"max-empty-lines": 2,
"no-invalid-double-slash-comments": null,
"rule-empty-line-before": null,
"at-rule-empty-line-before": null,
"declaration-empty-line-before": null,
"selector-pseudo-element-colon-notation": "single",
"no-descending-specificity": null,
"function-whitespace-after": null,
"no-invalid-position-at-import-rule": null,
"string-quotes": null,
"custom-property-no-missing-var-function": null,
"alpha-value-notation": null,
"max-line-length": null,
"hue-degree-notation": null,
"color-function-notation": null,
"selector-class-pattern": null,
"custom-property-pattern": null,
"value-no-vendor-prefix": null,
"property-no-vendor-prefix": null,
"selector-no-vendor-prefix": null,
"declaration-block-trailing-semicolon": null,
"block-closing-brace-newline-before": null,
"block-closing-brace-empty-line-before": null,
"declaration-block-no-redundant-longhand-properties": null,
"selector-disallowed-list": [
"/[.#]js-/",
{
"message": "js-* selectors can’t have visual styling. https://stackoverflow.design/product/guidelines/javascript/#javascript-classnames"
}
]
}
}
How did you run Stylelint?
Visual Studio plugin
Which version of Stylelint are you using?
14.0.1
What did you expect to happen?
By setting custom-property-no-missing-var-function
to null
, I expect this failure to be ignored as it was prior to 14.0.0
What actually happened?
Unknown rule custom-property-no-missing-var-function. [1,1]
Does the bug relate to non-standard syntax?
No response
Proposal to fix the bug
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Fix custom-property-no-missing-var-function false positives for ...
Fix custom-property-no-missing-var-function false positives for properties that can contain author-defined identifiers #5742.
Read more >custom-property-no-missing-var-function - Stylelint
Disallow missing var function for custom properties. This rule only reports custom properties that are defined within the same source.
Read more >custom-property-no-missing-var-function - Fossies
Disallow missing var function for custom properties. This rule only reports custom properties that are defined within the same source.
Read more >stylelint/stylelint 14.0.0 on GitHub - NewReleases.io
Added: custom-property-no-missing-var-function rule (#5317). ... Fixed: length-zero-no-unit false positives for flex property (#5315).
Read more >Supercharging Your CSS Custom Properties - OutSystems
The var() function, which allows an author to use these values in other properties. Note: variables names are case sensitive — --my-color will ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ah, yep. A hard restart of Visual Studio Code cleared up this issue. Closing!
@aaronshekey Thanks for the report. As @alexander-akait said, this usually happens because an older version of Stylelint is being used somewhere.
Do you get the error when using Stylelint via the CLI?
If not, then VS Code is using an older version and you should:
Let us know if that works for you or not, and we’ll go from there.