Skip to content

Commit ad8707e

Browse files
authored
Configure british-english-quotes rule to only run in pre-commit (#56664)
1 parent 7eaa98c commit ad8707e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/content-linter/scripts/lint-content.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,9 @@ function getMarkdownLintConfig(errorsOnly, runRules) {
553553

554554
if (runRules && !runRules.includes(ruleName)) continue
555555

556+
// Skip british-english-quotes rule in CI/PRs (only run in pre-commit)
557+
if (ruleName === 'british-english-quotes' && !isPrecommit) continue
558+
556559
// There are a subset of rules run on just the frontmatter in files
557560
if (githubDocsFrontmatterConfig[ruleName]) {
558561
config.frontMatter[ruleName] = ruleConfig

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const reportingConfig = {
1414
// Add rule names here if you want to suppress them from reports
1515
excludeRules: [
1616
// Example: 'GHD030' // Uncomment to exclude code-fence-line-length warnings
17-
// Example: 'british-english-quotes' // Uncomment to exclude punctuation warnings
17+
'british-english-quotes', // Exclude from reports but keep for pre-commit
1818
],
1919
}
2020

@@ -215,6 +215,7 @@ const githubDocsConfig = {
215215
'british-english-quotes': {
216216
// GHD048
217217
severity: 'warning',
218+
precommitSeverity: 'warning', // Show warnings locally for writer awareness
218219
'partial-markdown-files': true,
219220
'yml-files': true,
220221
},

0 commit comments

Comments
 (0)