diff --git a/lib/generators/suspenders/lint_generator.rb b/lib/generators/suspenders/lint_generator.rb index bd71a5e3b..af81b5731 100644 --- a/lib/generators/suspenders/lint_generator.rb +++ b/lib/generators/suspenders/lint_generator.rb @@ -30,6 +30,7 @@ def configure_eslint def configure_prettier copy_file "prettierrc", ".prettierrc" + copy_file "prettierignore", ".prettierignore" end def configure_erb_lint diff --git a/lib/generators/templates/lint/prettierignore b/lib/generators/templates/lint/prettierignore new file mode 100644 index 000000000..f2056e58e --- /dev/null +++ b/lib/generators/templates/lint/prettierignore @@ -0,0 +1 @@ +vendor/bundle/** diff --git a/test/generators/suspenders/lint_generator_test.rb b/test/generators/suspenders/lint_generator_test.rb index 2bed402ff..7bc82f6ec 100644 --- a/test/generators/suspenders/lint_generator_test.rb +++ b/test/generators/suspenders/lint_generator_test.rb @@ -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