@arthurgeron/eslint-plugin-react-usememo
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -144,4 +144,8 @@ 'use strict'; | ||
if (reactImportData.importDeclaration) { | ||
reactImportData.importDeclaration.specifiers.push(specifier); | ||
return fixer.insertTextAfter(reactImportData.importDeclaration.specifiers[reactImportData.importDeclaration.specifiers.length - 2], ", ".concat(kind)); | ||
// Do not add specifier if exists. | ||
var specifiers = reactImportData.importDeclaration.specifiers; | ||
if (!specifiers.find(function (x) { return x.local.name === kind; })) { | ||
specifiers.push(specifier); | ||
return fixer.insertTextAfter(specifiers[specifiers.length - 2], ", ".concat(kind)); | ||
} | ||
} | ||
@@ -148,0 +152,0 @@ } |
{ | ||
"name": "@arthurgeron/eslint-plugin-react-usememo", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41371
678