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

eslint-plugin-magic-variables

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-magic-variables - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

4

lib/rules/no-magic-variables.js

@@ -88,5 +88,5 @@ /**

const operator = get(node, `parent.init.operator`, null)
const modifier = operator === '-' ? -1 : 1
const modifier = operator === '-' ? -1 : null
let value = get(node, 'parent.init.value', get(node,'parent.init.argument.value', ''))
value = value * modifier
value = modifier ? value * modifier : value
context.report({

@@ -93,0 +93,0 @@ node: node,

{
"name": "eslint-plugin-magic-variables",
"version": "0.0.4",
"version": "0.0.5",
"description": "Prevent variable names that are numeric, or are the word form of a number from being used. i.e. FIFTY_TWO is not a valid variable name.",

@@ -5,0 +5,0 @@ "keywords": [

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