Skip to content

Commit

Permalink
Merge pull request github#28591 from github/repo-sync
Browse files Browse the repository at this point in the history
Repo sync
  • Loading branch information
docs-bot authored Sep 29, 2023
2 parents cbdb6d1 + ec990df commit cd2d4aa
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/content-linter/scripts/lint-content.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,8 @@ function listRules() {
*/
function getMarkdownLintConfig(errorsOnly, runRules) {
const config = {
content: defaultConfig,
data: defaultConfig,
content: Object.assign({}, defaultConfig),
data: Object.assign({}, defaultConfig),
}
const configuredRules = {
content: [],
Expand All @@ -325,7 +325,6 @@ function getMarkdownLintConfig(errorsOnly, runRules) {

for (const [ruleName, ruleConfig] of Object.entries(allConfig)) {
const customRule = customConfig[ruleName] && getCustomRule(ruleName)

// search-replace is handled differently than other rules because
// it has nested metadata and rules.
if (errorsOnly && getRuleSeverity(ruleConfig) !== 'error' && ruleName !== 'search-replace')
Expand Down Expand Up @@ -362,7 +361,7 @@ function getMarkdownLintConfig(errorsOnly, runRules) {

config.content[ruleName] = ruleConfig
if (customRule) configuredRules.content.push(customRule)
if (ruleConfig['partial-markdown-files']) {
if (ruleConfig['partial-markdown-files'] === true) {
config.data[ruleName] = ruleConfig
if (customRule) configuredRules.data.push(customRule)
}
Expand Down

0 comments on commit cd2d4aa

Please sign in to comment.