From e93eb165d7ee0b373e0e6967572afdf10b93077d Mon Sep 17 00:00:00 2001 From: Gareth Jones Date: Wed, 12 Jul 2023 11:42:56 +1200 Subject: [PATCH] fix: use latest `prettier` but lock `@typescipt-eslint` to v5 for now (#443) * fix: use latest `prettier` as its required by `eslint-plugin-prettier` * fix: use `@typescript-eslint` v5 for now --- variants/frontend-base-typescript/template.rb | 5 ++++- variants/frontend-base/js-lint/template.rb | 2 +- variants/frontend-bootstrap-typescript/template.rb | 5 ++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/variants/frontend-base-typescript/template.rb b/variants/frontend-base-typescript/template.rb index 5a6100c3..a9f886a5 100644 --- a/variants/frontend-base-typescript/template.rb +++ b/variants/frontend-base-typescript/template.rb @@ -22,7 +22,10 @@ def rename_js_file_to_ts(file) ].map { |name| "@types/#{name}" } yarn_add_dependencies types_packages + %w[@babel/preset-typescript typescript] -yarn_add_dev_dependencies %w[@typescript-eslint/parser @typescript-eslint/eslint-plugin] +yarn_add_dev_dependencies %w[ + @typescript-eslint/parser@5 + @typescript-eslint/eslint-plugin@5 +] run "yarn install" diff --git a/variants/frontend-base/js-lint/template.rb b/variants/frontend-base/js-lint/template.rb index 187af4f8..d976d0ed 100644 --- a/variants/frontend-base/js-lint/template.rb +++ b/variants/frontend-base/js-lint/template.rb @@ -8,7 +8,7 @@ eslint-plugin-import eslint-plugin-prettier eslint-plugin-eslint-comments - prettier@^2.7.0 + prettier prettier-config-ackama prettier-plugin-packagejson ] diff --git a/variants/frontend-bootstrap-typescript/template.rb b/variants/frontend-bootstrap-typescript/template.rb index 58c2cecb..232ab93c 100644 --- a/variants/frontend-bootstrap-typescript/template.rb +++ b/variants/frontend-bootstrap-typescript/template.rb @@ -1,7 +1,10 @@ source_paths.unshift(File.dirname(__FILE__)) yarn_add_dependencies %w[@types/bootstrap] -yarn_add_dev_dependencies %w[@typescript-eslint/parser @typescript-eslint/eslint-plugin] +yarn_add_dev_dependencies %w[ + @typescript-eslint/parser@5 + @typescript-eslint/eslint-plugin@5 +] run "yarn install"