Skip to content

Commit c82441d

Browse files
committed
fix: use italics for disabled keyword in notice
1 parent 1544b4b commit c82441d

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ Generated content in a rule doc (everything above the marker comment) (intention
7070

7171
💼 This rule is enabled in the following configs: ✅ `recommended`, 🎨 `stylistic`.
7272

73+
🎨 This rule is _disabled_ in the `stylistic` config.
74+
7375
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).
7476

7577
💡 This rule is manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).

lib/rule-notices.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ const RULE_NOTICES: {
120120
// Complete sentence for configs that disable the rule.
121121
const SENTENCE_DISABLED =
122122
configsDisabled.length > 1
123-
? `This rule is disabled in the following ${configsLinkOrWord}: ${configsDisabledCSV}.`
123+
? `This rule is _disabled_ in the following ${configsLinkOrWord}: ${configsDisabledCSV}.`
124124
: configsDisabled.length === 1
125-
? `This rule is disabled in the \`${configsDisabled?.[0]}\` ${configLinkOrWord}.`
125+
? `This rule is _disabled_ in the \`${configsDisabled?.[0]}\` ${configLinkOrWord}.`
126126
: '';
127127

128128
return `${emoji} ${SENTENCE_ENABLED}${

test/lib/__snapshots__/generator-test.ts.snap

+4-4
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ exports[`generator #generate rules that are disabled generates the documentation
591591
exports[`generator #generate rules that are disabled generates the documentation 2`] = `
592592
"# Description of no-foo (\`test/no-foo\`)
593593
594-
✅ This rule is disabled in the \`recommended\` config.
594+
✅ This rule is _disabled_ in the \`recommended\` config.
595595
596596
<!-- end auto-generated rule header -->
597597
"
@@ -600,7 +600,7 @@ exports[`generator #generate rules that are disabled generates the documentation
600600
exports[`generator #generate rules that are disabled generates the documentation 3`] = `
601601
"# Description of no-bar (\`test/no-bar\`)
602602
603-
💼 This rule is disabled in the following configs: \`other\`, ✅ \`recommended\`.
603+
💼 This rule is _disabled_ in the following configs: \`other\`, ✅ \`recommended\`.
604604
605605
<!-- end auto-generated rule header -->
606606
"
@@ -609,7 +609,7 @@ exports[`generator #generate rules that are disabled generates the documentation
609609
exports[`generator #generate rules that are disabled generates the documentation 4`] = `
610610
"# Description of no-bar (\`test/no-baz\`)
611611
612-
💼 This rule is enabled in the \`recommended\` config. This rule is disabled in the \`other\` config.
612+
💼 This rule is enabled in the \`recommended\` config. This rule is _disabled_ in the \`other\` config.
613613
614614
<!-- end auto-generated rule header -->
615615
"
@@ -618,7 +618,7 @@ exports[`generator #generate rules that are disabled generates the documentation
618618
exports[`generator #generate rules that are disabled generates the documentation 5`] = `
619619
"# Description of no-bar (\`test/no-biz\`)
620620
621-
💼 This rule is disabled in the \`other\` config.
621+
💼 This rule is _disabled_ in the \`other\` config.
622622
623623
<!-- end auto-generated rule header -->
624624
"

0 commit comments

Comments
 (0)