Skip to content

Commit

Permalink
Lint Generator: Introduce .prettierignore (#1170)
Browse files Browse the repository at this point in the history
The upcoming `suspenders:ci` generator caches Ruby dependencies in
`vendor/bundle`.

This commit ensures we ignore that path.
  • Loading branch information
stevepolitodesign authored Mar 22, 2024
1 parent 7866a7b commit 87d1f5a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/generators/suspenders/lint_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def configure_eslint

def configure_prettier
copy_file "prettierrc", ".prettierrc"
copy_file "prettierignore", ".prettierignore"
end

def configure_erb_lint
Expand Down
1 change: 1 addition & 0 deletions lib/generators/templates/lint/prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vendor/bundle/**
8 changes: 8 additions & 0 deletions test/generators/suspenders/lint_generator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ class LintGeneratorTest < Rails::Generators::TestCase
assert_file app_root(".prettierrc") do |file|
assert_equal expected_content, file
end

assert_file app_root(".prettierignore") do |file|
expected = <<~TEXT
vendor/bundle/**
TEXT

assert_equal expected, file
end
end

test "configures erb-lint" do
Expand Down

0 comments on commit 87d1f5a

Please sign in to comment.