Skip to content

Commit

Permalink
Lint Generator: No longer fix violations after invocation
Browse files Browse the repository at this point in the history
Supports #1152

We found that we needed to run this generator last in
`suspenders:install:web` to ensure any potential violation was resolved.

Instead, we'll just make that the responsibility of
`suspenders:install:web`.
  • Loading branch information
stevepolitodesign committed Mar 25, 2024
1 parent eb6b1c1 commit f9f5246
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
7 changes: 0 additions & 7 deletions lib/generators/suspenders/lint_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,6 @@ def update_package_json
File.write package_json, JSON.pretty_generate(json)
end

# This needs to be the last method definition to ensure everything is
# properly configured
def fix_violations
run "yarn run fix:prettier"
run "bundle exec rake standard:fix_unsafely"
end

private

def package_json
Expand Down
9 changes: 0 additions & 9 deletions test/generators/suspenders/lint_generator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -248,15 +248,6 @@ class LintGeneratorTest < Rails::Generators::TestCase
assert_equal desc, generator_class.desc
end

test "fixes violations" do
capture(:stderr) do
output = run_generator

assert_match(/yarn run fix:prettier/, output)
assert_match(/bundle exec rake standard:fix_unsafely/, output)
end
end

private

def prepare_destination
Expand Down

0 comments on commit f9f5246

Please sign in to comment.