eslint-plugin-spruce
Advanced tools
Comparing version 8.13.1-canary.18 to 8.13.1-canary.19
22
index.js
const rules = [ | ||
{ method: 'query', option: 'query', suffix: 'QueryString' }, | ||
{ method: 'mutate', option: 'mutation', suffix: 'MutationString' } | ||
{ | ||
method: 'query', | ||
option: 'query', | ||
suffix: 'QueryString', | ||
allowedParents: ['gqlClient'] | ||
}, | ||
{ | ||
method: 'mutate', | ||
option: 'mutation', | ||
suffix: 'MutationString', | ||
allowedParents: ['gqlClient'] | ||
} | ||
] | ||
@@ -13,3 +23,9 @@ | ||
rules.forEach(rule => { | ||
if (node.callee.name === rule.method) { | ||
if ( | ||
node.callee.name === rule.method || | ||
(node.callee.property && | ||
node.callee.property.name === rule.method && | ||
node.callee.object && | ||
rule.allowedParents.indexOf(node.callee.object.name) >= 0) | ||
) { | ||
if (node.arguments[0].type !== 'ObjectExpression') { | ||
@@ -16,0 +32,0 @@ return context.report( |
@@ -6,3 +6,3 @@ { | ||
}, | ||
"version": "8.13.1-canary.18+3a16915e", | ||
"version": "8.13.1-canary.19+b2c450e4", | ||
"description": "ESLint plugin for Spruce Javascript projects", | ||
@@ -21,3 +21,3 @@ "author": "George Pantazis <gcpantazis@gmail.com>", | ||
}, | ||
"gitHead": "3a16915e3004096f2b88e5862afda8935ffcec06" | ||
"gitHead": "b2c450e4a527819264903a5cc6f30302a7d32ab1" | ||
} |
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
4933
113