demarches-normaliennes/.haml-lint.yml
gregoirenovel d2f7c655d7 Bump development gems
- brakeman
- web-console
- xray-rails
- haml-lint
- scss_lint
2018-01-23 16:26:56 +01:00

128 lines
2.2 KiB
YAML

linters:
AlignmentTabs:
enabled: true
AltText:
enabled: false
ClassAttributeWithStaticValue:
enabled: true
ClassesBeforeIds:
enabled: false
ConsecutiveComments:
enabled: false
ConsecutiveSilentScripts:
enabled: false
max_consecutive: 2
EmptyObjectReference:
enabled: true
EmptyScript:
enabled: true
FinalNewline:
enabled: true
present: true
HtmlAttributes:
enabled: true
IdNames:
enabled: false
style: lisp_case
ImplicitDiv:
enabled: true
Indentation:
enabled: true
character: space # or tab
width: 2 # ignored if character == tab
# TODO: enable once we got rid of the legacy UIs
InlineStyles:
enabled: false
InstanceVariables:
enabled: false
file_types: partials
matchers:
all: .*
partials: \A_.*\.haml\z
LeadingCommentSpace:
enabled: true
LineLength:
enabled: false
max: 80
MultilinePipe:
enabled: true
MultilineScript:
enabled: true
ObjectReferenceAttributes:
enabled: true
RepeatedId:
enabled: false
severity: error
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/BlockLength
- Metrics/LineLength
- Style/AlignParameters
- Style/BlockNesting
- Style/ElseAlignment
- Style/EndOfLine
- Style/FileName
- Style/FinalNewline
- Style/FrozenStringLiteralComment
- Style/IfUnlessModifier
- Style/IndentationWidth
- Style/Next
- Style/TrailingBlankLines
- Style/TrailingWhitespace
- Style/WhileUntilModifier
RubyComments:
enabled: true
SpaceBeforeScript:
enabled: true
SpaceInsideHashAttributes:
enabled: true
style: space
TagName:
enabled: true
TrailingWhitespace:
enabled: true
UnnecessaryInterpolation:
enabled: true
# Disabled because too agressive, but to enable
# locally from time to time
UnnecessaryStringOutput:
enabled: false
# Disabled because too agress ive, but to enable
# locally from time to time
ViewLength:
enabled: false