@graphql-eslint/eslint-plugin 4.4.1 → 4.4.2

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/README.md CHANGED
@@ -1,5 +1,3 @@
1
-
2
-
3
1
  # GraphQL-ESLint
4
2
 
5
3
  [![npm version](https://badge.fury.io/js/%40graphql-eslint%2Feslint-plugin.svg)](https://badge.fury.io/js/%40graphql-eslint%2Feslint-plugin)
package/browser.js CHANGED
@@ -408,7 +408,7 @@ function convertToESTree(node, schema16) {
408
408
  }
409
409
 
410
410
  // src/meta.ts
411
- var version = "4.4.1";
411
+ var version = "4.4.2";
412
412
 
413
413
  // src/siblings.ts
414
414
  import {
@@ -5547,17 +5547,17 @@ var rule28 = {
5547
5547
  }
5548
5548
  function checkFields(rawType2) {
5549
5549
  const fields = rawType2.getFields();
5550
- const hasIdFieldInType = idNames.some((name) => fields[name]);
5551
- if (!hasIdFieldInType) {
5550
+ const idFieldsInType = idNames.filter((name) => fields[name]);
5551
+ if (idFieldsInType.length === 0) {
5552
5552
  return;
5553
5553
  }
5554
5554
  checkFragments(node);
5555
5555
  if (requireAllFields) {
5556
- for (const idName of idNames) {
5556
+ for (const idName of idFieldsInType) {
5557
5557
  report([idName]);
5558
5558
  }
5559
5559
  } else {
5560
- report(idNames);
5560
+ report(idFieldsInType);
5561
5561
  }
5562
5562
  }
5563
5563
  function report(idNames2) {
package/cjs/meta.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});const version = "4.4.1";
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});const version = "4.4.2";
2
2
 
3
3
 
4
4
  exports.version = version;
@@ -169,17 +169,17 @@ const rule = {
169
169
  }
170
170
  function checkFields(rawType2) {
171
171
  const fields = rawType2.getFields();
172
- const hasIdFieldInType = idNames.some((name) => fields[name]);
173
- if (!hasIdFieldInType) {
172
+ const idFieldsInType = idNames.filter((name) => fields[name]);
173
+ if (idFieldsInType.length === 0) {
174
174
  return;
175
175
  }
176
176
  checkFragments(node);
177
177
  if (requireAllFields) {
178
- for (const idName of idNames) {
178
+ for (const idName of idFieldsInType) {
179
179
  report([idName]);
180
180
  }
181
181
  } else {
182
- report(idNames);
182
+ report(idFieldsInType);
183
183
  }
184
184
  }
185
185
  function report(idNames2) {
package/esm/meta.js CHANGED
@@ -1,4 +1,4 @@
1
- const version = "4.4.1";
1
+ const version = "4.4.2";
2
2
  export {
3
3
  version
4
4
  };
@@ -169,17 +169,17 @@ const rule = {
169
169
  }
170
170
  function checkFields(rawType2) {
171
171
  const fields = rawType2.getFields();
172
- const hasIdFieldInType = idNames.some((name) => fields[name]);
173
- if (!hasIdFieldInType) {
172
+ const idFieldsInType = idNames.filter((name) => fields[name]);
173
+ if (idFieldsInType.length === 0) {
174
174
  return;
175
175
  }
176
176
  checkFragments(node);
177
177
  if (requireAllFields) {
178
- for (const idName of idNames) {
178
+ for (const idName of idFieldsInType) {
179
179
  report([idName]);
180
180
  }
181
181
  } else {
182
- report(idNames);
182
+ report(idFieldsInType);
183
183
  }
184
184
  }
185
185
  function report(idNames2) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-eslint/eslint-plugin",
3
- "version": "4.4.1",
3
+ "version": "4.4.2",
4
4
  "type": "module",
5
5
  "description": "GraphQL plugin for ESLint",
6
6
  "repository": {