Style lint: Disallow shorthand &
selectors (#8131)
* Impose and apply rule to prevent shorthand selectors * Put one back to test the CI * Put it back to pass CI
This commit is contained in:
parent
3bb0dc08e8
commit
39a08e1f4f
3 changed files with 59 additions and 54 deletions
|
@ -23,5 +23,10 @@ module.exports = {
|
|||
// 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": "^((&[ :.\\\[,])|([^&]))"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue