From 5fe8cc4c7d2915b52c3cd4043a881163c81b8127 Mon Sep 17 00:00:00 2001 From: Steve Polito Date: Mon, 11 Dec 2023 12:59:59 -0500 Subject: [PATCH] Pin specific NPM versions In an effort to account for this [issue][], we pin `stylelint` and `@thoughtbot/stylelint-config` to specific versions. Unfortunately, we still see deprecation warnings. [issue]: https://github.com/thoughtbot/stylelint-config/issues/46 --- lib/generators/suspenders/lint_generator.rb | 2 +- test/generators/suspenders/lint_generator_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/generators/suspenders/lint_generator.rb b/lib/generators/suspenders/lint_generator.rb index 0d9f02603..2abc5cd88 100644 --- a/lib/generators/suspenders/lint_generator.rb +++ b/lib/generators/suspenders/lint_generator.rb @@ -7,7 +7,7 @@ class LintGenerator < Rails::Generators::Base desc "Creates a holistic linting solution that covers JavaScript, CSS, Ruby and ERB." def install_dependencies - run "yarn add stylelint eslint @thoughtbot/stylelint-config @thoughtbot/eslint-config npm-run-all prettier --dev" + run "yarn add stylelint@^15.10.1 eslint @thoughtbot/stylelint-config@3.0.0 @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 ca59dc9e4..bcad33afe 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@\^15\.10\.1 eslint @thoughtbot\/stylelint-config@3\.0\.0 @thoughtbot\/eslint-config npm-run-all prettier --dev/, output) end end