2023-11-15 15:11:27 +01:00
|
|
|
module.exports = {
|
2023-11-23 21:55:14 +01:00
|
|
|
extends: ['stylelint-config-standard-scss', 'stylelint-config-recess-order'],
|
|
|
|
plugins: ['stylelint-order'],
|
2023-11-15 15:11:27 +01:00
|
|
|
rules: {
|
2023-11-23 21:55:14 +01:00
|
|
|
'no-descending-specificity': null, // TODO: Enable separately, as the diff will be significant
|
2023-11-15 15:11:27 +01:00
|
|
|
'number-max-precision': 5,
|
|
|
|
'value-keyword-case': [
|
|
|
|
'lower',
|
|
|
|
{
|
|
|
|
// CSS Color Module Level 3 says currentColor, Level 4 candidate says currentcolor
|
|
|
|
// Sticking to Level 3 for now
|
|
|
|
camelCaseSvgKeywords: true,
|
2023-11-22 11:07:55 +01:00
|
|
|
ignoreKeywords: ['BlinkMacSystemFont'], // BlinkMacSystemFont MUST have this particular casing
|
2023-11-15 15:11:27 +01:00
|
|
|
},
|
|
|
|
],
|
|
|
|
// Sadly Safari only started supporting the range syntax of media queries in 2023, so let's switch to that
|
|
|
|
// ('context' value) in 2024, once support is better https://caniuse.com/?search=range%20context
|
|
|
|
'media-feature-range-notation': 'prefix',
|
|
|
|
'selector-class-pattern': [
|
|
|
|
'^[A-Za-z0-9_-]+(__[A-Za-z0-9_-]+)?(--[A-Za-z0-9-]+)?$',
|
|
|
|
{
|
|
|
|
message: 'Expected class selector to match Block__Element--Modifier or plain snake-case',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
'selector-id-pattern': [
|
|
|
|
'^[A-Za-z0-9_-]+(__[A-Za-z0-9_-]+)?(--[A-Za-z0-9_-]+)?$',
|
|
|
|
{
|
|
|
|
message: 'Expected id selector to match Block__Element--Modifier or plain kebak-case',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
'keyframes-name-pattern': [
|
|
|
|
'^[A-Za-z0-9_-]+__[A-Za-z0-9_-]+$',
|
|
|
|
{
|
|
|
|
message: 'Expected keyframe name to match Block__Animation',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
'scss/dollar-variable-pattern': [
|
|
|
|
'^[A-Za-z_]+[A-Za-z0-9_-]+$',
|
|
|
|
{
|
|
|
|
message: 'Expected variable to match kebab-case or snake_case',
|
|
|
|
},
|
|
|
|
],
|
2024-01-08 13:26:12 +01:00
|
|
|
'scss/at-rule-no-unknown': [
|
|
|
|
true,
|
|
|
|
{
|
2024-01-17 21:28:10 +01:00
|
|
|
ignoreAtRules: ['tailwind'],
|
|
|
|
},
|
2024-01-08 13:26:12 +01:00
|
|
|
],
|
2023-11-15 15:11:27 +01:00
|
|
|
'scss/operator-no-newline-after': null, // Doesn't always play well with prettier
|
|
|
|
'scss/at-extend-no-missing-placeholder': null,
|
|
|
|
'scss/comment-no-empty': null,
|
2023-11-23 21:55:14 +01:00
|
|
|
'order/order': ['dollar-variables', 'custom-properties', 'declarations', 'rules', 'at-rules'],
|
2023-12-28 19:54:43 +01:00
|
|
|
'color-function-notation': ['modern', { ignore: ['with-var-inside'] }],
|
2023-11-15 15:11:27 +01:00
|
|
|
},
|
|
|
|
}
|