Skip to content

Commit b950c1b

Browse files
authoredDec 3, 2024··
docs: add missing backticks to prefer-object-spread (#19206)
1 parent 8a941cb commit b950c1b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed
 

‎docs/src/_data/rules_meta.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2640,7 +2640,7 @@
26402640
"prefer-object-spread": {
26412641
"type": "suggestion",
26422642
"docs": {
2643-
"description": "Disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead",
2643+
"description": "Disallow using `Object.assign` with an object literal as the first argument and prefer the use of object spread instead",
26442644
"recommended": false,
26452645
"url": "https://eslint.org/docs/latest/rules/prefer-object-spread"
26462646
},

‎docs/src/rules/prefer-object-spread.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ rule_type: suggestion
55

66

77

8-
When Object.assign is called using an object literal as the first argument, this rule requires using the object spread syntax instead. This rule also warns on cases where an `Object.assign` call is made using a single argument that is an object literal, in this case, the `Object.assign` call is not needed.
8+
When `Object.assign` is called using an object literal as the first argument, this rule requires using the object spread syntax instead. This rule also warns on cases where an `Object.assign` call is made using a single argument that is an object literal, in this case, the `Object.assign` call is not needed.
99

1010
Introduced in ES2018, object spread is a declarative alternative which may perform better than the more dynamic, imperative `Object.assign`.
1111

‎lib/rules/prefer-object-spread.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @fileoverview Prefers object spread property over Object.assign
2+
* @fileoverview Rule to disallow using `Object.assign` with an object literal as the first argument and prefer the use of object spread instead
33
* @author Sharmila Jesupaul
44
*/
55

@@ -246,7 +246,7 @@ module.exports = {
246246

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

0 commit comments

Comments
 (0)
Please sign in to comment.