Skip to content

Commit 4758a2f

Browse files
committed
Style(repo): Fix documentation content according to the textlint rules
1 parent 642006a commit 4758a2f

File tree

13 files changed

+39
-35
lines changed

13 files changed

+39
-35
lines changed

CONTRIBUTING.md

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributing to Spirit Design System
22

3-
First of all, thanks for your contribution to this project! ❤️
3+
Thank you for your contribution to this project! ❤️
44
Here are some tips how to make your contributing efforts efficient and eventually accepted & merged:
55

66
- [General Usage](#general-usage)
@@ -74,7 +74,10 @@ The `<type>` and `<summary>` fields are mandatory, the `(<scope>)` field is opti
7474

7575
MUST be one of the following:
7676

77-
- **Chore**: Changes to our CI configuration files and scripts (examples: CircleCI, SauceLabs) or changes that affect the build system
77+
<!-- @todo https://github.com/lmc-eu/code-quality-tools/issues/192 -->
78+
<!-- textlint-disable @lmc-eu/lmc/terminology -->
79+
80+
- **Chore**: Changes to our CI configuration files and scripts (e.g: CircleCI, Sauce Labs) or changes that affect the build system
7881
- **Deps**: Changes to dependencies
7982
- **Docs**: Documentation only changes
8083
- **Feat**: A new feature
@@ -84,6 +87,7 @@ MUST be one of the following:
8487
- **Revert**: Reverting code changes
8588
- **Test**: Adding missing tests or correcting existing tests
8689
- **Style**: Changes to code style or styling of components and pages
90+
<!-- textlint-enable -->
8791

8892
##### Scope
8993

@@ -110,7 +114,7 @@ The following is the list of supported scopes:
110114
- Repository-wide:
111115
- `ci`: used for changes that affect the Continuous Integration process and builds
112116
- `repo`: used for repository-wide changes
113-
- none/empty string: useful for `Test` and `Refactor` changes that are done across all packages (e.g. `Test: Add missing unit tests`) and for docs changes that are not related to a specific package (e.g. `Docs: Fix typo in the tutorial`).
117+
- none/empty string: useful for `Test` and `Refactor` changes that are done across all packages (for example `Test: Add missing unit tests`) and for docs changes that are not related to a specific package (for example `Docs: Fix typo in the tutorial`).
114118

115119
##### Summary
116120

@@ -125,7 +129,7 @@ Use the summary field to provide a succinct description of the change:
125129
Just as in the summary, use the imperative, present tense: "fix" not "fixed" nor "fixes".
126130

127131
Explain the motivation for the change in the commit message body. This commit message SHOULD explain _why_ you are making the change.
128-
You can include a comparison of the previous behavior with the new behavior in order to illustrate the impact of the change.
132+
You can include a comparison of the previous behavior with the new behavior to illustrate the impact of the change.
129133

130134
#### Commit Message Footer
131135

@@ -150,7 +154,7 @@ If the commit reverts a previous commit, it SHOULD begin with `Revert: `, follow
150154
The content of the commit message body SHOULD contain:
151155

152156
- information about the SHA of the commit being reverted in the following format: `This reverts commit <SHA>`,
153-
- a clear description of the reason for reverting the commit message.
157+
- a clear description of why the commit message is being reverted.
154158

155159
### Before Commit
156160

@@ -162,18 +166,18 @@ This project uses Prettier for code formatting. You can run `make format` to for
162166

163167
## Documenting the Components
164168

165-
1. All components MUST be documented in a `README` file in the root of the component, e.g. `packages/web-react/Accordion/README.md`.
169+
1. All components MUST be documented in a `README` file in the root of the component, for example `packages/web-react/Accordion/README.md`.
166170
2. The documentation MUST be written in Markdown.
167171
3. The documentation MUST contain at least a basic example usage of the component.
168172
4. For complex components or components with subcomponents, the documentation SHOULD contain examples of individual building blocks as well as an example composition.
169173
5. Component and subcomponent props MUST be documented in a table.
170174
1. The table MUST be placed in a section introduced by a headline called `API`.
171175
2. The table MUST contain the following columns:
172-
- `Name` — the name of the prop, e.g. `title`
173-
- `Type` — the type of the prop, e.g. `string`, `number`, `bool`, `[horizontal | vertical]`, an existing [dictionary][dictionary], etc.
174-
- `Default` — the default value of the prop, e.g. `null` or `` (em-dash) if there is no default value
176+
- `Name` — the name of the prop, for example `title`
177+
- `Type` — the type of the prop, for example `string`, `number`, `bool`, `[horizontal | vertical]`, an existing [dictionary][dictionary], etc.
178+
- `Default` — the default value of the prop, for example `null` or `` (em-dash) if there is no default value
175179
- `Required` — if the prop is required `` or not ``
176-
- `Description` — the description of the prop, e.g. `Title of the accordion`
180+
- `Description` — the description of the prop, for example `Title of the accordion`
177181
3. The props MUST be sorted alphabetically by their name.
178182

179183
## Testing
@@ -183,9 +187,9 @@ Using this you can test the entire package and verify that all parts of the pack
183187

184188
The testing script includes:
185189

186-
- linting using [ESlint][eslint]
190+
- linting using [ESLint][eslint]
187191
- checking format using the [Prettier][prettier]
188-
- checking types using the [Typescript][typescript] compiler
192+
- checking types using the [TypeScript][typescript] compiler
189193
- running unit test using the [Jest][jest]
190194

191195
### Unit Testing
@@ -243,16 +247,16 @@ When the tests fail, there will be a comment in the PR with a link to the report
243247
You can also find the report URL in the GitHub Actions run under the `Run actions/upload-artifact` section.
244248
Look for `Artifact download URL: https://github.com/lmc-eu/spirit-design-system/actions/runs/<run-id>/artifacts/<artifact-id>`.
245249

246-
⚠️ Currently we do not deploy the Web Twig package to any environment, so you can only test it locally.
250+
⚠️ We do not deploy the Web Twig package to any environment, so you can only test it locally.
247251

248252
### Developing and Testing GitHub Actions
249253

250254
It can be time-consuming and painful to test GitHub Actions.
251255
First, you have to change the GitHub Actions file locally, push your local code into the GitHub repository, and wait for the result.
252256

253-
To solve this issue, you can use [act][act] CLI tool to test and write the GitHub actions locally.
257+
To solve this issue, you can use [act][act] command-line tool to test and write the GitHub actions locally.
254258

255-
For more, please read the article [How to Run GitHub Actions Locally with the act CLI tool][act-article].
259+
For more, please read the article [How to Run GitHub Actions Locally with the act command-line tool][act-article].
256260

257261
## Publishing
258262

apps/demo/config/vite/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export default defineConfig({
7777
join(pathRelativeToRepositoryRoot, 'node_modules/@lmc-eu/spirit-design-tokens/src/scss'),
7878
],
7979
// Silence deprecation warnings related to mixed declarations.
80-
// Weve disabled these warnings because they are evaluated as false positives in our context.
80+
// We've disabled these warnings because they are evaluated as false positives in our context.
8181
// @see https://sass-lang.com/documentation/breaking-changes/mixed-decls/ for more details.
8282
silenceDeprecations: ['mixed-decls'],
8383
},

configs/typescript-config-spirit/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ It is worth noting that when you extend a `tsconfig.json` file, the properties i
2727
And **when both files define the same property, the child `tsconfig.json` wins**.
2828

2929
However, this is not the case with `include` and `exclude`.
30-
If you define them in the child `tsconfig.json` file, that **exact value will be used; it wont be merged** with the value from the base `tsconfig.json` file.
30+
If you define them in the child `tsconfig.json` file, that **exact value will be used; it won't be merged** with the value from the base `tsconfig.json` file.
3131

3232
### Base Configuration
3333

docs/DICTIONARIES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
This project uses `dictionaries` to unify props between different components.
44

5-
- Every dictionary is always a range. E.g. the dictionary Size content Small, Medium, Large.
6-
- If at least 1 item is used from the dictionary in a component's property, all the others should be used. E.g. if there are button sizes Medium and Large, there should also be the size Small.
5+
- Every dictionary is always a range. For example the dictionary Size content Small, Medium, Large.
6+
- If at least 1 item is used from the dictionary in a component's property, all the others should be used. For example if there are button sizes Medium and Large, there should also be the size Small.
77
- A given property is not a dictionary by itself. The property is contained in the dictionary. That is, the Action Primary Default color is contained in the Action Primary dictionary entry.
88
- Products can extend their dictionaries.
99

docs/contribution/experimental-code.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Some Spirit packages ship with available feature flags. These feature flags
7070
enable new behavior and styling, allowing you to opt-in to new breaking changes
7171
while remaining on the current major version. When a new feature flag is
7272
introduced it is marked `false` or "off" by default to ensure backward
73-
compatibility. A feature flag may be configured in JavaScript, SASS, or both.
73+
compatibility. A feature flag may be configured in JavaScript, Sass, or both.
7474

7575
All the currently available feature flags, as well as how to enable them, is
7676
documented in each package's main README file in the section `Feature Flags`.
@@ -98,7 +98,7 @@ As the usage of an existing flag increases or we determine a feature to be of hi
9898
importance, we'll "commit" it to a future major release and rename it to use the
9999
`enable-v#-*` prefix. At this point, the API or functionality behind this flag is
100100
now fixed and won't change. We intend to ship this flag as "on by default" in
101-
the major version indicated in the name. e.g. `enable-v3-some-feature`
101+
the major version indicated in the name. for example `enable-v3-some-feature`
102102

103103
All breaking changes will be shipped as `enable-v#-*` flags within the current
104104
releases. This enables projects to opt-in to breaking changes earlier
@@ -171,7 +171,7 @@ be met to move a component from experimental to stable:
171171
- [ ] Stories cover at least common component states
172172
- [ ] Stories generate a `Playground` for controls
173173
- [ ] Controls with no meaningful change to the component visuals should
174-
be hidden from the controls panel, eg. `className`
174+
be hidden from the controls panel, for example `className`
175175
- [ ] Props of type `node` with no proper controls available for
176176
configuration should be hidden from the controls panel, eg.
177177
`children`

docs/contribution/feature-flags.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
## Table of Contents
44

55
- [Current feature flags](#current-feature-flags)
6-
- [Turning on feature flags in SASS](#turning-on-feature-flags-in-sass)
6+
- [Turning on feature flags in Sass](#turning-on-feature-flags-in-sass)
77

88
The Spirit Design System codebase ships with a number of feature flags. These feature
99
flags enable new behavior and styling, allowing you to opt-in to new (and
1010
sometimes breaking) changes while using the current version. A feature flag may
11-
be configured in React, SASS, or both.
11+
be configured in React, Sass, or both.
1212

1313
This section documents each feature flag that is available and how to configure it.
1414
Folders and stories within this section in Storybook show components with all feature flags turned on.
@@ -27,12 +27,12 @@ For more details on this approach, see the
2727
[feature flag documentation][feature-flag-documentation]
2828
in the Spirit Design System monorepo.
2929

30-
| Flag | Description | Default | SASS flag |
30+
| Flag | Description | Default | Sass flag |
3131
| ---- | ----------- | ------- | --------- |
3232

33-
## Turning on Feature Flags in SASS
33+
## Turning on Feature Flags in Sass
3434

35-
In SASS, you can enable feature flags in any of your stylesheets. Most often
35+
In Sass, you can enable feature flags in any of your stylesheets. Most often
3636
this is done at the root/entrypoint stylesheet.
3737
You can enable or disable them by loading
3838
the `feature-flags` module with a configuration.
@@ -49,7 +49,7 @@ Example with fictional feature flag to enable fullscreen modal:
4949
```
5050

5151
Every feature flag should also provide a class selector that can be used to enable or disable the feature.
52-
You can use this class if you want to limit the usage of the feature to a specific part of your application.
52+
You can use this class to limit the usage of the feature to a specific part of your application.
5353
Place the class on any parent element of the component you want to enable the feature for.
5454

5555
Example:

docs/decisions/003-typescript-only.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This is increasingly becoming less of an issue with more and more dependencies b
2020

2121
We strongly advise the use of [TypeScript][typescript] even for simple projects and those worked on by single developers.
2222

23-
This project uses and leverages Typescript in every possible way to have the best developer experience.
23+
This project uses and leverages TypeScript in every possible way to have the best developer experience.
2424

2525
## Consequences
2626

docs/migrations/web-react/migration-v1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ The most notable change is that the mobile and desktop navigation are now separa
6767
- `HeaderDialog`
6868

6969
Formerly, the desktop dialog (holding the site navigation) was a responsive CSS modification of a shared HTML code.
70-
With the new `Header` and `HeaderDialog`, each component has its own instance of the navigation, i.e. the navigation code is duplicated.
70+
With the new `Header` and `HeaderDialog`, each component has its own instance of the navigation, that is the navigation code is duplicated.
7171
This is because `HeaderDialog` will become an independent component in the future.
7272

7373
You may need to take additional measures so your SEO is not affected by the duplicate HTML code of the navigation.

docs/migrations/web-react/migration-v2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ The `label` prop is now required by the TextField component.
450450
#### Migration Guide
451451

452452
Please ensure that `label` is added to all instances of the TextField component.
453-
If you need to hide the `label`, you can use the `isLabelHidden` prop.
453+
To hide the `label`, you can use the `isLabelHidden` prop.
454454

455455
### Tooltip: `off` Placement
456456

docs/migrations/web/migration-v1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ The most notable change is that the mobile and desktop navigation are now separa
131131
- `HeaderDialog`
132132

133133
Formerly, the desktop dialog (holding the site navigation) was a responsive CSS modification of a shared HTML code.
134-
With the new `Header` and `HeaderDialog`, each component has its own instance of the navigation, i.e. the navigation code is duplicated.
134+
With the new `Header` and `HeaderDialog`, each component has its own instance of the navigation, that is the navigation code is duplicated.
135135
This is because `HeaderDialog` will become an independent component in the future.
136136

137137
You may need to take additional measures so your SEO is not affected by the duplicate HTML code of the navigation.

0 commit comments

Comments
 (0)