@bigbinary/eslint-plugin-neeto 1.1.23 → 1.1.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +10 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -26573,8 +26573,11 @@
|
|
|
26573
26573
|
if (!onSuccess.value.body) return;
|
|
26574
26574
|
var importExists = pure.existsBy(USE_MUTATION_WITH_INVALIDATION_IMPORT_PATTERN, getAllImports(node));
|
|
26575
26575
|
if (onSuccess.value.body.type === TYPES.CALL_EXPRESSION) {
|
|
26576
|
+
var _params$arguments;
|
|
26576
26577
|
var params = onSuccess.value.body;
|
|
26577
|
-
if (!pure.matches(SINGLE_INVALIDATION_PATTERN, params))
|
|
26578
|
+
if (!pure.matches(SINGLE_INVALIDATION_PATTERN, params) || ((_params$arguments = params.arguments) === null || _params$arguments === void 0 ? void 0 : _params$arguments.length) > 1) {
|
|
26579
|
+
return;
|
|
26580
|
+
}
|
|
26578
26581
|
var variables = getVariables(context, params);
|
|
26579
26582
|
if (pure.isPresent(variables)) {
|
|
26580
26583
|
reportError(context, node);
|
|
@@ -26603,7 +26606,12 @@
|
|
|
26603
26606
|
} else if (onSuccess.value.body.type === TYPES.BLOCK_STATEMENT) {
|
|
26604
26607
|
var _params = onSuccess.value.body.body;
|
|
26605
26608
|
var invalidations = pure._filterBy(INVALIDATION_PATTERN, _params);
|
|
26606
|
-
if (pure.isNotPresent(invalidations))
|
|
26609
|
+
if (pure.isNotPresent(invalidations) || invalidations.find(function (item) {
|
|
26610
|
+
var _item$expression$argu;
|
|
26611
|
+
return ((_item$expression$argu = item.expression.arguments) === null || _item$expression$argu === void 0 ? void 0 : _item$expression$argu.length) > 1;
|
|
26612
|
+
})) {
|
|
26613
|
+
return;
|
|
26614
|
+
}
|
|
26607
26615
|
var otherOptions = pure._removeBy(INVALIDATION_PATTERN, _params);
|
|
26608
26616
|
var queryClientInOtherOptions = otherOptions === null || otherOptions === void 0 ? void 0 : otherOptions.find(function (item) {
|
|
26609
26617
|
return context.getSourceCode().getText(item).includes("queryClient");
|