Skip to content

Commit e13f194

Browse files
mdjermanovicbmish
andauthored
chore: stricter validation of meta.docs.description in core rules (#16529)
Co-authored-by: Bryan Mishkin <[email protected]>
1 parent 776827a commit e13f194

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ module.exports = {
101101
"eslint-plugin/prefer-placeholders": "error",
102102
"eslint-plugin/prefer-replace-text": "error",
103103
"eslint-plugin/report-message-format": ["error", "[^a-z].*\\.$"],
104-
"eslint-plugin/require-meta-docs-description": ["error", { pattern: "^(Enforce|Require|Disallow)" }],
104+
"eslint-plugin/require-meta-docs-description": ["error", { pattern: "^(Enforce|Require|Disallow) .+[^. ]$" }],
105105
"internal-rules/no-invalid-meta": "error"
106106
}
107107
},

eslint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ module.exports = [
134134
"eslint-plugin/prefer-placeholders": "error",
135135
"eslint-plugin/prefer-replace-text": "error",
136136
"eslint-plugin/report-message-format": ["error", "[^a-z].*\\.$"],
137-
"eslint-plugin/require-meta-docs-description": ["error", { pattern: "^(Enforce|Require|Disallow)" }],
137+
"eslint-plugin/require-meta-docs-description": ["error", { pattern: "^(Enforce|Require|Disallow) .+[^. ]$" }],
138138
"internal-rules/no-invalid-meta": "error"
139139
}
140140
},

lib/rules/for-direction.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module.exports = {
1515
type: "problem",
1616

1717
docs: {
18-
description: "Enforce \"for\" loop update clause moving the counter in the right direction.",
18+
description: "Enforce \"for\" loop update clause moving the counter in the right direction",
1919
recommended: true,
2020
url: "https://eslint.org/docs/rules/for-direction"
2121
},

lib/rules/prefer-object-spread.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ module.exports = {
247247

248248
docs: {
249249
description:
250-
"Disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead.",
250+
"Disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead",
251251
recommended: false,
252252
url: "https://eslint.org/docs/rules/prefer-object-spread"
253253
},

0 commit comments

Comments
 (0)