Files
posthog/frontend/.stylelintrc.js
Adam Leith 31fa949aa6 chore(devex): tailwind v4 (via CLI) + upgrade guide for tailwind v4 (#29562)
Co-authored-by: Marius Andra <marius.andra@gmail.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Lucas Ricoy <2034367+lricoy@users.noreply.github.com>
Co-authored-by: Robbie <robbie.coomber@gmail.com>
Co-authored-by: Dylan Martin <dylan@posthog.com>
Co-authored-by: Haven <haven@posthog.com>
Co-authored-by: Paul D'Ambra <paul@posthog.com>
Co-authored-by: Paweł Szczur <orian@users.noreply.github.com>
Co-authored-by: Ben White <ben@posthog.com>
2025-03-06 11:41:33 +00:00

55 lines
2.3 KiB
JavaScript

module.exports = {
extends: ['stylelint-config-standard-scss', 'stylelint-config-recess-order'],
plugins: ['stylelint-order'],
rules: {
'no-descending-specificity': null, // TODO: Enable separately, as the diff will be significant
'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,
ignoreKeywords: ['BlinkMacSystemFont'], // BlinkMacSystemFont MUST have this particular casing
},
],
// 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',
},
],
'scss/at-rule-no-unknown': [
true,
{
ignoreAtRules: ['tailwind', 'config'],
},
],
'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,
'order/order': ['dollar-variables', 'custom-properties', 'declarations', 'rules', 'at-rules'],
'color-function-notation': ['modern', { ignore: ['with-var-inside'] }],
},
}