eslint-plugin-magic-variables
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -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": [ |
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
10160