Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint Generator: No longer fix violations after invocation #1174

Merged
merged 1 commit into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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