mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-11-23 23:33:37 +00:00
48594b18e6
* add haml_lint to Gemfile * add .haml-lint.yml * fix warnings of haml_lint
109 lines
1.9 KiB
YAML
109 lines
1.9 KiB
YAML
# Whether to ignore frontmatter at the beginning of HAML documents for
|
|
# frameworks such as Jekyll/Middleman
|
|
skip_frontmatter: false
|
|
|
|
exclude:
|
|
- 'vendor/**/*'
|
|
- 'spec/**/*'
|
|
- 'lib/templates/**/*'
|
|
- 'app/views/kaminari/**/*'
|
|
|
|
linters:
|
|
AltText:
|
|
enabled: false
|
|
|
|
ClassAttributeWithStaticValue:
|
|
enabled: true
|
|
|
|
ClassesBeforeIds:
|
|
enabled: true
|
|
|
|
ConsecutiveComments:
|
|
enabled: true
|
|
|
|
ConsecutiveSilentScripts:
|
|
enabled: true
|
|
max_consecutive: 2
|
|
|
|
EmptyObjectReference:
|
|
enabled: true
|
|
|
|
EmptyScript:
|
|
enabled: true
|
|
|
|
FinalNewline:
|
|
enabled: true
|
|
present: true
|
|
|
|
HtmlAttributes:
|
|
enabled: true
|
|
|
|
ImplicitDiv:
|
|
enabled: true
|
|
|
|
LeadingCommentSpace:
|
|
enabled: true
|
|
|
|
LineLength:
|
|
enabled: false
|
|
max: 80
|
|
|
|
MultilinePipe:
|
|
enabled: true
|
|
|
|
MultilineScript:
|
|
enabled: true
|
|
|
|
ObjectReferenceAttributes:
|
|
enabled: true
|
|
|
|
RuboCop:
|
|
enabled: true
|
|
# 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
|
|
|
|
Indentation:
|
|
enabled: true
|
|
character: space # or tab
|
|
|
|
TagName:
|
|
enabled: true
|
|
|
|
TrailingWhitespace:
|
|
enabled: true
|
|
|
|
UnnecessaryInterpolation:
|
|
enabled: true
|
|
|
|
UnnecessaryStringOutput:
|
|
enabled: true
|