.haml-lint.yml 3.43 KB
Newer Older
Rémy Coutable's avatar
Rémy Coutable committed
1 2 3 4 5
# Whether to ignore frontmatter at the beginning of HAML documents for
# frameworks such as Jekyll/Middleman
skip_frontmatter: false
exclude:
  - 'vendor/**/*'
6
  - 'spec/**/*'
Rémy Coutable's avatar
Rémy Coutable committed
7 8 9

linters:
  AltText:
10
    enabled: true
Rémy Coutable's avatar
Rémy Coutable committed
11 12

  ClassAttributeWithStaticValue:
13
    enabled: true
Rémy Coutable's avatar
Rémy Coutable committed
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

  ClassesBeforeIds:
    enabled: false

  ConsecutiveComments:
    enabled: false

  ConsecutiveSilentScripts:
    enabled: false
    max_consecutive: 2

  EmptyObjectReference:
    enabled: true

  EmptyScript:
    enabled: true

  FinalNewline:
32
    enabled: true
Rémy Coutable's avatar
Rémy Coutable committed
33 34 35
    present: true

  HtmlAttributes:
36
    enabled: true
Rémy Coutable's avatar
Rémy Coutable committed
37

38 39 40
  IdNames:
    enabled: false

Rémy Coutable's avatar
Rémy Coutable committed
41
  ImplicitDiv:
42
    enabled: true
Rémy Coutable's avatar
Rémy Coutable committed
43

44 45 46
  InlineJavaScript:
    enabled: true

47 48 49 50 51 52
  InlineStyles:
    enabled: false

  InstanceVariables:
    enabled: false

Rémy Coutable's avatar
Rémy Coutable committed
53 54 55 56 57 58 59 60
  LeadingCommentSpace:
    enabled: false

  LineLength:
    enabled: false
    max: 80

  MultilinePipe:
61
    enabled: true
Rémy Coutable's avatar
Rémy Coutable committed
62 63 64 65 66 67 68

  MultilineScript:
    enabled: true

  ObjectReferenceAttributes:
    enabled: true

69 70 71
  RepeatedId:
    enabled: false

Rémy Coutable's avatar
Rémy Coutable committed
72
  RuboCop:
73
    enabled: true
Rémy Coutable's avatar
Rémy Coutable committed
74 75 76
    # These cops are incredibly noisy when it comes to HAML templates, so we
    # ignore them.
    ignored_cops:
77 78
      - Layout/BlockAlignment
      - Layout/EndAlignment
Rémy Coutable's avatar
Rémy Coutable committed
79 80
      - Lint/Void
      - Metrics/LineLength
81
      - Naming/FileName
Rémy Coutable's avatar
Rémy Coutable committed
82 83 84 85 86 87 88 89 90 91 92 93 94
      - Style/AlignParameters
      - Style/BlockNesting
      - Style/ElseAlignment
      - Style/FileName
      - Style/FinalNewline
      - Style/FrozenStringLiteralComment
      - Style/IfUnlessModifier
      - Style/IndentationWidth
      - Style/Next
      - Style/TrailingBlankLines
      - Style/TrailingWhitespace
      - Style/WhileUntilModifier

95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
      # These cops should eventually get enabled
      - Cop/LineBreakAfterGuardClauses
      - Cop/LineBreakAroundConditionalBlock
      - Cop/ProjectPathHelper
      - GitlabSecurity/PublicSend
      - Layout/LeadingCommentSpace
      - Layout/SpaceAfterColon
      - Layout/SpaceAfterComma
      - Layout/SpaceAroundOperators
      - Layout/SpaceBeforeBlockBraces
      - Layout/SpaceBeforeComma
      - Layout/SpaceBeforeFirstArg
      - Layout/SpaceInsideArrayLiteralBrackets
      - Layout/SpaceInsideHashLiteralBraces
      - Layout/SpaceInsideStringInterpolation
      - Layout/TrailingBlankLines
      - Lint/BooleanSymbol
      - Lint/LiteralInInterpolation
      - Lint/ParenthesesAsGroupedExpression
      - Lint/RedundantWithIndex
      - Lint/Syntax
      - Metrics/BlockNesting
      - Naming/VariableName
      - Performance/RedundantMatch
      - Performance/StringReplacement
      - Rails/Presence
      - Rails/RequestReferer
      - Style/AndOr
      - Style/ColonMethodCall
      - Style/ConditionalAssignment
      - Style/HashSyntax
      - Style/IdenticalConditionalBranches
      - Style/NegatedIf
      - Style/NestedTernaryOperator
      - Style/Not
      - Style/ParenthesesAroundCondition
      - Style/RedundantParentheses
      - Style/SelfAssignment
      - Style/Semicolon
      - Style/TernaryParentheses
      - Style/TrailingCommaInHashLiteral
      - Style/UnlessElse
      - Style/WordArray
      - Style/ZeroLengthPredicate

Rémy Coutable's avatar
Rémy Coutable committed
140
  RubyComments:
141
    enabled: true
Rémy Coutable's avatar
Rémy Coutable committed
142 143

  SpaceBeforeScript:
144
    enabled: true
Rémy Coutable's avatar
Rémy Coutable committed
145 146

  SpaceInsideHashAttributes:
147
    enabled: true
Rémy Coutable's avatar
Rémy Coutable committed
148 149 150 151 152 153 154 155 156 157
    style: space

  Indentation:
    enabled: true
    character: space # or tab

  TagName:
    enabled: true

  TrailingWhitespace:
158
    enabled: true
Rémy Coutable's avatar
Rémy Coutable committed
159 160

  UnnecessaryInterpolation:
161
    enabled: true
Rémy Coutable's avatar
Rémy Coutable committed
162 163

  UnnecessaryStringOutput:
164
    enabled: true
165 166 167

  ViewLength:
    enabled: false