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

@channel.io/eslint-plugin

Package Overview
Dependencies
Maintainers
4
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@channel.io/eslint-plugin - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

README.md

21

package.json
{
"name": "@channel.io/eslint-plugin",
"version": "1.0.0",
"description": "eslint plugins for channel.io web",
"version": "1.1.0",
"description": "eslint plugin for channel.io web",
"author": "Channel Corp.",
"main": "index.js",
"scripts": {
"test": "jest"
},
"bugs": {

@@ -20,3 +23,15 @@ "url": "https://github.com/channel-io/eslint-plugin/issues"

],
"license": "MIT"
"license": "MIT",
"devDependencies": {
"@typescript-eslint/parser": "^4.19.0",
"eslint": "^7.0.0",
"jest": "^26.6.3",
"pre-commit": "^1.2.2",
"typescript": "^4.2.3"
},
"jest": {
"testPathIgnorePatterns": [
"__tests__/ruleTester.js"
]
}
}

6

rules/hooks-deps-element-newline.js

@@ -21,7 +21,7 @@ const reactHookNames = [

CallExpression(node) {
const { callee, arguments } = node
if (!reactHookNames.includes(callee.name) || arguments.length <= 1) {
const { callee, arguments: args } = node
if (!reactHookNames.includes(callee.name) || args.length <= 1) {
return
}
const deps = arguments[arguments.length - 1]
const deps = args[args.length - 1]
if (deps.type === 'ArrayExpression') {

@@ -28,0 +28,0 @@ if (deps.elements.length <= 1 && deps.loc.start.line !== deps.loc.end.line) {

@@ -23,4 +23,4 @@ module.exports = {

const { callee, arguments } = node
if (callee.name === classNameImportName && arguments.length === 1 && arguments[0].type !== 'ObjectExpression') {
const { callee, arguments: args } = node
if (callee.name === classNameImportName && args.length === 1 && args[0].type !== 'ObjectExpression') {
context.report({

@@ -27,0 +27,0 @@ node,

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