From 9a2ef7471b4802f13fca8b62f3b628af68c25409 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Connor=20B=C3=A4r?= Date: Thu, 22 Feb 2024 11:44:17 +0100 Subject: [PATCH 1/2] Fix Stylelint initialization (#941) --- .changeset/red-chefs-vanish.md | 5 +++++ src/cli/init.ts | 2 +- src/configs/index.ts | 4 +++- src/presets/index.ts | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 .changeset/red-chefs-vanish.md diff --git a/.changeset/red-chefs-vanish.md b/.changeset/red-chefs-vanish.md new file mode 100644 index 00000000..3797365c --- /dev/null +++ b/.changeset/red-chefs-vanish.md @@ -0,0 +1,5 @@ +--- +"@sumup/foundry": patch +--- + +Fixed initializing the Stylelint config files. diff --git a/src/cli/init.ts b/src/cli/init.ts index 0d35a5d7..09380744 100644 --- a/src/cli/init.ts +++ b/src/cli/init.ts @@ -251,7 +251,7 @@ function getToolsForPresets(selectedPresets: Preset[]): ToolOptions[] { flatten, uniq, map((tool: Tool) => tools[tool]), - )(selectedPresets) as ToolOptions[]; + )(selectedPresets); } function getFilesForTools( diff --git a/src/configs/index.ts b/src/configs/index.ts index 48195aa2..5c27e02d 100644 --- a/src/configs/index.ts +++ b/src/configs/index.ts @@ -19,10 +19,12 @@ import * as eslint from './eslint'; import * as husky from './husky'; import * as lintStaged from './lint-staged'; import * as prettier from './prettier'; +import * as stylelint from './stylelint'; -export const tools: { [key in Tool]?: ToolOptions } = { +export const tools: Record = { [Tool.ESLINT]: eslint, [Tool.HUSKY]: husky, [Tool.LINT_STAGED]: lintStaged, [Tool.PRETTIER]: prettier, + [Tool.STYLELINT]: stylelint, }; diff --git a/src/presets/index.ts b/src/presets/index.ts index 2505b3c3..def977df 100644 --- a/src/presets/index.ts +++ b/src/presets/index.ts @@ -46,4 +46,4 @@ function formatName(name: string, description: string): string { return [`${chalk.bold(name)}:`, description].join(' '); } -export const presets = { lint }; +export const presets: Record = { lint }; From 705ada1f68656ba25afe6fbc5987c0e762849f19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Connor=20B=C3=A4r?= Date: Thu, 22 Feb 2024 12:00:18 +0100 Subject: [PATCH 2/2] Version Packages (#942) Co-authored-by: github-actions[bot] --- .changeset/red-chefs-vanish.md | 5 ----- CHANGELOG.md | 6 ++++++ package.json | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) delete mode 100644 .changeset/red-chefs-vanish.md diff --git a/.changeset/red-chefs-vanish.md b/.changeset/red-chefs-vanish.md deleted file mode 100644 index 3797365c..00000000 --- a/.changeset/red-chefs-vanish.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@sumup/foundry": patch ---- - -Fixed initializing the Stylelint config files. diff --git a/CHANGELOG.md b/CHANGELOG.md index 0aa9e649..664d69f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # @sumup/foundry +## 6.2.1 + +### Patch Changes + +- [#941](https://github.com/sumup-oss/foundry/pull/941) [`9a2ef74`](https://github.com/sumup-oss/foundry/commit/9a2ef7471b4802f13fca8b62f3b628af68c25409) Thanks [@connor-baer](https://github.com/connor-baer)! - Fixed initializing the Stylelint config files. + ## 6.2.0 ### Minor Changes diff --git a/package.json b/package.json index 1e02b4ca..c4c00dc5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@sumup/foundry", - "version": "6.2.0", + "version": "6.2.1", "description": "A toolkit for JavaScript + TypeScript applications by SumUp.", "repository": "https://github.com/sumup-oss/foundry", "author": "Felix Jung , Connor Bär ",