0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-21 21:49:51 +01:00
posthog/.stylelintrc.js

56 lines
2.3 KiB
JavaScript
Raw Permalink Normal View History

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',
},
],
chore(frontend): Real Tailwind + Autoprefixer (#19051) * chore(frontend): Real Tailwind + Autoprefixer * Align some non-standard utility class usage with Tailwind * Start using container queries * Update tailwind.config.js * Move PostCSS packages into prod dependencies * Add EE * Add larger spacings for properties other than width * Fix spacing backward compat * Add max-w-1/2 * Remove Tailwind normalization * Ensure JIT analysis works * Actually we don't need a container query for this * Clean up more * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update production.Dockerfile * Extend `fontSize` instead of replacing * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Fix production build * Add clarification comment * Update trends.cy.ts * Fix `scale` usage * Fix minor styling issues * Upgrade to Tailwind 3.4 * Actually use `cssnano` * Don't use `cssnano` in dev * Solve annoying Tailwind logs * Add comment explaining plugins being defined twice * Fix side panel icon rotation * Reset snapshots * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update query snapshots * Update query snapshots * Fix dockerfile * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (1) * Fix up flag wrap * Update UI snapshots for `chromium` (2) * Fix * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Ben White <ben@posthog.com>
2024-01-08 13:26:12 +01:00
'scss/at-rule-no-unknown': [
true,
{
ignoreAtRules: ['tailwind'],
},
chore(frontend): Real Tailwind + Autoprefixer (#19051) * chore(frontend): Real Tailwind + Autoprefixer * Align some non-standard utility class usage with Tailwind * Start using container queries * Update tailwind.config.js * Move PostCSS packages into prod dependencies * Add EE * Add larger spacings for properties other than width * Fix spacing backward compat * Add max-w-1/2 * Remove Tailwind normalization * Ensure JIT analysis works * Actually we don't need a container query for this * Clean up more * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update UI snapshots for `webkit` (2) * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update production.Dockerfile * Extend `fontSize` instead of replacing * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Fix production build * Add clarification comment * Update trends.cy.ts * Fix `scale` usage * Fix minor styling issues * Upgrade to Tailwind 3.4 * Actually use `cssnano` * Don't use `cssnano` in dev * Solve annoying Tailwind logs * Add comment explaining plugins being defined twice * Fix side panel icon rotation * Reset snapshots * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) * Update query snapshots * Update query snapshots * Fix dockerfile * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (1) * Fix up flag wrap * Update UI snapshots for `chromium` (2) * Fix * Update UI snapshots for `chromium` (1) * Update UI snapshots for `chromium` (2) --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Ben White <ben@posthog.com>
2024-01-08 13:26:12 +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,
'order/order': ['dollar-variables', 'custom-properties', 'declarations', 'rules', 'at-rules'],
'color-function-notation': ['modern', { ignore: ['with-var-inside'] }],
},
}