1
0
mirror of synced 2025-12-19 18:10:59 -05:00

refactor markdownlint config code (#42835)

Co-authored-by: Peter Bengtsson <peterbe@github.com>
This commit is contained in:
Rachael Sewell
2023-09-21 11:20:37 -07:00
committed by GitHub
parent 67e52cebbb
commit d060be970e
12 changed files with 175 additions and 116 deletions

View File

@@ -44,43 +44,44 @@ export const githubDocsConfig = {
severity: 'warning',
'partial-markdown-files': true,
},
'no-github-docs-domains': {
// GHD020
severity: 'error',
'partial-markdown-files': true,
},
'early-access-references': {
severity: 'error',
'partial-markdown-files': true,
},
'search-replace': {
severity: 'error',
'severity-local-env': 'warning',
'partial-markdown-files': true,
rules: [
{
name: 'todocs-placeholder',
message: 'Catch occurrences of TODOCS placeholder.',
search: 'TODOCS',
searchScope: 'all',
severity: 'error',
'severity-local': 'warning',
'partial-markdown-files': true,
},
{
name: 'docs-domain',
message: 'Catch occurrences of docs.gitub.com domain.',
search: 'docs.gitub.com',
searchScope: 'all',
severity: 'error',
'partial-markdown-files': true,
},
{
name: 'help-domain',
message: 'Catch occurrences of help.github.com domain.',
search: 'help.github.com',
searchScope: 'all',
severity: 'error',
'partial-markdown-files': true,
},
{
name: 'preview-domain',
message: 'Catch occurrences of preview.ghdocs.com domain.',
search: 'preview.ghdocs.com',
searchScope: 'all',
severity: 'error',
'partial-markdown-files': true,
},
{
name: 'developer-domain',
@@ -91,6 +92,8 @@ export const githubDocsConfig = {
// There are occurences that will likely always remain in the content.
searchPattern: '/developer.github.com(?!/(changes|enterprise/([0-9]|{))).*/g',
searchScope: 'all',
severity: 'error',
'partial-markdown-files': true,
},
],
},