diff --git a/lib/generators/suspenders/lint_generator.rb b/lib/generators/suspenders/lint_generator.rb index abd00e0c6..20d2f791f 100644 --- a/lib/generators/suspenders/lint_generator.rb +++ b/lib/generators/suspenders/lint_generator.rb @@ -14,8 +14,10 @@ def check_package_json end end + # TODO: Remove eslint version pin once the follownig is solved + # https://github.com/thoughtbot/eslint-config/issues/10 def install_dependencies - run "yarn add stylelint eslint @thoughtbot/stylelint-config @thoughtbot/eslint-config npm-run-all prettier --dev" + run "yarn add stylelint eslint@^8.9.0 @thoughtbot/stylelint-config @thoughtbot/eslint-config npm-run-all prettier --dev" end def install_gems diff --git a/test/generators/suspenders/lint_generator_test.rb b/test/generators/suspenders/lint_generator_test.rb index de21ef204..e6364e84e 100644 --- a/test/generators/suspenders/lint_generator_test.rb +++ b/test/generators/suspenders/lint_generator_test.rb @@ -15,7 +15,7 @@ class LintGeneratorTest < Rails::Generators::TestCase capture(:stderr) do output = run_generator - assert_match(/yarn add stylelint eslint @thoughtbot\/stylelint-config @thoughtbot\/eslint-config npm-run-all prettier --dev/, output) + assert_match(/yarn add stylelint eslint@\^8\.9\.0 @thoughtbot\/stylelint-config @thoughtbot\/eslint-config npm-run-all prettier --dev/, output) end end