diff --git a/.erb-lint.yml b/.erb-lint.yml index 38078354e9..9c25d5b102 100644 --- a/.erb-lint.yml +++ b/.erb-lint.yml @@ -1,4 +1,5 @@ --- +glob: "**/app/**/*.{html,turbo_stream,js}{+*,}.erb" exclude: - '*vendor/*' - '*app/views/svg/*' diff --git a/app/views/lessons/completions/create.turbo_stream.erb b/app/views/lessons/completions/create.turbo_stream.erb index 580bf22003..c62ec6e463 100644 --- a/app/views/lessons/completions/create.turbo_stream.erb +++ b/app/views/lessons/completions/create.turbo_stream.erb @@ -1,14 +1,14 @@ <% if params[:icon_only] %> - <%= turbo_stream.replace dom_id(@lesson, "complete-button") do %> + <%= turbo_stream.replace dom_id(@lesson, 'complete-button') do %> <% @lesson.completed? %> - <%= render Complete::IconComponent.new(lesson: @lesson, current_user: current_user, animate: true) %> + <%= render Complete::IconComponent.new(lesson: @lesson, current_user:, animate: true) %> <% end %> <% else %> - <%= turbo_stream.replace "complete-button" do %> + <%= turbo_stream.replace 'complete-button' do %> <%= render Complete::ButtonComponent.new(lesson: @lesson, animate: true) %> <% end %> <% end %> -<%= turbo_stream.update dom_id(@lesson.course, "progress") do %> +<%= turbo_stream.update dom_id(@lesson.course, 'progress') do %> <%= render ProgressCircle::Component.new(percentage: @lesson.course.progress_for(current_user).percentage) %> <% end %> diff --git a/app/views/lessons/v2_project_submissions/create.turbo_stream.erb b/app/views/lessons/v2_project_submissions/create.turbo_stream.erb index 740116a61c..66035eabaf 100644 --- a/app/views/lessons/v2_project_submissions/create.turbo_stream.erb +++ b/app/views/lessons/v2_project_submissions/create.turbo_stream.erb @@ -1,5 +1,5 @@ -<%= turbo_stream.prepend "submissions-list" do %> - <%= render ProjectSubmissions::ItemComponent.new(project_submission: @project_submission, current_user: current_user) %> +<%= turbo_stream.prepend 'submissions-list' do %> + <%= render ProjectSubmissions::ItemComponent.new(project_submission: @project_submission, current_user:) %> <% end %> -<%= turbo_stream.update "add-submission-button", "" %> +<%= turbo_stream.update 'add-submission-button', '' %> diff --git a/app/views/lessons/v2_project_submissions/destroy.turbo_stream.erb b/app/views/lessons/v2_project_submissions/destroy.turbo_stream.erb index cd40bf8822..115ebf6d5d 100644 --- a/app/views/lessons/v2_project_submissions/destroy.turbo_stream.erb +++ b/app/views/lessons/v2_project_submissions/destroy.turbo_stream.erb @@ -1,5 +1,5 @@ <%= turbo_stream.remove @project_submission %> -<%= turbo_stream.update "add-submission-button" do %> - <%= render "lessons/v2_project_submissions/add_button", lesson: @lesson %> +<%= turbo_stream.update 'add-submission-button' do %> + <%= render 'lessons/v2_project_submissions/add_button', lesson: @lesson %> <% end %> diff --git a/app/views/lessons/v2_project_submissions/update.turbo_stream.erb b/app/views/lessons/v2_project_submissions/update.turbo_stream.erb index 8669c54adb..9ade4fddfe 100644 --- a/app/views/lessons/v2_project_submissions/update.turbo_stream.erb +++ b/app/views/lessons/v2_project_submissions/update.turbo_stream.erb @@ -1,3 +1,3 @@ <%= turbo_stream.replace @project_submission do %> - <%= render ProjectSubmissions::ItemComponent.new(project_submission: @project_submission, current_user: current_user) %> + <%= render ProjectSubmissions::ItemComponent.new(project_submission: @project_submission, current_user:) %> <% end %> diff --git a/app/views/project_submissions/v2_likes/create.turbo_stream.erb b/app/views/project_submissions/v2_likes/create.turbo_stream.erb index c6650f5814..134c5bc5ad 100644 --- a/app/views/project_submissions/v2_likes/create.turbo_stream.erb +++ b/app/views/project_submissions/v2_likes/create.turbo_stream.erb @@ -1,3 +1,3 @@ <%= turbo_stream.replace @project_submission do %> - <%= render ProjectSubmissions::ItemComponent.new(project_submission: @project_submission, current_user: current_user) %> + <%= render ProjectSubmissions::ItemComponent.new(project_submission: @project_submission, current_user:) %> <% end %> diff --git a/app/views/themes/update.turbo_stream.erb b/app/views/themes/update.turbo_stream.erb index 5b8c04c74a..c4029c7cd2 100644 --- a/app/views/themes/update.turbo_stream.erb +++ b/app/views/themes/update.turbo_stream.erb @@ -1,7 +1,7 @@ -<%= turbo_stream.update "theme_switcher" do %> - <%= render Theme::SwitcherComponent.new(current_theme: current_theme, type: :icon_only) %> +<%= turbo_stream.update 'theme_switcher' do %> + <%= render Theme::SwitcherComponent.new(current_theme:, type: :icon_only) %> <% end %> -<%= turbo_stream.update "theme_switcher_mobile" do %> - <%= render Theme::SwitcherComponent.new(current_theme: current_theme, type: :mobile) %> +<%= turbo_stream.update 'theme_switcher_mobile' do %> + <%= render Theme::SwitcherComponent.new(current_theme:, type: :mobile) %> <% end %>