.scss-lint.yml 3.0 KB

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