-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chore: Enable erblint in turbo stream files (#3974)
Because: * We are using turbo more and more and have no lint coverage in these files.
- Loading branch information
1 parent
1f94cee
commit b480f39
Showing
7 changed files
with
16 additions
and
15 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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
--- | ||
glob: "**/app/**/*.{html,turbo_stream,js}{+*,}.erb" | ||
exclude: | ||
- '*vendor/*' | ||
- '*app/views/svg/*' | ||
|
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,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 %> |
6 changes: 3 additions & 3 deletions
6
app/views/lessons/v2_project_submissions/create.turbo_stream.erb
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,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', '' %> |
4 changes: 2 additions & 2 deletions
4
app/views/lessons/v2_project_submissions/destroy.turbo_stream.erb
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,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 %> |
2 changes: 1 addition & 1 deletion
2
app/views/lessons/v2_project_submissions/update.turbo_stream.erb
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 @@ | ||
<%= 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 %> |
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 @@ | ||
<%= 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 %> |
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,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 %> |