diff --git a/.rubocop.yml b/.rubocop.yml index 4d0d4dd..f2fcd2a 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -86,6 +86,15 @@ Layout/TrailingWhitespace: Layout/TrailingEmptyLines: Enabled: true +Lint/AmbiguousOperator: + Enabled: true + +Lint/AmbiguousRegexpLiteral: + Enabled: true + +Lint/UselessAssignment: + Enabled: true + Packaging/BundlerSetupInTests: Enabled: true @@ -584,6 +593,7 @@ Style/FrozenStringLiteralComment: Enabled: true Exclude: - bin/console + - '**/*.arb' Style/HashSyntax: Enabled: true diff --git a/spec/arbre/unit/component_spec.rb b/spec/arbre/unit/component_spec.rb index 9019e50..19545cb 100644 --- a/spec/arbre/unit/component_spec.rb +++ b/spec/arbre/unit/component_spec.rb @@ -30,7 +30,7 @@ def build end it "renders the object using the builder method name" do - comp = expect(arbre { + expect(arbre { mock_component }.to_s).to eq <<~HTML
diff --git a/spec/rails/templates/arbre/_partial.arb b/spec/rails/templates/arbre/_partial.arb index 26cbc2b..3f46cbf 100644 --- a/spec/rails/templates/arbre/_partial.arb +++ b/spec/rails/templates/arbre/_partial.arb @@ -1,2 +1 @@ -# frozen_string_literal: true para "Hello from a partial" diff --git a/spec/rails/templates/arbre/_partial_with_assignment.arb b/spec/rails/templates/arbre/_partial_with_assignment.arb index 2ceeb02..95f003a 100644 --- a/spec/rails/templates/arbre/_partial_with_assignment.arb +++ b/spec/rails/templates/arbre/_partial_with_assignment.arb @@ -1,2 +1 @@ -# frozen_string_literal: true para "Partial: #{my_instance_var}" diff --git a/spec/rails/templates/arbre/page_with_arb_partial_and_assignment.arb b/spec/rails/templates/arbre/page_with_arb_partial_and_assignment.arb index 18f2628..c44516d 100644 --- a/spec/rails/templates/arbre/page_with_arb_partial_and_assignment.arb +++ b/spec/rails/templates/arbre/page_with_arb_partial_and_assignment.arb @@ -1,4 +1,3 @@ -# frozen_string_literal: true h1 "Before Partial" render "arbre/partial_with_assignment" h2 "After Partial" diff --git a/spec/rails/templates/arbre/page_with_assignment.arb b/spec/rails/templates/arbre/page_with_assignment.arb index e3a0c41..c330d3b 100644 --- a/spec/rails/templates/arbre/page_with_assignment.arb +++ b/spec/rails/templates/arbre/page_with_assignment.arb @@ -1,2 +1 @@ -# frozen_string_literal: true h1 my_instance_var diff --git a/spec/rails/templates/arbre/page_with_erb_partial.arb b/spec/rails/templates/arbre/page_with_erb_partial.arb index 14cd344..8c47543 100644 --- a/spec/rails/templates/arbre/page_with_erb_partial.arb +++ b/spec/rails/templates/arbre/page_with_erb_partial.arb @@ -1,4 +1,3 @@ -# frozen_string_literal: true h1 "Before Partial" render "erb/partial" h2 "After Partial" diff --git a/spec/rails/templates/arbre/page_with_partial.arb b/spec/rails/templates/arbre/page_with_partial.arb index 44142de..6e76693 100644 --- a/spec/rails/templates/arbre/page_with_partial.arb +++ b/spec/rails/templates/arbre/page_with_partial.arb @@ -1,4 +1,3 @@ -# frozen_string_literal: true h1 "Before Partial" render "arbre/partial" h2 "After Partial" diff --git a/spec/rails/templates/arbre/page_with_render_with_block.arb b/spec/rails/templates/arbre/page_with_render_with_block.arb index e5c78e3..a5c4215 100644 --- a/spec/rails/templates/arbre/page_with_render_with_block.arb +++ b/spec/rails/templates/arbre/page_with_render_with_block.arb @@ -1,4 +1,3 @@ -# frozen_string_literal: true render_in_object = Class.new do def render_in(_, &block) block.call diff --git a/spec/rails/templates/arbre/simple_page.arb b/spec/rails/templates/arbre/simple_page.arb index 9d4e2fe..04d7557 100644 --- a/spec/rails/templates/arbre/simple_page.arb +++ b/spec/rails/templates/arbre/simple_page.arb @@ -1,4 +1,3 @@ -# frozen_string_literal: true html do head do end