Fix internal ESLint plugin (#11780)
This commit is contained in:
1 parent
0134f258c6
commit
70aa861bc1
1 file changed
+2
-6
@@ -24,6 +24,7 @@ module.exports = {
|
||||
[SUGGESTION]: "Rename to `node`.",
|
||||
},
|
||||
fixable: "code",
|
||||
hasSuggestions: true,
|
||||
},
|
||||
create(context) {
|
||||
const variables = new Map();
|
||||
@@ -63,12 +64,7 @@ module.exports = {
|
||||
|
||||
for (const identifier of identifiers) {
|
||||
const { parent } = identifier;
|
||||
if (
|
||||
parent &&
|
||||
parent.type === "Property" &&
|
||||
parent.shorthand &&
|
||||
parent.key === identifier
|
||||
) {
|
||||
if (parent && parent.type === "Property" && parent.shorthand) {
|
||||
yield fixer.replaceText(identifier, "n: node");
|
||||
} else {
|
||||
yield fixer.replaceText(identifier, "node");
|
||||
|
||||
Reference in new issue
Block a user