stylelint.config.js 1.1 KB

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