@arthurgeron/eslint-plugin-react-usememo
Advanced tools
Comparing version 2.1.2 to 2.1.3--beta0
@@ -347,4 +347,4 @@ 'use strict'; | ||
function addReactImports(context, kind, reactImportData, fixer) { | ||
var _a, _b, _c, _d, _e, _f; | ||
var sourceCode = context.getSourceCode(); | ||
var _a, _b, _c, _d; | ||
context.getSourceCode(); | ||
var importsDisabled = ((_c = (_b = (_a = context.options) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.fix) === null || _c === void 0 ? void 0 : _c.addImports) === false; | ||
@@ -362,3 +362,3 @@ var specifier = undefined; | ||
}; | ||
if (reactImportData.importDeclaration) { | ||
if ((_d = reactImportData.importDeclaration) === null || _d === void 0 ? void 0 : _d.specifiers) { | ||
// Do not add specifier if exists. | ||
@@ -381,3 +381,2 @@ var specifiers = reactImportData.importDeclaration.specifiers; | ||
reactImportData["".concat(kind, "Imported")] = true; | ||
((_f = (_e = (_d = sourceCode.ast.body[0]) === null || _d === void 0 ? void 0 : _d.leadingComments) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.value) || ""; | ||
// Add an extra new line before const component and use indentSpace for proper spacing. | ||
@@ -384,0 +383,0 @@ return fixer.insertTextBeforeRange([0, 0], "import { ".concat(kind, " } from 'react';\n")); |
{ | ||
"name": "@arthurgeron/eslint-plugin-react-usememo", | ||
"version": "2.1.2", | ||
"version": "2.1.3--beta0", | ||
"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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
49937
848
2