style: reformat with prettier v3 and resolve rubocop conflicts#393
Merged
style: reformat with prettier v3 and resolve rubocop conflicts#393
Conversation
* fix: rename camelCase local variables in tool_inventory_tool.rb (barcodeEquality, toolTypeEquality) and tool_inventory_tools_controller.rb (defaultErrorMsg, pathParams) to snake_case * fix: rename is_booth_chair? to booth_chair? on Participant and all callers * fix: rename is_red_hardhat? to red_hardhat? on Participant and all callers * fix: rename is_checked_out? to checked_out? on Tool and ScissorLift and all callers * fix: rename is_hardhat? to hardhat? on Tool and all callers * fix: rename is_past_due to past_due? on Task and all callers * fix: rename is_checked_in to checked_in? on Shift and all callers
* collapse empty method definitions to single line (Style/EmptyMethod) * remove extra blank lines (Layout/EmptyLines) * convert String#% to format() (Style/FormatString) * convert remaining double-quoted strings to single quotes (Style/StringLiterals)
… line-length * move include Messenger inside Event, OrganizationTimelineEntry, and Shift classes * move include WebMock::API inside ActiveSupport::TestCase in test_helper * wrap long commented-out lines in db/seeds.rb
* replace 55 Rails/I18nLocaleTexts violations across 21 controllers
and 1 model with t() calls
* add locale keys under en: for applets, charge_types, charges,
downtime, event_types, events, home, memberships, notes,
organization_build_steps, organization_members,
organization_timeline_entries, scissor_lift_checkouts, sessions,
store/purchases, tasks, tool_inventory_tools, tool_types, tools
* use lazy t('.key') lookup in named action methods; explicit
t('controller.action.key') in private helpers and rescue_from blocks
* extract participant phone_number validation message to activerecord
error key en.activerecord.errors.models.participant.attributes
.phone_number.format
* OrganizationBuildStatus -> organization_build_steps: destroy * Participant -> organization_build_steps (approver): restrict_with_error * Participant -> events (assignee): nullify * StoreItem -> store_purchases: restrict_with_error * ToolInventory -> tool_inventory_tools: destroy * ToolType -> tools: restrict_with_error * ToolType -> tool_inventory_tools: destroy
params.permit! in tools#index was used only to build a pagination URL via url_for; replace with params.permit(:type, :page, :size) to avoid allowing arbitrary params through
* add config/locales/ and specific ERB files to .prettierignore to
prevent prettier YAML parser failures on %{interpolation} syntax
* disable Layout and Style cops in .rubocop.yml that conflict with
prettier's formatting decisions (would create an autocorrect loop)
* set Style/EmptyMethod: EnforcedStyle: expanded to match prettier's
multi-line empty method formatting
* reformat 85 source files with prettier v3
* autocorrect Layout/EmptyLinesAfterModuleInclusion in event.rb and
organization_timeline_entry.rb (non-conflicting cop)
…nfig
* rename erblint executable reference in rake task: erblint -> erb_lint
* rename .erb-lint.yml to .erb_lint.yml (deprecated name)
* disable Layout cops in .erb_lint.yml that conflict with prettier
(ArgumentAlignment, ElseAlignment, EndAlignment, IndentationWidth,
FirstArrayElementIndentation)
* exclude dead reports/index.html.erb view (no controller or route)
* replace raw() on plain text strings with bare string literals in
shifts/index.html.erb and downtime/index.html.erb
* replace <tr <%= raw('class="x"') %>> with <tr class="<%= %>"> in
events/index, downtime/index, downtime/downtime, downtime/_sidebar,
and tools/_tool
* replace link_to raw('<strong>...') with block form in tools/_tools
* rewrite raw("<option ...>") as proper ERB option tags in tasks/index
* add autocomplete: 'off' to bare text_field_tag inputs (checkouts,
home, organizations, reports)
* add .to_json to ERB interpolations in JS context in
memberships/new_old and participants/safety_briefings/_video
* fix commented-out ERB block in tool_inventory/_inventory
* remove extra blank line in organizations/_organizations
* delete app/views/organizations/_organizations.html.erb (orphaned partial, empty loop body, never rendered by any view) * delete app/views/reports/index.html.erb (no controller or route, dead since initial commit 10 years ago) * remove .erb_lint.yml exclude for deleted reports view * remove .prettierignore entry for deleted organizations partial
natsuki615
approved these changes
Mar 6, 2026
# Conflicts: # app/controllers/applets/ppe_collection_controller.rb # app/controllers/applets/ppe_distribution_controller.rb # app/controllers/application_controller.rb # app/controllers/charge_types_controller.rb # app/controllers/downtime_controller.rb # app/controllers/event_types_controller.rb # app/controllers/events_controller.rb # app/controllers/organization_members_controller.rb # app/controllers/store/purchases_controller.rb # app/controllers/tool_types_controller.rb # app/models/event.rb # app/models/organization_timeline_entry.rb # app/models/shift.rb # app/views/tools/_tool.html.erb
…files * Expand single-line empty methods to multiline to match Style/EmptyMethod: expanded (faq, home, organizations, shifts controllers; carnegie_mellon_id_card, test_helper) * Add frozen_string_literal comment to weather controller, helper, job, model, service, migration, and test files added in the weather feature * Fix Style/StringLiterals in weather test files (single-quoted strings) * Fix Minitest/EmptyLineBeforeAssertionMethods in weather controller test * Fix Minitest/AssertPredicate in shift_test and task_test
* Reformat ppe_distribution_controller, downtime_controller, shift, and weather files with prettier v3 * Expand single-line empty methods to match Style/EmptyMethod: expanded * Add frozen_string_literal comment to new weather feature files * Fix Style/StringLiterals, Minitest/AssertPredicate, and Minitest/EmptyLineBeforeAssertionMethods in test files
…partial * Revert raw 'class="warning"' to class="<%= 'warning' if ... %>" to fix Rails/OutputSafety violation introduced during merge conflict resolution
katiez667
pushed a commit
that referenced
this pull request
Mar 20, 2026
* fix(naming): rename non-snake_case variables and is_* predicate methods
* fix: rename camelCase local variables in tool_inventory_tool.rb
(barcodeEquality, toolTypeEquality) and tool_inventory_tools_controller.rb
(defaultErrorMsg, pathParams) to snake_case
* fix: rename is_booth_chair? to booth_chair? on Participant and all callers
* fix: rename is_red_hardhat? to red_hardhat? on Participant and all callers
* fix: rename is_checked_out? to checked_out? on Tool and ScissorLift and
all callers
* fix: rename is_hardhat? to hardhat? on Tool and all callers
* fix: rename is_past_due to past_due? on Task and all callers
* fix: rename is_checked_in to checked_in? on Shift and all callers
* fix(lint): autocorrect simple style violations
* collapse empty method definitions to single line (Style/EmptyMethod)
* remove extra blank lines (Layout/EmptyLines)
* convert String#% to format() (Style/FormatString)
* convert remaining double-quoted strings to single quotes (Style/StringLiterals)
* fix(lint): move top-level includes into class scope and fix remaining line-length
* move include Messenger inside Event, OrganizationTimelineEntry, and Shift classes
* move include WebMock::API inside ActiveSupport::TestCase in test_helper
* wrap long commented-out lines in db/seeds.rb
* fix(lint): extract hardcoded locale texts to en.yml
* replace 55 Rails/I18nLocaleTexts violations across 21 controllers
and 1 model with t() calls
* add locale keys under en: for applets, charge_types, charges,
downtime, event_types, events, home, memberships, notes,
organization_build_steps, organization_members,
organization_timeline_entries, scissor_lift_checkouts, sessions,
store/purchases, tasks, tool_inventory_tools, tool_types, tools
* use lazy t('.key') lookup in named action methods; explicit
t('controller.action.key') in private helpers and rescue_from blocks
* extract participant phone_number validation message to activerecord
error key en.activerecord.errors.models.participant.attributes
.phone_number.format
* fix(models): add dependent: options to has_many associations
* OrganizationBuildStatus -> organization_build_steps: destroy
* Participant -> organization_build_steps (approver): restrict_with_error
* Participant -> events (assignee): nullify
* StoreItem -> store_purchases: restrict_with_error
* ToolInventory -> tool_inventory_tools: destroy
* ToolType -> tools: restrict_with_error
* ToolType -> tool_inventory_tools: destroy
* fix(security): replace params.permit! with explicit param allowlist
params.permit! in tools#index was used only to build a pagination
URL via url_for; replace with params.permit(:type, :page, :size)
to avoid allowing arbitrary params through
* style: reformat with prettier v3 and resolve rubocop conflicts
* add config/locales/ and specific ERB files to .prettierignore to
prevent prettier YAML parser failures on %{interpolation} syntax
* disable Layout and Style cops in .rubocop.yml that conflict with
prettier's formatting decisions (would create an autocorrect loop)
* set Style/EmptyMethod: EnforcedStyle: expanded to match prettier's
multi-line empty method formatting
* reformat 85 source files with prettier v3
* autocorrect Layout/EmptyLinesAfterModuleInclusion in event.rb and
organization_timeline_entry.rb (non-conflicting cop)
* fix(erblint): resolve all erblint violations and update deprecated config
* rename erblint executable reference in rake task: erblint -> erb_lint
* rename .erb-lint.yml to .erb_lint.yml (deprecated name)
* disable Layout cops in .erb_lint.yml that conflict with prettier
(ArgumentAlignment, ElseAlignment, EndAlignment, IndentationWidth,
FirstArrayElementIndentation)
* exclude dead reports/index.html.erb view (no controller or route)
* replace raw() on plain text strings with bare string literals in
shifts/index.html.erb and downtime/index.html.erb
* replace <tr <%= raw('class="x"') %>> with <tr class="<%= %>"> in
events/index, downtime/index, downtime/downtime, downtime/_sidebar,
and tools/_tool
* replace link_to raw('<strong>...') with block form in tools/_tools
* rewrite raw("<option ...>") as proper ERB option tags in tasks/index
* add autocomplete: 'off' to bare text_field_tag inputs (checkouts,
home, organizations, reports)
* add .to_json to ERB interpolations in JS context in
memberships/new_old and participants/safety_briefings/_video
* fix commented-out ERB block in tool_inventory/_inventory
* remove extra blank line in organizations/_organizations
* chore: delete dead views and clean up lint config
* delete app/views/organizations/_organizations.html.erb (orphaned
partial, empty loop body, never rendered by any view)
* delete app/views/reports/index.html.erb (no controller or route,
dead since initial commit 10 years ago)
* remove .erb_lint.yml exclude for deleted reports view
* remove .prettierignore entry for deleted organizations partial
* fix(lint): expand empty methods and add frozen_string_literal to new files
* Expand single-line empty methods to multiline to match Style/EmptyMethod: expanded
(faq, home, organizations, shifts controllers; carnegie_mellon_id_card, test_helper)
* Add frozen_string_literal comment to weather controller, helper, job,
model, service, migration, and test files added in the weather feature
* Fix Style/StringLiterals in weather test files (single-quoted strings)
* Fix Minitest/EmptyLineBeforeAssertionMethods in weather controller test
* Fix Minitest/AssertPredicate in shift_test and task_test
* style: fix prettier formatting and rubocop autocorrections post-merge
* Reformat ppe_distribution_controller, downtime_controller, shift, and
weather files with prettier v3
* Expand single-line empty methods to match Style/EmptyMethod: expanded
* Add frozen_string_literal comment to new weather feature files
* Fix Style/StringLiterals, Minitest/AssertPredicate, and
Minitest/EmptyLineBeforeAssertionMethods in test files
* fix(security): replace raw html_safe with ERB interpolation in tools partial
* Revert raw 'class="warning"' to class="<%= 'warning' if ... %>"
to fix Rails/OutputSafety violation introduced during merge conflict
resolution
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
config/locales/and problematic ERB templates to.prettierignoreto prevent parser failures on Rails%{interpolation}YAML syntaxStyle/EmptyMethod: EnforcedStyle: expandedso rubocop matches prettier's multi-line empty method outputLayout/EmptyLinesAfterModuleInclusioninevent.rbandorganization_timeline_entry.rb(non-conflicting, one-way)THIS BRANCH STACKS ON PRs #388 #389 #390 #391 & #392 (Pls do those first)