FreeTube/.stylelintrc.json
Jason 23f1618fcb
Add back 3 Stylelint configs (#4350)
* Add back @double-great/stylelint-a11y Stylelint plugin

Notably, we choose to not use the 'a11y/no-outline-none' rule. The reason for this being that our focus ring suffices for almost every use case (https://www.w3.org/WAI/WCAG22/Understanding/focus-appearance-minimum), and using the same hover and focus styling can be considered bad design in many cases. YT goes the direction of foregoing the focus ring for many of its components and choosing a barely darker color than its :hover for :focus styling, which is controversial. Accessibility-wise, at the very least, using the same hover and focus styling can be confusing, especially for sighted users who use keyboard navigation.

* Add back stylelint-config-sass-guidelines

* Add back stylelint-config-standard

* Satisfy media-prefers-reduced-motion a11y rule

This is not recognized as a fix by the rule due to its limited detection logic, so this rule is not being imported directly.

* Remove duplicate code

* Implement linting fixes

* Implement _ft-list-item.scss linting fixes excluding no-descending-specificity

Properly implementing the no-descending-specificity rule in this file seems to utterly destroy the styling. This would be its own entire initiative to unravel.

* Restart from scratch modifications of _ft-list-item.scss

* Resolve styling discrepancies introduced with ft-list-channel and ft-tooltip
2024-04-17 19:49:37 +02:00

36 lines
832 B
JSON

{
"plugins": ["stylelint-use-logical-spec", "@double-great/stylelint-a11y"],
"extends": ["stylelint-config-standard", "stylelint-config-sass-guidelines"],
"overrides": [
{
"files": ["**/*.scss"],
"customSyntax": "postcss-scss",
"rules": {
"max-nesting-depth": null,
"selector-max-compound-selectors": null
}
},
{
"files": ["**/*.css"],
"rules": {
}
}
],
"rules": {
"selector-no-qualifying-type": [
true, {
"ignore": ["attribute"]
}],
"selector-class-pattern": null,
"selector-id-pattern": null,
"selector-pseudo-class-no-unknown": [
true,
{
"ignorePseudoClasses": ["deep"]
}
],
"a11y/no-outline-none": true,
"liberty/use-logical-spec": ["always", { "except": ["float"] }]
}
}