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

eslint-plugin-autofix

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-autofix - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

25

lib/rules/no-unused-vars.js

@@ -119,2 +119,17 @@ /**

case "after-used": {
const tokenBefore = sourceCode.getTokenBefore(node)
const tokenAfter = sourceCode.getTokenAfter(node)
if (
parent.params.length === 1 &&
!(tokenBefore && tokenBefore.value === '(') &&
!(tokenAfter && tokenAfter.value === ')')
) {
return [
fixer.insertTextBefore(node, '('),
fixer.insertTextAfter(node, ')'),
fixer.remove(node)
]
}
const comma = sourceCode.getTokenBefore(node, commaFilter);

@@ -124,9 +139,9 @@

return [fixer.remove(comma), fixer.remove(node)];
} else {
const commaAfter = sourceCode.getTokenAfter(node, commaFilter);
if (commaAfter && commaAfter.range && grand.range && commaAfter.range[1] <= grand.range[1]) {
return [fixer.remove(node), fixer.remove(commaAfter)];
}
}
const commaAfter = sourceCode.getTokenAfter(node, commaFilter);
if (commaAfter && commaAfter.range && grand.range && commaAfter.range[1] <= grand.range[1]) {
return [fixer.remove(node), fixer.remove(commaAfter)];
}
return [fixer.remove(node)];

@@ -133,0 +148,0 @@ }

2

package.json
{
"name": "eslint-plugin-autofix",
"version": "1.0.4",
"version": "1.0.5",
"author": "薛定谔的猫 <weiran.zsd@outlook.com>",

@@ -5,0 +5,0 @@ "description": "autofix some errors reported by eslint rules.",

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