stylelint.config.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* eslint-env node */
  2. module.exports = {
  3. customSyntax: 'postcss-styled-syntax',
  4. extends: ['stylelint-config-recommended'],
  5. rules: {
  6. 'declaration-colon-newline-after': null,
  7. // This is formatting related
  8. 'declaration-bang-space-before': null,
  9. // Doesn't work when we use values from theme
  10. 'unit-no-unknown': null,
  11. 'font-family-no-missing-generic-family-keyword': null,
  12. 'media-feature-name-no-unknown': null,
  13. // Does not seem useful
  14. 'no-descending-specificity': null,
  15. // Breaks with interpolated template values
  16. 'function-no-unknown': null,
  17. 'property-no-unknown': [
  18. true,
  19. {
  20. // originX, orginY are used with framer motion
  21. ignoreProperties: ['origin-x', 'origin-y'],
  22. },
  23. ],
  24. // Allow empty template eg - styled(thing)``
  25. 'no-empty-source': null,
  26. 'property-disallowed-list': [
  27. // Prefer `gap` over `grid-gap`, it does the same thing
  28. 'grid-gap',
  29. // Can't set per-property custom messages.. so try and bring them here
  30. {
  31. message: 'Disallowed property. (See `stylelint.config.js` as to why)',
  32. },
  33. ],
  34. // Disable no invalid media query, doesn't like our theme values
  35. 'media-query-no-invalid': null,
  36. },
  37. };