From 8e7350074ee44b48d30d7392ec81f38eddf23aaf Mon Sep 17 00:00:00 2001 From: Lev Chelyadinov Date: Sun, 9 Jun 2024 19:35:47 +0200 Subject: [PATCH] Fix the formatting of file structures --- .../src/ambiguous-slice-names/README.md | 54 ++++++------- .../src/excessive-slicing/README.md | 80 +++++++++---------- .../src/inconsistent-naming/README.md | 28 +++---- .../src/no-layer-public-api/README.md | 52 ++++++------ .../src/no-reserved-folder-names/README.md | 48 +++++------ .../src/no-segmentless-slices/README.md | 46 +++++------ .../src/public-api/README.md | 46 +++++------ .../src/segments-by-purpose/README.md | 24 +++--- .../src/shared-lib-grouping/README.md | 80 +++++++++---------- 9 files changed, 229 insertions(+), 229 deletions(-) diff --git a/packages/steiger-plugin-fsd/src/ambiguous-slice-names/README.md b/packages/steiger-plugin-fsd/src/ambiguous-slice-names/README.md index 75200fd..e9d767a 100644 --- a/packages/steiger-plugin-fsd/src/ambiguous-slice-names/README.md +++ b/packages/steiger-plugin-fsd/src/ambiguous-slice-names/README.md @@ -4,44 +4,44 @@ Forbid slice names that that match some segment’s name in the Shared layer. Fo Examples of project structures that pass this rule: -```md +``` πŸ“‚ shared -πŸ“‚ ui -πŸ“„ index.ts -πŸ“‚ i18n -πŸ“„ index.ts + πŸ“‚ ui + πŸ“„ index.ts + πŸ“‚ i18n + πŸ“„ index.ts πŸ“‚ entities -πŸ“‚ user -πŸ“‚ ui -πŸ“‚ model -πŸ“„ index.ts + πŸ“‚ user + πŸ“‚ ui + πŸ“‚ model + πŸ“„ index.ts πŸ“‚ pages -πŸ“‚ home -πŸ“‚ ui -πŸ“„ index.ts + πŸ“‚ home + πŸ“‚ ui + πŸ“„ index.ts ``` Examples of project structures that fail this rule: -```md +``` πŸ“‚ shared -πŸ“‚ ui -πŸ“„ index.ts -πŸ“‚ i18n // ❗️ -πŸ“„ index.ts + πŸ“‚ ui + πŸ“„ index.ts + πŸ“‚ i18n // ❗️ + πŸ“„ index.ts πŸ“‚ entities -πŸ“‚ user -πŸ“‚ ui -πŸ“‚ model -πŸ“„ index.ts + πŸ“‚ user + πŸ“‚ ui + πŸ“‚ model + πŸ“„ index.ts πŸ“‚ features -πŸ“‚ i18n // ❌ -πŸ“‚ ui -πŸ“„ index.ts + πŸ“‚ i18n // ❌ + πŸ“‚ ui + πŸ“„ index.ts πŸ“‚ pages -πŸ“‚ home -πŸ“‚ ui -πŸ“„ index.ts + πŸ“‚ home + πŸ“‚ ui + πŸ“„ index.ts ``` ## Rationale diff --git a/packages/steiger-plugin-fsd/src/excessive-slicing/README.md b/packages/steiger-plugin-fsd/src/excessive-slicing/README.md index bd2621c..a2c4fca 100644 --- a/packages/steiger-plugin-fsd/src/excessive-slicing/README.md +++ b/packages/steiger-plugin-fsd/src/excessive-slicing/README.md @@ -7,55 +7,55 @@ This rule forbids having too many ungrouped slices or too many slices in a group Example of a project structure that passes this rule: -```md +``` πŸ“‚ shared -πŸ“‚ ui -πŸ“„ index.ts -πŸ“‚ i18n -πŸ“„ index.ts + πŸ“‚ ui + πŸ“„ index.ts + πŸ“‚ i18n + πŸ“„ index.ts πŸ“‚ entities -πŸ“‚ user -πŸ“‚ ui -πŸ“‚ model -πŸ“„ index.ts + πŸ“‚ user + πŸ“‚ ui + πŸ“‚ model + πŸ“„ index.ts πŸ“‚ pages -πŸ“‚ home -πŸ“‚ ui -πŸ“„ index.ts + πŸ“‚ home + πŸ“‚ ui + πŸ“„ index.ts ``` (Cartoonish) Example of a project structure that fails this rule: -```md +``` πŸ“‚ shared -πŸ“‚ ui -πŸ“„ index.ts -πŸ“‚ i18n -πŸ“„ index.ts + πŸ“‚ ui + πŸ“„ index.ts + πŸ“‚ i18n + πŸ“„ index.ts πŸ“‚ features // ❌ -πŸ“‚ comments -πŸ“‚ posts -πŸ“‚ users -πŸ“‚ cars -πŸ“‚ alligators -πŸ“‚ whales -πŸ“‚ giraffes -πŸ“‚ buses -πŸ“‚ trains -πŸ“‚ planes -πŸ“‚ boats -πŸ“‚ submarines -πŸ“‚ helicopters -πŸ“‚ rockets -πŸ“‚ satellites -πŸ“‚ space-stations -πŸ“‚ planets -πŸ“‚ galaxies -πŸ“‚ universes -πŸ“‚ multiverses -πŸ“‚ metaverses -πŸ“‚ ai -πŸ“‚ bitcoin + πŸ“‚ comments + πŸ“‚ posts + πŸ“‚ users + πŸ“‚ cars + πŸ“‚ alligators + πŸ“‚ whales + πŸ“‚ giraffes + πŸ“‚ buses + πŸ“‚ trains + πŸ“‚ planes + πŸ“‚ boats + πŸ“‚ submarines + πŸ“‚ helicopters + πŸ“‚ rockets + πŸ“‚ satellites + πŸ“‚ space-stations + πŸ“‚ planets + πŸ“‚ galaxies + πŸ“‚ universes + πŸ“‚ multiverses + πŸ“‚ metaverses + πŸ“‚ ai + πŸ“‚ bitcoin ``` ## Rationale diff --git a/packages/steiger-plugin-fsd/src/inconsistent-naming/README.md b/packages/steiger-plugin-fsd/src/inconsistent-naming/README.md index 6f64fcb..07ff735 100644 --- a/packages/steiger-plugin-fsd/src/inconsistent-naming/README.md +++ b/packages/steiger-plugin-fsd/src/inconsistent-naming/README.md @@ -7,26 +7,26 @@ This rule ensures that all entities are named consistently in terms of pluraliza Example of a project structure that passes this rule: -```md +``` πŸ“‚ entities -πŸ“‚ users -πŸ“‚ ui -πŸ“„ index.ts -πŸ“‚ posts -πŸ“‚ ui -πŸ“„ index.ts + πŸ“‚ users + πŸ“‚ ui + πŸ“„ index.ts + πŸ“‚ posts + πŸ“‚ ui + πŸ“„ index.ts ``` Example of a project structure that fails this rule: -```md +``` πŸ“‚ entities -πŸ“‚ users // ❗️ -πŸ“‚ ui -πŸ“„ index.ts -πŸ“‚ post // ❌ -πŸ“‚ ui -πŸ“„ index.ts + πŸ“‚ users // ❗️ + πŸ“‚ ui + πŸ“„ index.ts + πŸ“‚ post // ❌ + πŸ“‚ ui + πŸ“„ index.ts ``` ## Rationale diff --git a/packages/steiger-plugin-fsd/src/no-layer-public-api/README.md b/packages/steiger-plugin-fsd/src/no-layer-public-api/README.md index d0841f1..5873550 100644 --- a/packages/steiger-plugin-fsd/src/no-layer-public-api/README.md +++ b/packages/steiger-plugin-fsd/src/no-layer-public-api/README.md @@ -13,42 +13,42 @@ A corollary to this rule is that the layer itself should not have an index file. Examples of project structures that pass this rule: -```md +``` πŸ“‚ shared -πŸ“‚ ui -πŸ“„ index.ts -πŸ“‚ lib -πŸ“„ index.ts + πŸ“‚ ui + πŸ“„ index.ts + πŸ“‚ lib + πŸ“„ index.ts πŸ“‚ entities -πŸ“‚ user -πŸ“‚ ui -πŸ“‚ model -πŸ“„ index.ts + πŸ“‚ user + πŸ“‚ ui + πŸ“‚ model + πŸ“„ index.ts πŸ“‚ pages -πŸ“‚ home -πŸ“‚ ui -πŸ“„ index.ts + πŸ“‚ home + πŸ“‚ ui + πŸ“„ index.ts ``` Examples of project structures that fail this rule: -```md +``` πŸ“‚ shared -πŸ“‚ ui -πŸ“„ index.ts -πŸ“„ index.ts // ❌ + πŸ“‚ ui + πŸ“„ index.ts + πŸ“„ index.ts // ❌ πŸ“‚ entities -πŸ“‚ user -πŸ“‚ ui -πŸ“„ index.ts + πŸ“‚ user + πŸ“‚ ui + πŸ“„ index.ts πŸ“‚ pages -πŸ“‚ home -πŸ“‚ ui -πŸ“„ index.ts -πŸ“‚ editor -πŸ“‚ ui -πŸ“„ index.ts -πŸ“„ index.ts // ❌ + πŸ“‚ home + πŸ“‚ ui + πŸ“„ index.ts + πŸ“‚ editor + πŸ“‚ ui + πŸ“„ index.ts + πŸ“„ index.ts // ❌ ``` ## Rationale diff --git a/packages/steiger-plugin-fsd/src/no-reserved-folder-names/README.md b/packages/steiger-plugin-fsd/src/no-reserved-folder-names/README.md index 03f3f27..eafc3ac 100644 --- a/packages/steiger-plugin-fsd/src/no-reserved-folder-names/README.md +++ b/packages/steiger-plugin-fsd/src/no-reserved-folder-names/README.md @@ -12,40 +12,40 @@ This rule forbids the following names: Examples of project structures that pass this rule: -```md +``` πŸ“‚ shared -πŸ“‚ ui -πŸ“„ index.ts -πŸ“‚ lib -πŸ“„ index.ts + πŸ“‚ ui + πŸ“„ index.ts + πŸ“‚ lib + πŸ“„ index.ts πŸ“‚ entities -πŸ“‚ user -πŸ“‚ ui -πŸ“‚ model -πŸ“„ index.ts + πŸ“‚ user + πŸ“‚ ui + πŸ“‚ model + πŸ“„ index.ts πŸ“‚ pages -πŸ“‚ home -πŸ“‚ ui -πŸ“„ index.ts + πŸ“‚ home + πŸ“‚ ui + πŸ“„ index.ts ``` Examples of project structures that fail this rule: -```md +``` πŸ“‚ shared -πŸ“‚ ui -πŸ“„ index.ts -πŸ“‚ lib // ❌ -πŸ“„ someUiFunction.ts + πŸ“‚ ui + πŸ“„ index.ts + πŸ“‚ lib // ❌ + πŸ“„ someUiFunction.ts πŸ“‚ entities -πŸ“‚ user -πŸ“‚ ui -πŸ“‚ model -πŸ“„ index.ts + πŸ“‚ user + πŸ“‚ ui + πŸ“‚ model + πŸ“„ index.ts πŸ“‚ pages -πŸ“‚ home -πŸ“‚ ui -πŸ“„ index.ts + πŸ“‚ home + πŸ“‚ ui + πŸ“„ index.ts ``` ## Rationale diff --git a/packages/steiger-plugin-fsd/src/no-segmentless-slices/README.md b/packages/steiger-plugin-fsd/src/no-segmentless-slices/README.md index 7f8cf46..1e02828 100644 --- a/packages/steiger-plugin-fsd/src/no-segmentless-slices/README.md +++ b/packages/steiger-plugin-fsd/src/no-segmentless-slices/README.md @@ -4,39 +4,39 @@ Forbid slices that don't have any segments. Examples of project structures that pass this rule: -```md +``` πŸ“‚ shared -πŸ“‚ ui -πŸ“„ index.ts -πŸ“‚ lib -πŸ“„ index.ts + πŸ“‚ ui + πŸ“„ index.ts + πŸ“‚ lib + πŸ“„ index.ts πŸ“‚ entities -πŸ“‚ user -πŸ“‚ ui -πŸ“‚ model -πŸ“„ index.ts + πŸ“‚ user + πŸ“‚ ui + πŸ“‚ model + πŸ“„ index.ts πŸ“‚ pages -πŸ“‚ home -πŸ“‚ ui -πŸ“„ index.ts + πŸ“‚ home + πŸ“‚ ui + πŸ“„ index.ts ``` Examples of project structures that fail this rule: -```md +``` πŸ“‚ shared -πŸ“‚ ui -πŸ“„ index.ts -πŸ“‚ lib -πŸ“„ index.ts + πŸ“‚ ui + πŸ“„ index.ts + πŸ“‚ lib + πŸ“„ index.ts πŸ“‚ entities -πŸ“‚ user -πŸ“‚ ui -πŸ“‚ model -πŸ“„ index.ts + πŸ“‚ user + πŸ“‚ ui + πŸ“‚ model + πŸ“„ index.ts πŸ“‚ pages -πŸ“‚ home // ❌ -πŸ“„ HomePage.tsx + πŸ“‚ home // ❌ + πŸ“„ HomePage.tsx ``` ## Rationale diff --git a/packages/steiger-plugin-fsd/src/public-api/README.md b/packages/steiger-plugin-fsd/src/public-api/README.md index 89a6c9d..fa0659b 100644 --- a/packages/steiger-plugin-fsd/src/public-api/README.md +++ b/packages/steiger-plugin-fsd/src/public-api/README.md @@ -11,39 +11,39 @@ According to the _public API rule on slices_: Examples of project structures that pass this rule: -```md +``` πŸ“‚ shared -πŸ“‚ ui -πŸ“„ index.ts -πŸ“‚ lib -πŸ“„ index.ts + πŸ“‚ ui + πŸ“„ index.ts + πŸ“‚ lib + πŸ“„ index.ts πŸ“‚ entities -πŸ“‚ user -πŸ“‚ ui -πŸ“‚ model -πŸ“„ index.ts + πŸ“‚ user + πŸ“‚ ui + πŸ“‚ model + πŸ“„ index.ts πŸ“‚ pages -πŸ“‚ home -πŸ“‚ ui -πŸ“„ index.ts + πŸ“‚ home + πŸ“‚ ui + πŸ“„ index.ts ``` Examples of project structures that fail this rule: -```md +``` πŸ“‚ shared -πŸ“‚ ui // ❌ -πŸ“„ Button.tsx -πŸ“‚ lib -πŸ“„ index.ts + πŸ“‚ ui // ❌ + πŸ“„ Button.tsx + πŸ“‚ lib + πŸ“„ index.ts πŸ“‚ entities -πŸ“‚ user // ❌ -πŸ“‚ ui -πŸ“‚ model + πŸ“‚ user // ❌ + πŸ“‚ ui + πŸ“‚ model πŸ“‚ pages -πŸ“‚ home -πŸ“‚ ui -πŸ“„ index.ts + πŸ“‚ home + πŸ“‚ ui + πŸ“„ index.ts ``` ## Rationale diff --git a/packages/steiger-plugin-fsd/src/segments-by-purpose/README.md b/packages/steiger-plugin-fsd/src/segments-by-purpose/README.md index 1adc103..14f9786 100644 --- a/packages/steiger-plugin-fsd/src/segments-by-purpose/README.md +++ b/packages/steiger-plugin-fsd/src/segments-by-purpose/README.md @@ -12,21 +12,21 @@ To pass this rule, avoid using the following segment names: Examples of project structures that pass this rule: -```md +``` πŸ“‚ shared -πŸ“‚ ui -πŸ“„ index.ts -πŸ“‚ lib -πŸ“„ index.ts + πŸ“‚ ui + πŸ“„ index.ts + πŸ“‚ lib + πŸ“„ index.ts πŸ“‚ entities -πŸ“‚ user -πŸ“‚ ui -πŸ“‚ model -πŸ“„ index.ts + πŸ“‚ user + πŸ“‚ ui + πŸ“‚ model + πŸ“„ index.ts πŸ“‚ pages -πŸ“‚ home -πŸ“‚ ui -πŸ“„ index.ts + πŸ“‚ home + πŸ“‚ ui + πŸ“„ index.ts ``` Examples of project structures that fail this rule: diff --git a/packages/steiger-plugin-fsd/src/shared-lib-grouping/README.md b/packages/steiger-plugin-fsd/src/shared-lib-grouping/README.md index bfac951..9f747a0 100644 --- a/packages/steiger-plugin-fsd/src/shared-lib-grouping/README.md +++ b/packages/steiger-plugin-fsd/src/shared-lib-grouping/README.md @@ -7,18 +7,18 @@ This rule forbids having too many ungrouped modules in `shared/lib`. Examples of project structures that pass this rule: -```md +``` πŸ“‚ entities -πŸ“‚ users -πŸ“‚ ui -πŸ“„ index.ts -πŸ“‚ posts -πŸ“‚ ui -πŸ“„ index.ts + πŸ“‚ users + πŸ“‚ ui + πŸ“„ index.ts + πŸ“‚ posts + πŸ“‚ ui + πŸ“„ index.ts πŸ“‚ shared -πŸ“‚ ui -πŸ“„ index.ts -πŸ“„ Button.tsx + πŸ“‚ ui + πŸ“„ index.ts + πŸ“„ Button.tsx ``` ``` @@ -41,38 +41,38 @@ Examples of project structures that pass this rule: (Cartoonish) Example of a project structure that fails this rule: -```md +``` πŸ“‚ entities -πŸ“‚ users -πŸ“‚ ui -πŸ“„ index.ts -πŸ“‚ posts -πŸ“‚ ui -πŸ“„ index.ts + πŸ“‚ users + πŸ“‚ ui + πŸ“„ index.ts + πŸ“‚ posts + πŸ“‚ ui + πŸ“„ index.ts πŸ“‚ shared -πŸ“‚ ui -πŸ“„ index.ts -πŸ“„ Button.tsx -πŸ“‚ lib // ❌ -πŸ“„ index.ts -πŸ“„ dates.ts -πŸ“„ collections.ts -πŸ“„ utils.ts -πŸ“„ helpers.ts -πŸ“„ constants.ts -πŸ“„ types.ts -πŸ“„ api.ts -πŸ“„ hooks.ts -πŸ“„ selectors.ts -πŸ“„ actions.ts -πŸ“„ reducers.ts -πŸ“„ sagas.ts -πŸ“„ middleware.ts -πŸ“„ components.ts -πŸ“„ hell.ts -πŸ“„ is.ts -πŸ“„ other.ts -πŸ“„ people.ts + πŸ“‚ ui + πŸ“„ index.ts + πŸ“„ Button.tsx + πŸ“‚ lib // ❌ + πŸ“„ index.ts + πŸ“„ dates.ts + πŸ“„ collections.ts + πŸ“„ utils.ts + πŸ“„ helpers.ts + πŸ“„ constants.ts + πŸ“„ types.ts + πŸ“„ api.ts + πŸ“„ hooks.ts + πŸ“„ selectors.ts + πŸ“„ actions.ts + πŸ“„ reducers.ts + πŸ“„ sagas.ts + πŸ“„ middleware.ts + πŸ“„ components.ts + πŸ“„ hell.ts + πŸ“„ is.ts + πŸ“„ other.ts + πŸ“„ people.ts ``` ## Rationale