Merge pull request #8084 from colinux/view-components-haml-lint
linters: enable haml-lint for View components
This commit is contained in:
commit
d1de20e628
7 changed files with 10 additions and 10 deletions
|
@ -12,11 +12,11 @@
|
||||||
%ul.fr-tags-group
|
%ul.fr-tags-group
|
||||||
- tags.each do |tag|
|
- tags.each do |tag|
|
||||||
%li
|
%li
|
||||||
%p.fr-tag=tag
|
%p.fr-tag= tag
|
||||||
.fr-card__end
|
.fr-card__end
|
||||||
- if error
|
- if error
|
||||||
.fr-card__detail.fr-alert.fr-alert--error
|
.fr-card__detail.fr-alert.fr-alert--error
|
||||||
%p=error
|
%p= error
|
||||||
|
|
||||||
- if footer_buttons?
|
- if footer_buttons?
|
||||||
.fr-card__footer
|
.fr-card__footer
|
||||||
|
|
|
@ -6,6 +6,6 @@
|
||||||
- if @champ.collapsible_explanation_enabled? && @champ.collapsible_explanation_text.present?
|
- if @champ.collapsible_explanation_enabled? && @champ.collapsible_explanation_text.present?
|
||||||
%div
|
%div
|
||||||
%p.fr-my-2w
|
%p.fr-my-2w
|
||||||
%button{type: "button", "aria-controls": dom_id(@champ, :explanation), "aria-expanded": "false", href: dom_id(@champ, :explanation)} Lire plus
|
%button{ type: "button", "aria-controls": dom_id(@champ, :explanation), "aria-expanded": "false", href: dom_id(@champ, :explanation) } Lire plus
|
||||||
%p.fr-collapse{ id: dom_id(@champ, :explanation)}
|
%p.fr-collapse{ id: dom_id(@champ, :explanation) }
|
||||||
= @champ.collapsible_explanation_text
|
= @champ.collapsible_explanation_text
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
%div
|
%div
|
||||||
.line-count.fr-my-1w
|
.line-count.fr-my-1w
|
||||||
%p.fr-tag= @count
|
%p.fr-tag= @count
|
||||||
|
|
||||||
%h3.fr-h6
|
%h3.fr-h6
|
||||||
= t('.title')
|
= t('.title')
|
||||||
%p.fr-tile-subtitle À remplir par les usagers
|
%p.fr-tile-subtitle À remplir par les usagers
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
%li.type-de-champ.flex.column.justify-start{ html_options }
|
%li.type-de-champ.flex.column.justify-start{ html_options }
|
||||||
.flex.justify-start.section.head{ class: type_de_champ.header_section? ? '' : 'hr'}
|
.flex.justify-start.section.head{ class: type_de_champ.header_section? ? '' : 'hr' }
|
||||||
.handle.small.icon-only.icon.move-handle{ title: "Déplacer le champ vers le haut ou vers le bas" }
|
.handle.small.icon-only.icon.move-handle{ title: "Déplacer le champ vers le haut ou vers le bas" }
|
||||||
.flex.justify-start.delete
|
.flex.justify-start.delete
|
||||||
= button_to type_de_champ_path, class: 'button small icon-only danger', method: :delete, form: { data: { turbo_confirm: 'Êtes vous sûr de vouloir supprimer ce champ ?' } } do
|
= button_to type_de_champ_path, class: 'button small icon-only danger', method: :delete, form: { data: { turbo_confirm: 'Êtes vous sûr de vouloir supprimer ce champ ?' } } do
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
%span.sr-only Déplacer le champ vers le haut
|
%span.sr-only Déplacer le champ vers le haut
|
||||||
%button.move-down.cell{ move_button_options(:down) }
|
%button.move-down.cell{ move_button_options(:down) }
|
||||||
.icon.arrow-down.small
|
.icon.arrow-down.small
|
||||||
%span.sr-only Déplacer le champ vers le bas
|
%span.sr-only Déplacer le champ vers le bas
|
||||||
.cell.flex.justify-start.column.flex-grow
|
.cell.flex.justify-start.column.flex-grow
|
||||||
= form.label :type_champ, "Type de champ", for: dom_id(type_de_champ, :type_champ)
|
= form.label :type_champ, "Type de champ", for: dom_id(type_de_champ, :type_champ)
|
||||||
= form.select :type_champ, grouped_options_for_select(types_of_type_de_champ, type_de_champ.type_champ), {}, class: 'small-margin small inline width-100', id: dom_id(type_de_champ, :type_champ)
|
= form.select :type_champ, grouped_options_for_select(types_of_type_de_champ, type_de_champ.type_champ), {}, class: 'small-margin small inline width-100', id: dom_id(type_de_champ, :type_champ)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#errors-summary
|
#errors-summary
|
||||||
- if @revision.invalid?
|
- if @revision.invalid?
|
||||||
.card.warning
|
.card.warning
|
||||||
.card-title La logique conditionnelle est devenue invalide
|
.card-title La logique conditionnelle est devenue invalide
|
||||||
|
|
||||||
%p.mb-2= t('.fix', count: @revision.errors.count)
|
%p.mb-2= t('.fix', count: @revision.errors.count)
|
||||||
= error_message
|
= error_message
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
%span.fill-duration{ id: dom_id(@revision, :estimated_fill_duration) }
|
%span.fill-duration{ id: dom_id(@revision, :estimated_fill_duration) }
|
||||||
- if show?
|
- if show?
|
||||||
= t('.estimated_fill_duration')
|
= t('.estimated_fill_duration')
|
||||||
= link_to "https://doc.demarches-simplifiees.fr/tutoriels/tutoriel-administrateur#g.-estimation-de-la-duree-de-remplissage", target: "_blank", rel: "noopener noreferrer" do
|
= link_to "#{DOC_URL}/tutoriels/tutoriel-administrateur#g.-estimation-de-la-duree-de-remplissage", target: "_blank", rel: "noopener noreferrer" do
|
||||||
= t('.estimated_fill_minutes', estimated_minutes: estimated_fill_duration_minutes)
|
= t('.estimated_fill_minutes', estimated_minutes: estimated_fill_duration_minutes)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
task :lint do
|
task :lint do
|
||||||
sh "bundle exec rubocop --parallel"
|
sh "bundle exec rubocop --parallel"
|
||||||
sh "bundle exec haml-lint app/views/"
|
sh "bundle exec haml-lint app/views/ app/components/"
|
||||||
sh "bundle exec scss-lint app/assets/stylesheets/"
|
sh "bundle exec scss-lint app/assets/stylesheets/"
|
||||||
sh "bundle exec i18n-tasks missing --locales fr"
|
sh "bundle exec i18n-tasks missing --locales fr"
|
||||||
sh "bundle exec i18n-tasks unused --locale en" # TODO: check for all locales
|
sh "bundle exec i18n-tasks unused --locale en" # TODO: check for all locales
|
||||||
|
|
Loading…
Reference in a new issue