Skip to content

Commit 6225724

Browse files
committed
test: add lint rule for trailing punctuation in headings
Signed-off-by: David Karlsson <[email protected]>
1 parent b20c46a commit 6225724

File tree

12 files changed

+33
-28
lines changed

12 files changed

+33
-28
lines changed

.markdownlint.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"hr-style": true,
44
"heading-start-left": true,
55
"single-h1": true,
6+
"no-trailing-punctuation": true,
67
"no-missing-space-atx": true,
78
"no-multiple-space-atx": true,
89
"no-missing-space-closed-atx": true,

content/build/cache/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ stages in parallel. Only the instructions in the `site` stage will end up as
243243
layers in the final image. The entire `git` history doesn't get embedded into
244244
the final result, which helps keep the image small and secure.
245245

246-
#### Combine commands together wherever possible.
246+
#### Combine commands together wherever possible
247247

248248
Most Dockerfile commands, and `RUN` commands in particular, can often be joined
249249
together. For example, instead of using `RUN` like this:

content/compose/gpu-support.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ This provides more granular control over a GPU reservation as custom values can
3131

3232
For more information on these properties, see the [Compose Deploy Specification](compose-file/deploy.md#devices).
3333

34-
### Example of a Compose file for running a service with access to 1 GPU device:
34+
### Example of a Compose file for running a service with access to 1 GPU device
3535

3636
```yaml
3737
services:

content/compose/release-notes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2865,7 +2865,7 @@ naming scheme accordingly before upgrading.
28652865
## 1.6.0
28662866
(2016-01-15)
28672867

2868-
### Major Features:
2868+
### Major Features
28692869

28702870
- Compose 1.6 introduces a new format for `docker-compose.yml` which lets
28712871
you define networks and volumes in the Compose file as well as services. It
@@ -2913,7 +2913,7 @@ naming scheme accordingly before upgrading.
29132913
`docker-compose up SERVICE` on a service with dependencies, those are started
29142914
as well.
29152915

2916-
### New Features:
2916+
### New Features
29172917

29182918
- Added a new command `config` which validates and prints the Compose
29192919
configuration after interpolating variables, resolving relative paths, and

content/compose/use-secrets.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ In the advanced example above:
8181
>
8282
> The `_FILE` environment variables demonstrated here are a convention used by some images, including Docker Official Images like [mysql](https://hub.docker.com/_/mysql) and [postgres](https://hub.docker.com/_/postgres).
8383

84-
## Resources:
84+
## Resources
8585

8686
- [Secrets top-level element](compose-file/09-secrets.md)
87-
- [Secrets attribute for services top-level element](compose-file/05-services.md#secrets)
87+
- [Secrets attribute for services top-level element](compose-file/05-services.md#secrets)

content/contribute/style/formatting.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ toc_max: 2
99

1010
Readers pay fractionally more attention to headings, bulleted lists, and links, so it's important to ensure the first two to three words in those items "front load" information as much as possible.
1111

12-
### Best practice:
12+
### Best practice
1313

1414
- Headings and subheadings should let the reader know what they will find on the page.
1515
- They should describe succinctly and accurately what the content is about.
@@ -21,7 +21,7 @@ Readers pay fractionally more attention to headings, bulleted lists, and links,
2121

2222
Page titles should be action orientated. For example: - _Enable SCIM_ - _Install Docker Desktop_
2323

24-
### Best practice:
24+
### Best practice
2525

2626
- Make sure the title of your page and the table of contents (TOC) entry matches.
2727
- If you want to use a ‘:’ in a page title in the table of contents (\_toc.yaml), you must wrap the entire title in “” to avoid breaking the build.
@@ -31,7 +31,7 @@ Page titles should be action orientated. For example: - _Enable SCIM_ - _Install
3131

3232
Images, including screenshots, can help a reader better understand a concept. However, you should use them sparingly as they tend to go out-of-date.
3333

34-
### Best practice:
34+
### Best practice
3535

3636
- When you take screenshots:
3737
- Don’t use lorem ipsum text. Try to replicate how someone would use the feature in a real-world scenario, and use realistic text.
@@ -52,7 +52,7 @@ When people follow links, they can often lose their train of thought and fail to
5252

5353
The best links offer readers another way to scan information.
5454

55-
### Best practice:
55+
### Best practice
5656

5757
- Use plain language that doesn't mislead or promise too much.
5858
- Be short and descriptive (around five words is best).
@@ -72,7 +72,7 @@ To apply inline code style, wrap the text in a single backtick (`).
7272

