forked from mastodon/mastodon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added haml-lint and fix warnings (mastodon#2773)
* add haml_lint to Gemfile * add .haml-lint.yml * fix warnings of haml_lint
- Loading branch information
Showing
39 changed files
with
207 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
- user_facing_flashes.each do |key, value| | ||
.flash-message{class: key} | ||
.flash-message{ class: key } | ||
%strong= value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
= t('errors.403') | ||
|
||
- content_for :content do | ||
= t('errors.403') | ||
= t('errors.403') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
= t('errors.404') | ||
|
||
- content_for :content do | ||
= t('errors.404') | ||
= t('errors.404') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
- content_for :header_tags do | ||
%script#initial-state{:type => 'application/json'}!= json_escape(render(file: 'home/initial_state', formats: :json)) | ||
%script#initial-state{ type: 'application/json' }!= json_escape(render(file: 'home/initial_state', formats: :json)) | ||
|
||
= javascript_pack_tag 'application', integrity: true, crossorigin: 'anonymous' | ||
|
||
.app-holder#mastodon{ data: { props: Oj.dump(default_props) }} | ||
.app-holder#mastodon{ data: { props: Oj.dump(default_props) } } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.