@channel.io/eslint-plugin
Advanced tools
Comparing version 1.0.0 to 1.1.0
{ | ||
"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" | ||
] | ||
} | ||
} |
@@ -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, |
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
9425
9
220
1
27
5