Skip to content

Commit 42a9f5f

Browse files
authored
Add missing GHD linter rules to configuration (#56279)
1 parent 23b6ab8 commit 42a9f5f

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

data/reusables/contributing/content-linter-rules.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
| [search-replace](https://github.com/OnkarRuikar/markdownlint-rule-search-replace) | deprecated liquid syntax: octicon-<icon-name> | The octicon liquid syntax used is deprecated. Use this format instead `octicon "<octicon-name>" aria-label="<Octicon aria label>"` | error | |
3232
| [GH001](https://github.com/github/markdownlint-github/blob/main/docs/rules/GH001-no-default-alt-text.md) | no-default-alt-text | Images should have meaningful alternative text (alt text) | error | accessibility, images |
3333
| [GH002](https://github.com/github/markdownlint-github/blob/main/docs/rules/GH002-no-generic-link-text.md) | no-generic-link-text | Avoid using generic link text like `Learn more` or `Click here` | error | accessibility, links |
34+
| GHD030 | code-fence-line-length | Code fence lines should not exceed a maximum length | warning | code, accessibility |
3435
| GHD032 | image-alt-text-end-punctuation | Alternate text for images should end with punctuation | error | accessibility, images |
3536
| GHD004 | image-file-kebab-case | Image file names must use kebab-case | error | images |
3637
| GHD033 | incorrect-alt-text-length | Images alternate text should be between 40-150 characters | warning | accessibility, images |
@@ -65,4 +66,7 @@
6566
| GHD041 | third-party-action-pinning | Code examples that use third-party actions must always pin to a full length commit SHA | error | feature, actions |
6667
| GHD042 | liquid-tag-whitespace | Liquid tags should start and end with one whitespace. Liquid tag arguments should be separated by only one whitespace. | error | liquid, format |
6768
| GHD043 | link-quotation | Internal link titles must not be surrounded by quotations | error | links, url |
68-
| GHD044 | octicon-aria-labels | Octicons should always have an aria-label attribute even if aria-hidden. | warning | accessibility, octicons |
69+
| GHD044 | octicon-aria-labels | Octicons should always have an aria-label attribute even if aria-hidden. | warning | accessibility, octicons |
70+
| GHD048 | british-english-quotes | Periods and commas should be placed inside quotation marks (American English style) | warning | punctuation, quotes, style, consistency |
71+
| GHD050 | multiple-emphasis-patterns | Do not use more than one emphasis/strong, italics, or uppercase for a string | warning | formatting, emphasis, style |
72+
| GHD049 | note-warning-formatting | Note and warning tags should be formatted according to style guide | warning | formatting, callouts, notes, warnings, style |

src/content-linter/style/github-docs.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,12 @@ const githubDocsConfig = {
101101
'partial-markdown-files': true,
102102
'yml-files': true,
103103
},
104+
'code-fence-line-length': {
105+
// GHD030
106+
severity: 'warning',
107+
'partial-markdown-files': true,
108+
'yml-files': true,
109+
},
104110
'image-alt-text-exclude-words': {
105111
// GHD031
106112
severity: 'error',
@@ -174,6 +180,24 @@ const githubDocsConfig = {
174180
'partial-markdown-files': true,
175181
'yml-files': true,
176182
},
183+
'british-english-quotes': {
184+
// GHD048
185+
severity: 'warning',
186+
'partial-markdown-files': true,
187+
'yml-files': true,
188+
},
189+
'note-warning-formatting': {
190+
// GHD049
191+
severity: 'warning',
192+
'partial-markdown-files': true,
193+
'yml-files': true,
194+
},
195+
'multiple-emphasis-patterns': {
196+
// GHD050
197+
severity: 'warning',
198+
'partial-markdown-files': true,
199+
'yml-files': true,
200+
},
177201
}
178202

179203
export const githubDocsFrontmatterConfig = {

0 commit comments

Comments
 (0)