.scss-lint.yml 3.1 KB

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