lint yaml content (#47847)
Co-authored-by: Peter Bengtsson <peterbe@github.com> Co-authored-by: Evan Bonsignori <ebonsignori@github.com>
This commit is contained in:
@@ -3,106 +3,127 @@ const githubDocsConfig = {
|
||||
// GHD001
|
||||
severity: 'error',
|
||||
'partial-markdown-files': true,
|
||||
'yml-files': true,
|
||||
},
|
||||
'internal-links-no-lang': {
|
||||
// GHD002
|
||||
severity: 'error',
|
||||
'partial-markdown-files': true,
|
||||
'yml-files': true,
|
||||
},
|
||||
'internal-links-slash': {
|
||||
// GHD003
|
||||
severity: 'error',
|
||||
'partial-markdown-files': true,
|
||||
'yml-files': true,
|
||||
},
|
||||
'image-file-kebab-case': {
|
||||
// GHD004
|
||||
severity: 'error',
|
||||
'partial-markdown-files': true,
|
||||
'yml-files': true,
|
||||
},
|
||||
'hardcoded-data-variable': {
|
||||
// GHD005
|
||||
severity: 'error',
|
||||
'partial-markdown-files': true,
|
||||
'yml-files': true,
|
||||
},
|
||||
'internal-links-old-version': {
|
||||
// GHD006
|
||||
severity: 'error',
|
||||
'partial-markdown-files': true,
|
||||
'yml-files': true,
|
||||
},
|
||||
'code-annotations': {
|
||||
// GHD007
|
||||
severity: 'error',
|
||||
'partial-markdown-files': false,
|
||||
'yml-files': false,
|
||||
},
|
||||
'early-access-references': {
|
||||
// GHD008
|
||||
severity: 'error',
|
||||
'partial-markdown-files': true,
|
||||
'yml-files': true,
|
||||
},
|
||||
'github-owned-action-references': {
|
||||
// GHD013
|
||||
severity: 'error',
|
||||
'partial-markdown-files': true,
|
||||
'yml-files': true,
|
||||
},
|
||||
'liquid-data-references-defined': {
|
||||
// GHD014
|
||||
severity: 'error',
|
||||
'partial-markdown-files': true,
|
||||
'yml-files': true,
|
||||
},
|
||||
'liquid-data-tag-format': {
|
||||
// GHD015
|
||||
severity: 'error',
|
||||
'partial-markdown-files': true,
|
||||
'yml-files': true,
|
||||
},
|
||||
'liquid-quoted-conditional-arg': {
|
||||
// GHD016
|
||||
severity: 'error',
|
||||
'partial-markdown-files': true,
|
||||
'yml-files': true,
|
||||
},
|
||||
'liquid-syntax': {
|
||||
// GHD018
|
||||
severity: 'error',
|
||||
'partial-markdown-files': true,
|
||||
'yml-files': true,
|
||||
},
|
||||
'liquid-if-tags': {
|
||||
// GHD019
|
||||
severity: 'error',
|
||||
'partial-markdown-files': true,
|
||||
'yml-files': true,
|
||||
},
|
||||
'liquid-ifversion-tags': {
|
||||
// GHD020
|
||||
severity: 'error',
|
||||
'partial-markdown-files': true,
|
||||
'yml-files': true,
|
||||
},
|
||||
'yaml-scheduled-jobs': {
|
||||
// GHD021
|
||||
severity: 'error',
|
||||
'partial-markdown-files': true,
|
||||
'yml-files': true,
|
||||
},
|
||||
'code-fence-line-length': {
|
||||
// GHD030
|
||||
severity: 'warning',
|
||||
'partial-markdown-files': true,
|
||||
'yml-files': true,
|
||||
},
|
||||
'image-alt-text-exclude-words': {
|
||||
// GHD031
|
||||
severity: 'error',
|
||||
'partial-markdown-files': true,
|
||||
'yml-files': true,
|
||||
},
|
||||
'image-alt-text-end-punctuation': {
|
||||
// GHD032
|
||||
severity: 'error',
|
||||
'partial-markdown-files': true,
|
||||
'yml-files': true,
|
||||
},
|
||||
'incorrect-alt-text-length': {
|
||||
// GHD033
|
||||
severity: 'warning',
|
||||
'partial-markdown-files': true,
|
||||
'yml-files': true,
|
||||
},
|
||||
'list-first-word-capitalization': {
|
||||
// GHD034
|
||||
severity: 'warning',
|
||||
'partial-markdown-files': true,
|
||||
'yml-files': true,
|
||||
},
|
||||
'rai-reusable-usage': {
|
||||
// GHD035
|
||||
@@ -121,26 +142,31 @@ export const githubDocsFrontmatterConfig = {
|
||||
// GHD009
|
||||
severity: 'error',
|
||||
'partial-markdown-files': false,
|
||||
'yml-files': false,
|
||||
},
|
||||
'frontmatter-hidden-docs': {
|
||||
// GHD010
|
||||
severity: 'error',
|
||||
'partial-markdown-files': false,
|
||||
'yml-files': false,
|
||||
},
|
||||
'frontmatter-video-transcripts': {
|
||||
// GHD011
|
||||
severity: 'error',
|
||||
'partial-markdown-files': false,
|
||||
'yml-files': false,
|
||||
},
|
||||
'frontmatter-schema': {
|
||||
// GHD012
|
||||
severity: 'error',
|
||||
'partial-markdown-files': false,
|
||||
'yml-files': false,
|
||||
},
|
||||
'frontmatter-liquid-syntax': {
|
||||
// GHD017
|
||||
severity: 'error',
|
||||
'partial-markdown-files': false,
|
||||
'yml-files': false,
|
||||
},
|
||||
'liquid-ifversion-tags': {
|
||||
// GHD020
|
||||
@@ -155,10 +181,12 @@ const githubMarkdownlintConfig = {
|
||||
'no-default-alt-text': {
|
||||
severity: 'error',
|
||||
'partial-markdown-files': true,
|
||||
'yml-files': true,
|
||||
},
|
||||
'no-generic-link-text': {
|
||||
severity: 'error',
|
||||
'partial-markdown-files': true,
|
||||
'yml-files': true,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -176,6 +204,7 @@ export const searchReplaceConfig = {
|
||||
severity: 'error',
|
||||
precommitSeverity: 'warning',
|
||||
'partial-markdown-files': true,
|
||||
'yml-files': true,
|
||||
},
|
||||
{
|
||||
name: 'docs-domain',
|
||||
@@ -184,6 +213,7 @@ export const searchReplaceConfig = {
|
||||
searchScope: 'all',
|
||||
severity: 'error',
|
||||
'partial-markdown-files': true,
|
||||
'yml-files': true,
|
||||
},
|
||||
{
|
||||
name: 'help-domain',
|
||||
@@ -192,6 +222,7 @@ export const searchReplaceConfig = {
|
||||
searchScope: 'all',
|
||||
severity: 'error',
|
||||
'partial-markdown-files': true,
|
||||
'yml-files': true,
|
||||
},
|
||||
{
|
||||
name: 'preview-domain',
|
||||
@@ -200,6 +231,7 @@ export const searchReplaceConfig = {
|
||||
searchScope: 'all',
|
||||
severity: 'error',
|
||||
'partial-markdown-files': true,
|
||||
'yml-files': true,
|
||||
},
|
||||
{
|
||||
name: 'developer-domain',
|
||||
@@ -212,6 +244,7 @@ export const searchReplaceConfig = {
|
||||
searchScope: 'all',
|
||||
severity: 'error',
|
||||
'partial-markdown-files': true,
|
||||
'yml-files': true,
|
||||
},
|
||||
{
|
||||
// Catches usage of old liquid data reusable syntax. For example:
|
||||
@@ -222,6 +255,7 @@ export const searchReplaceConfig = {
|
||||
replace: '{% data $1 %}',
|
||||
severity: 'error',
|
||||
'partial-markdown-files': true,
|
||||
'yml-files': true,
|
||||
},
|
||||
{
|
||||
// Catches usage of old octicon variable syntax. For example:
|
||||
@@ -233,6 +267,7 @@ export const searchReplaceConfig = {
|
||||
searchPattern: '/{{\\s*?octicon-([a-z-]+)(\\s[\\w\\s\\d-]+)?\\s*?}}/g',
|
||||
severity: 'error',
|
||||
'partial-markdown-files': true,
|
||||
'yml-files': true,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user