Commit c4a90367 authored by Vitaly Slobodin's avatar Vitaly Slobodin

Merge branch 'tnir/Style/RedundantParentheses' into 'master'

Enable Style/RedundantParentheses cop for HAML

See merge request gitlab-org/gitlab!58846
parents 6eac70da ab28ee2e
...@@ -135,7 +135,6 @@ linters: ...@@ -135,7 +135,6 @@ linters:
- Style/NegatedIf - Style/NegatedIf
- Style/NestedTernaryOperator - Style/NestedTernaryOperator
- Style/ParenthesesAroundCondition - Style/ParenthesesAroundCondition
- Style/RedundantParentheses
- Style/SelfAssignment - Style/SelfAssignment
- Style/TernaryParentheses - Style/TernaryParentheses
- Style/TrailingCommaInHashLiteral - Style/TrailingCommaInHashLiteral
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
.awards.js-awards-block{ class: ("hidden" if !inline && grouped_emojis.empty?), data: { award_url: toggle_award_url(awardable) } } .awards.js-awards-block{ class: ("hidden" if !inline && grouped_emojis.empty?), data: { award_url: toggle_award_url(awardable) } }
- awards_sort(grouped_emojis).each do |emoji, awards| - awards_sort(grouped_emojis).each do |emoji, awards|
%button.gl-button.btn.btn-default.award-control.js-emoji-btn.has-tooltip{ type: "button", %button.gl-button.btn.btn-default.award-control.js-emoji-btn.has-tooltip{ type: "button",
class: [(award_state_class(awardable, awards, current_user))], class: [award_state_class(awardable, awards, current_user)],
data: { title: award_user_list(awards, current_user) } } data: { title: award_user_list(awards, current_user) } }
= emoji_icon(emoji) = emoji_icon(emoji)
%span.award-control-text.js-counter %span.award-control-text.js-counter
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
= render 'shared/namespaces/cascading_settings/lock_popovers' = render 'shared/namespaces/cascading_settings/lock_popovers'
%section.settings.gs-general.no-animate#js-general-settings{ class: ('expanded') } %section.settings.gs-general.no-animate.expanded#js-general-settings
.settings-header .settings-header
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only{ role: 'button' } %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only{ role: 'button' }
= _('Naming, visibility') = _('Naming, visibility')
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
%tbody %tbody
- @user_map.each do |id, user| - @user_map.each do |id, user|
%tr %tr
%td= (id) %td= id
%td= text_field_tag "users[#{id}][name]", user[:name], class: 'form-control' %td= text_field_tag "users[#{id}][name]", user[:name], class: 'form-control'
%td= text_field_tag "users[#{id}][email]", user[:email], class: 'form-control' %td= text_field_tag "users[#{id}][email]", user[:email], class: 'form-control'
%td %td
......
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
- if message - if message
.flash-container.flash-container-page .flash-container.flash-container-page
.flash-notice .flash-notice
%div{ class: (container_class) } %div{ class: container_class }
%span %span
= message = message
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
= f.select :role, ::User.roles.keys.map { |role| [role.titleize, role] }, {}, class: 'form-control js-user-role-dropdown', autofocus: true = f.select :role, ::User.roles.keys.map { |role| [role.titleize, role] }, {}, class: 'form-control js-user-role-dropdown', autofocus: true
- if Feature.enabled?(:user_other_role_details) - if Feature.enabled?(:user_other_role_details)
.row .row
.form-group.col-sm-12.js-other-role-group{ class: ("hidden") } .form-group.col-sm-12.js-other-role-group.hidden
= f.label :other_role, _('What is your job title? (optional)'), class: 'form-check-label gl-mb-3' = f.label :other_role, _('What is your job title? (optional)'), class: 'form-check-label gl-mb-3'
= f.text_field :other_role, class: 'form-control' = f.text_field :other_role, class: 'form-control'
= render_if_exists "registrations/welcome/setup_for_company", f: f = render_if_exists "registrations/welcome/setup_for_company", f: f
......
...@@ -5,5 +5,5 @@ ...@@ -5,5 +5,5 @@
- scopes.each do |scope| - scopes.each do |scope|
%fieldset.form-group.form-check %fieldset.form-group.form-check
= check_box_tag "#{prefix}[scopes][]", scope, token.scopes.include?(scope), id: "#{prefix}_scopes_#{scope}", class: "form-check-input qa-#{scope}-radio" = check_box_tag "#{prefix}[scopes][]", scope, token.scopes.include?(scope), id: "#{prefix}_scopes_#{scope}", class: "form-check-input qa-#{scope}-radio"
= label_tag ("#{prefix}_scopes_#{scope}"), scope, class: 'label-bold form-check-label' = label_tag "#{prefix}_scopes_#{scope}", scope, class: 'label-bold form-check-label'
.text-secondary= t scope, scope: scope_description(prefix) .text-secondary= t scope, scope: scope_description(prefix)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment