Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@arthurgeron/eslint-plugin-react-usememo

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arthurgeron/eslint-plugin-react-usememo - npm Package Compare versions

Comparing version 2.1.2 to 2.1.3--beta0

7

dist/index.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc