.scss-lint.yml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. # Useful regexes to fix lint errors
  2. # SpaceBeforeBrace: search "([^\ ])\{" replace "$1 {"
  3. # SpaceAfterPropertyColon: search "([^\&]):([^\ \n]*);" replace "$1: $2;"
  4. scss_files:
  5. - wagtail/**/static_src/**/scss/**/*.scss
  6. - client/**/*.scss
  7. linters:
  8. BorderZero:
  9. enabled: true
  10. Indentation:
  11. severity: warning
  12. width: 4
  13. # because https://github.com/brigade/scss-lint/issues/409
  14. allow_non_nested_indentation: true
  15. character: space
  16. ColorKeyword:
  17. enabled: true
  18. ColorVariable:
  19. enabled: false
  20. BangFormat:
  21. space_before_bang: true
  22. space_after_bang: false
  23. PropertySortOrder:
  24. enabled: false
  25. Comment:
  26. enabled: true
  27. DeclarationOrder:
  28. enabled: true
  29. DuplicateProperty:
  30. enabled: true
  31. ElsePlacement:
  32. enabled: true
  33. EmptyLineBetweenBlocks:
  34. enabled: true
  35. EmptyRule:
  36. enabled: true
  37. FinalNewline:
  38. present: true
  39. HexLength:
  40. style: short
  41. HexNotation:
  42. style: lowercase
  43. HexValidation:
  44. enabled: true
  45. IdSelector:
  46. enabled: true
  47. exclude:
  48. - '**/choose_parent_page.scss'
  49. ImportantRule:
  50. enabled: false
  51. exclude:
  52. - '**/_datetimepicker.scss'
  53. ImportPath:
  54. enabled: true
  55. LeadingZero:
  56. enabled: false
  57. MergeableSelector:
  58. enabled: false
  59. NameFormat:
  60. allow_leading_underscore: true
  61. NestingDepth:
  62. max_depth: 5
  63. PseudoElement:
  64. enabled: false
  65. SelectorDepth:
  66. enabled: false
  67. # There is currently no de facto standard for selector format in Wagtail, due to:
  68. # a) the conversion of django field/widget names to underscored class names
  69. # b) the use of third party code such as Hallo.js which uses classes with snakeCaseClasses.
  70. SelectorFormat:
  71. convention: '.*' # allow anything
  72. PlaceholderInExtend:
  73. enabled: false
  74. PropertyCount:
  75. enabled: false
  76. QualifyingElement:
  77. allow_element_with_attribute: true
  78. allow_element_with_class: true
  79. allow_element_with_id: false
  80. Shorthand:
  81. enabled: true
  82. SingleLinePerProperty:
  83. enabled: true
  84. allow_single_line_rule_sets: true
  85. SingleLinePerSelector:
  86. enabled: true
  87. SpaceAfterComma:
  88. enabled: true
  89. SpaceAfterPropertyColon:
  90. style: at_least_one_space
  91. SpaceAfterPropertyName:
  92. enabled: true
  93. SpaceBeforeBrace:
  94. enabled: true
  95. allow_single_line_padding: true
  96. style: space
  97. SpaceBetweenParens:
  98. enabled: true
  99. StringQuotes:
  100. style: single_quotes
  101. TrailingSemicolon:
  102. enabled: true
  103. TrailingZero:
  104. enabled: true
  105. UnnecessaryMantissa:
  106. enabled: true
  107. UnnecessaryParentReference:
  108. enbabled: true
  109. UrlFormat:
  110. enabled: false
  111. UrlQuotes:
  112. enabled: true
  113. VariableForProperty:
  114. enabled: false
  115. VendorPrefix:
  116. enabled: false
  117. ZeroUnit:
  118. enabled: true