Skip to content

Commit ec03d1a

Browse files
Lint Generator: No longer fix violations after invocation
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`.
1 parent 97f1883 commit ec03d1a

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

lib/generators/suspenders/lint_generator.rb

-7
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,6 @@ def update_package_json
5555
File.write package_json, JSON.pretty_generate(json)
5656
end
5757

58-
# This needs to be the last method definition to ensure everything is
59-
# properly configured
60-
def fix_violations
61-
run "yarn run fix:prettier"
62-
run "bundle exec rake standard:fix_unsafely"
63-
end
64-
6558
private
6659

6760
def package_json

test/generators/suspenders/lint_generator_test.rb

-9
Original file line numberDiff line numberDiff line change
@@ -248,15 +248,6 @@ class LintGeneratorTest < Rails::Generators::TestCase
248248
assert_equal desc, generator_class.desc
249249
end
250250

251-
test "fixes violations" do
252-
capture(:stderr) do
253-
output = run_generator
254-
255-
assert_match(/yarn run fix:prettier/, output)
256-
assert_match(/bundle exec rake standard:fix_unsafely/, output)
257-
end
258-
end
259-
260251
private
261252

262253
def prepare_destination

0 commit comments

Comments
 (0)