mirror of
https://github.com/element-hq/element-web
synced 2024-11-25 18:55:58 +03:00
39a08e1f4f
* Impose and apply rule to prevent shorthand selectors * Put one back to test the CI * Put it back to pass CI
32 lines
1.2 KiB
JavaScript
32 lines
1.2 KiB
JavaScript
module.exports = {
|
|
"extends": "stylelint-config-standard",
|
|
"plugins": [
|
|
"stylelint-scss",
|
|
],
|
|
"rules": {
|
|
"color-hex-case": null,
|
|
"indentation": 4,
|
|
"comment-empty-line-before": null,
|
|
"declaration-empty-line-before": null,
|
|
"length-zero-no-unit": null,
|
|
"rule-empty-line-before": null,
|
|
"color-hex-length": null,
|
|
"max-empty-lines": 1,
|
|
"no-eol-whitespace": true,
|
|
"number-no-trailing-zeros": null,
|
|
"number-leading-zero": null,
|
|
"selector-list-comma-newline-after": null,
|
|
"at-rule-no-unknown": null,
|
|
"no-descending-specificity": null,
|
|
"no-empty-first-line": true,
|
|
"scss/at-rule-no-unknown": [true, {
|
|
// https://github.com/vector-im/element-web/issues/10544
|
|
"ignoreAtRules": ["define-mixin"],
|
|
}],
|
|
// Disable `&_kind`-style selectors while our unused CSS approach is "Find & Replace All"
|
|
// rather than a CI thing. Shorthand selectors are harder to detect when searching for a
|
|
// class name. This regex is trying to *allow* anything except `&words`, such as `&::before`,
|
|
// `&.mx_Class`, etc.
|
|
"selector-nested-pattern": "^((&[ :.\\\[,])|([^&]))"
|
|
}
|
|
}
|