.haml-lint.yml 1.93 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 47 48 49
  InlineStyles:
    enabled: false

  InstanceVariables:
    enabled: false

Rémy Coutable's avatar
Rémy Coutable committed
50 51 52 53 54 55 56 57
  LeadingCommentSpace:
    enabled: false

  LineLength:
    enabled: false
    max: 80

  MultilinePipe:
58
    enabled: true
Rémy Coutable's avatar
Rémy Coutable committed
59 60 61 62 63 64 65

  MultilineScript:
    enabled: true

  ObjectReferenceAttributes:
    enabled: true

66 67 68
  RepeatedId:
    enabled: false

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

  RubyComments:
92
    enabled: true
Rémy Coutable's avatar
Rémy Coutable committed
93 94

  SpaceBeforeScript:
95
    enabled: true
Rémy Coutable's avatar
Rémy Coutable committed
96 97

  SpaceInsideHashAttributes:
98
    enabled: true
Rémy Coutable's avatar
Rémy Coutable committed
99 100 101 102 103 104 105 106 107 108
    style: space

  Indentation:
    enabled: true
    character: space # or tab

  TagName:
    enabled: true

  TrailingWhitespace:
109
    enabled: true
Rémy Coutable's avatar
Rémy Coutable committed
110 111

  UnnecessaryInterpolation:
112
    enabled: true
Rémy Coutable's avatar
Rémy Coutable committed
113 114

  UnnecessaryStringOutput:
115
    enabled: true
116 117 118

  ViewLength:
    enabled: false