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

eslint-plugin-kyt

Package Overview
Dependencies
Maintainers
4
Versions
147
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-kyt - npm Package Compare versions

Comparing version 1.4.1 to 1.4.2

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

## [1.4.2](https://github.com/nytimes/kyt/compare/eslint-plugin-kyt@1.4.1...eslint-plugin-kyt@1.4.2) (2021-04-15)
### Bug Fixes
* **lint:** ensure that node.argument.name is a string value ([8928b85](https://github.com/nytimes/kyt/commit/8928b85bc8a937910b4bc0f359174b1fbc4b524d))
## [1.4.1](https://github.com/nytimes/kyt/compare/eslint-plugin-kyt@1.4.0...eslint-plugin-kyt@1.4.1) (2021-04-15)

@@ -8,0 +19,0 @@

7

lib/rules/no-immediate-return.js

@@ -20,3 +20,8 @@ const message = 'Do not declare a variable and then immediately return it. Just return it.';

const name = n.declarations[0].id.name;
if (next.type === 'ReturnStatement' && name === next.argument.name) {
if (
next.type === 'ReturnStatement' &&
next.argument.type === 'Identifier' &&
next.argument.name &&
name === next.argument.name
) {
context.report({

@@ -23,0 +28,0 @@ node: next,

4

package.json
{
"name": "eslint-plugin-kyt",
"version": "1.4.1",
"version": "1.4.2",
"description": "ESLint plugin for Vi-specific rules.",

@@ -23,3 +23,3 @@ "main": "lib/index.js",

},
"gitHead": "6babbd8a8c41835d4946e741dc6594e635bf6339"
"gitHead": "824bebdf552c05ed1f23c5680477d990374a3cd1"
}

@@ -23,2 +23,5 @@ const { RuleTester } = require('eslint');

},
{
code: `function Foo() { const { bar, baz } = {}; return (1); }`,
},
],

@@ -25,0 +28,0 @@ invalid: [

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