7373
For information on how to add code blocks to your content, see [Useful component and formatting examples](../components/code-blocks.md).
7474

75-
### Best practice for commands:
75+
### Best practice for commands
7676

7777
- Command prompt and shell:
7878
- For a non-privileged shell, prefix commands in code blocks with the $ prompt symbol.
@@ -89,7 +89,7 @@ For information on how to add code blocks to your content, see [Useful component
8989
- Use pipes ( \| ) between mutually exclusive arguments.
9090
- Use three dots ( ... ) after repeated arguments.
9191

92-
### Best practice for code:
92+
### Best practice for code
9393

9494
- Indent code blocks by 3 spaces when you nest a code block under a list item.
9595
- Use three dots ( ... ) when you omit code.
@@ -98,7 +98,7 @@ For information on how to add code blocks to your content, see [Useful component
9898

9999
Use callouts to emphasize selected information on a page.
100100

101-
### Best practice:
101+
### Best practice
102102

103103
- Format the word Warning, Important, or Note in bold. Don't bold the content within the callout.
104104
- It's good practice to avoid placing a lot of text callouts on one page. They can create a cluttered appearance if used to excess, and you'll diminish their impact.
@@ -149,7 +149,7 @@ Use tables to describe complex information in a straightforward manner.
149149

150150
Note that in many cases, an unordered list is enough to describe a list of items with a single, simple description per item. But, if you have data that’s best described by a matrix, tables are the best choice.
151151

152-
### Best practice:
152+
### Best practice
153153

154154
- Use sentence case for table headings.
155155
- To keep tables accessible and scannable, tables shouldn't have any empty cells. If there is no otherwise meaningful value for a cell, consider entering N/A for ‘not applicable’ or None.

content/contribute/style/grammar.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ An acronym is an abbreviation you would speak as a word, for example, ROM (for r
1313

1414
An initialism is a type of acronym that comprises a group of initial letters used as an abbreviation for a name or expression. If you were using the acronym in a spoken conversation, you would enunciate each letter: H-T-M-L for Hypertext Markup Language.
1515

16-
### Best practice:
16+
### Best practice
1717

1818
- Spell out lesser-known acronyms or initialisms on first use, then follow with the acronym or initialism in parentheses. After this, throughout the rest of your page or document, use the acronym or initialism alone.
1919
> ‘You can use single sign-on (SSO) to sign in to Notion. You may need to ask your administrator to enable SSO.’
@@ -26,7 +26,7 @@ An initialism is a type of acronym that comprises a group of initial letters use
2626

2727
Unless you're referring to UI text or user-defined text, you shouldn't add emphasis to text. Clear, front-loaded wording makes the subject of a sentence clear.
2828

29-
### Best practice:
29+
### Best practice
3030

3131
- Don't use bold to refer to a feature name.
3232
- Use italics sparingly, as this type of formatting can be difficult to read in digital experiences.
@@ -63,7 +63,7 @@ A contraction results from letters being left out from the original word or phra
6363

6464
Following our conversational approach, it's acceptable to use contractions in almost all content types. Just don't get carried away. Too many contractions in a sentence can make it difficult to read.
6565

66-
### Best practice:
66+
### Best practice
6767

6868
- Stay consistent - don't switch between contractions and their spelled-out equivalents in body copy or UI text.
6969
- Avoid negative contractions (can't, don't, wouldn't, and shouldn't) whenever possible. Try to rewrite your sentence to align with our helpful approach that puts the focus on solutions, not problems.
@@ -79,7 +79,7 @@ When possible, use the month's full name (October 1, 2022). If there are space c
7979

8080
In all UI content and technical documentation, use decimals instead of fractions.
8181

82-
### Best practice:
82+
### Best practice
8383

8484
- Always carry decimals to at least the hundredth place (33.76).
8585
- In tables, align decimals on the decimal point.
@@ -89,7 +89,7 @@ In all UI content and technical documentation, use decimals instead of fractions
8989

9090
Lists are a great way to break down complex ideas and make them easier to read and scan.
9191

92-
### Best practice:
92+
### Best practice
9393

9494
- Bulleted lists should contain relatively few words or short phrases. For most content types, limit the number of items in a list to five.
9595
- Don’t add commas (,) or semicolons (;) to the ends of list items.
@@ -168,4 +168,4 @@ Don't use parentheses in technical documentation. They can reduce the readabilit
168168

169169
## Third party documentation
170170

171-
If you are documenting a task that requires the use of a third-party product, link out to the third-party's documentation. Don't copy the content because it might violate copyright. It can also result in an unnecessary maintenance burden of having to keep the docs up-to-date when the third-party changes or updates their product. It is best practice to link to the single source of truth.
171+
If you are documenting a task that requires the use of a third-party product, link out to the third-party's documentation. Don't copy the content because it might violate copyright. It can also result in an unnecessary maintenance burden of having to keep the docs up-to-date when the third-party changes or updates their product. It is best practice to link to the single source of truth.

content/contribute/style/recommended-words.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,12 @@ _In Docker Desktop 4.1 and lower._
8686

8787
What might be easy for you might not be easy for others. Try eliminating this word from the sentence because usually the same meaning can be conveyed without it.
8888

89+
<!-- markdownlint-disable no-trailing-punctuation -->
90+
8991
#### e.g.
9092

93+
<!-- markdownlint-enable no-trailing-punctuation -->
94+
9195
Don't use. Instead, use phrases like `for example` or `such as`.
9296

9397
#### enable
@@ -160,9 +164,9 @@ _Turn on the dark mode toggle._
160164

161165
Use `upgrade` when describing a higher subscription tier
162166

163-
#### vs.
167+
#### vs
164168

165-
Don't use `vs.` as an abbreviation for versus; instead, use the unabbreviated `versus`.
169+
Don't use `vs` or `vs.` as an abbreviation for versus; instead, use the unabbreviated `versus`.
166170

167171
#### we
168172

@@ -178,4 +182,4 @@ _We created a feature for you to add widgets._
178182

179183
#### wish
180184

181-
Don't use. Use `want` instead.
185+
Don't use. Use `want` instead.

content/desktop/extensions-sdk/design/design-guidelines.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Here is a simple checklist to go through when creating your extension:
1212
- Is it easy to get help when needed?
1313

1414

15-
## Create a consistent experience with Docker Desktop.
15+
## Create a consistent experience with Docker Desktop
1616

1717
Use the [Docker Material UI Theme](https://www.npmjs.com/package/@docker/docker-mui-theme) and the [Docker Extensions Styleguide](https://www.figma.com/file/U7pLWfEf6IQKUHLhdateBI/Docker-Design-Guidelines?node-id=1%3A28771) to ensure that your extension feels like it is part of Docker Desktop to create a seamless experience for users.
1818

@@ -68,4 +68,4 @@ When creating your extension, ensure that first time users of the extension and
6868

6969
- Explore our [design principles](design-principles.md).
7070
- Take a look at our [UI styling guidelines](index.md).
71-
- Learn how to [publish your extension](../extensions/index.md).
71+
- Learn how to [publish your extension](../extensions/index.md).

content/desktop/faqs/releases.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ New releases are available roughly every month, unless there are critical fixes
1212

1313
Previously you had to manage this yourself. Now, it happens automatically as a side effect of all users being on the latest version.
1414

15-
### My colleague has got a new version but I haven’t got it yet.
15+
### My colleague has got a new version but I haven’t got it yet
1616

1717
Sometimes we may roll out a new version gradually over a few days. Therefore, if you wait, it will turn up soon. Alternatively, you can select **Check for Updates** from the Docker menu to jump the queue and get the latest version immediately.

0 commit comments

Comments
 (0)