e556b421c5
Add HamlLint::Linter::NoPlainNodes linter See merge request gitlab-org/gitlab-ce!28265
175 lines
3.7 KiB
YAML
175 lines
3.7 KiB
YAML
inherits_from:
|
|
- .haml-lint_todo.yml
|
|
# Whether to ignore frontmatter at the beginning of HAML documents for
|
|
# frameworks such as Jekyll/Middleman
|
|
skip_frontmatter: false
|
|
exclude:
|
|
- 'vendor/**/*'
|
|
- 'spec/**/*'
|
|
require:
|
|
- './lib/haml_lint/linter/no_plain_nodes.rb'
|
|
|
|
linters:
|
|
AltText:
|
|
enabled: true
|
|
|
|
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
|
|
|
|
ImplicitDiv:
|
|
enabled: true
|
|
|
|
InlineJavaScript:
|
|
enabled: true
|
|
|
|
InlineStyles:
|
|
enabled: false
|
|
|
|
InstanceVariables:
|
|
enabled: false
|
|
|
|
LeadingCommentSpace:
|
|
enabled: false
|
|
|
|
LineLength:
|
|
enabled: false
|
|
max: 80
|
|
|
|
MultilinePipe:
|
|
enabled: true
|
|
|
|
MultilineScript:
|
|
enabled: true
|
|
|
|
ObjectReferenceAttributes:
|
|
enabled: true
|
|
|
|
RepeatedId:
|
|
enabled: false
|
|
|
|
RuboCop:
|
|
enabled: true
|
|
# These cops are incredibly noisy when it comes to HAML templates, so we
|
|
# ignore them.
|
|
ignored_cops:
|
|
- Layout/BlockAlignment
|
|
- Layout/EndAlignment
|
|
- Lint/Void
|
|
- Metrics/LineLength
|
|
- Naming/FileName
|
|
- Style/AlignParameters
|
|
- Style/BlockNesting
|
|
- Style/ElseAlignment
|
|
- Style/FileName
|
|
- Style/FinalNewline
|
|
- Style/FrozenStringLiteralComment
|
|
- Style/IfUnlessModifier
|
|
- Style/IndentationWidth
|
|
- Style/Next
|
|
- Style/TrailingBlankLines
|
|
- Style/TrailingWhitespace
|
|
- Style/WhileUntilModifier
|
|
|
|
# These cops should eventually get enabled
|
|
- Cop/LineBreakAfterGuardClauses
|
|
- Cop/LineBreakAroundConditionalBlock
|
|
- Cop/ProjectPathHelper
|
|
- GitlabSecurity/PublicSend
|
|
- Layout/EmptyLineAfterGuardClause
|
|
- 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/SafeNavigationConsistency
|
|
- Lint/Syntax
|
|
- Metrics/BlockNesting
|
|
- Naming/VariableName
|
|
- Performance/RedundantMatch
|
|
- Performance/StringReplacement
|
|
- Rails/LinkToBlank
|
|
- 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/UnneededCondition
|
|
- Style/WordArray
|
|
- Style/ZeroLengthPredicate
|
|
|
|
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
|
|
|
|
ViewLength:
|
|
enabled: false
|