stylelint.config.js 1.1 KB

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