@graphql-eslint/eslint-plugin 4.1.0 → 4.1.1-alpha-20241129095718-0cc689c0eb8b65d162f4c6d87030879fe63a105b

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/cjs/meta.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});const version = "4.1.0";
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});const version = "4.1.1-alpha-20241129095718-0cc689c0eb8b65d162f4c6d87030879fe63a105b";
2
2
 
3
3
 
4
4
  exports.version = version;
@@ -330,7 +330,7 @@ ${_utilsjs.TYPES_KINDS.map((kind) => `- \`${kind}\``).join(`
330
330
  schema
331
331
  },
332
332
  create(context) {
333
- const options = context.options[0] || {}, { allowLeadingUnderscore, allowTrailingUnderscore, types, ...restOptions } = options;
333
+ const options = context.options[0] || {}, { allowLeadingUnderscore, allowTrailingUnderscore, types, ...restOptions } = options, ignoredNodes = /* @__PURE__ */ new Set();
334
334
  function normalisePropertyOption(kind) {
335
335
  const style = restOptions[kind] || types;
336
336
  return typeof style == "object" ? style : { style };
@@ -373,8 +373,10 @@ ${_utilsjs.TYPES_KINDS.map((kind) => `- \`${kind}\``).join(`
373
373
  }
374
374
  function getError() {
375
375
  const name = nodeName.replace(/(^_+)|(_+$)/g, "");
376
- if (ignorePattern && new RegExp(ignorePattern, "u").test(name))
376
+ if (ignorePattern && new RegExp(ignorePattern, "u").test(name)) {
377
+ "name" in n && ignoredNodes.add(n.name);
377
378
  return;
379
+ }
378
380
  if (prefix && !name.startsWith(prefix))
379
381
  return {
380
382
  errorMessage: `have "${prefix}" prefix`,
@@ -431,7 +433,7 @@ ${_utilsjs.TYPES_KINDS.map((kind) => `- \`${kind}\``).join(`
431
433
  };
432
434
  }
433
435
  }, checkUnderscore = (isLeading) => (node) => {
434
- if (node.parent.kind === "Field" && node.parent.alias !== node)
436
+ if (ignoredNodes.has(node) || node.parent.kind === "Field" && node.parent.alias !== node)
435
437
  return;
436
438
  const suggestedName = node.value.replace(isLeading ? /^_+/ : /_+$/, "");
437
439
  report(node, `${isLeading ? "Leading" : "Trailing"} underscores are not allowed`, [
package/esm/meta.js CHANGED
@@ -1,4 +1,4 @@
1
- const version = "4.1.0";
1
+ const version = "4.1.1-alpha-20241129095718-0cc689c0eb8b65d162f4c6d87030879fe63a105b";
2
2
  export {
3
3
  version
4
4
  };
@@ -330,7 +330,7 @@ ${TYPES_KINDS.map((kind) => `- \`${kind}\``).join(`
330
330
  schema
331
331
  },
332
332
  create(context) {
333
- const options = context.options[0] || {}, { allowLeadingUnderscore, allowTrailingUnderscore, types, ...restOptions } = options;
333
+ const options = context.options[0] || {}, { allowLeadingUnderscore, allowTrailingUnderscore, types, ...restOptions } = options, ignoredNodes = /* @__PURE__ */ new Set();
334
334
  function normalisePropertyOption(kind) {
335
335
  const style = restOptions[kind] || types;
336
336
  return typeof style == "object" ? style : { style };
@@ -373,8 +373,10 @@ ${TYPES_KINDS.map((kind) => `- \`${kind}\``).join(`
373
373
  }
374
374
  function getError() {
375
375
  const name = nodeName.replace(/(^_+)|(_+$)/g, "");
376
- if (ignorePattern && new RegExp(ignorePattern, "u").test(name))
376
+ if (ignorePattern && new RegExp(ignorePattern, "u").test(name)) {
377
+ "name" in n && ignoredNodes.add(n.name);
377
378
  return;
379
+ }
378
380
  if (prefix && !name.startsWith(prefix))
379
381
  return {
380
382
  errorMessage: `have "${prefix}" prefix`,
@@ -431,7 +433,7 @@ ${TYPES_KINDS.map((kind) => `- \`${kind}\``).join(`
431
433
  };
432
434
  }
433
435
  }, checkUnderscore = (isLeading) => (node) => {
434
- if (node.parent.kind === "Field" && node.parent.alias !== node)
436
+ if (ignoredNodes.has(node) || node.parent.kind === "Field" && node.parent.alias !== node)
435
437
  return;
436
438
  const suggestedName = node.value.replace(isLeading ? /^_+/ : /_+$/, "");
437
439
  report(node, `${isLeading ? "Leading" : "Trailing"} underscores are not allowed`, [
package/index.browser.js CHANGED
@@ -150,7 +150,7 @@ function convertToESTree(node, schema16) {
150
150
  }
151
151
 
152
152
  // src/meta.ts
153
- var version = "4.1.0";
153
+ var version = "4.1.1-alpha-20241129095718-0cc689c0eb8b65d162f4c6d87030879fe63a105b";
154
154
 
155
155
  // src/siblings.ts
156
156
  import {
@@ -2221,7 +2221,7 @@ ${TYPES_KINDS.map((kind) => `- \`${kind}\``).join(`
2221
2221
  schema: schema6
2222
2222
  },
2223
2223
  create(context) {
2224
- let options = context.options[0] || {}, { allowLeadingUnderscore, allowTrailingUnderscore, types, ...restOptions } = options;
2224
+ let options = context.options[0] || {}, { allowLeadingUnderscore, allowTrailingUnderscore, types, ...restOptions } = options, ignoredNodes = /* @__PURE__ */ new Set();
2225
2225
  function normalisePropertyOption(kind) {
2226
2226
  let style = restOptions[kind] || types;
2227
2227
  return typeof style == "object" ? style : { style };
@@ -2264,8 +2264,10 @@ ${TYPES_KINDS.map((kind) => `- \`${kind}\``).join(`
2264
2264
  }
2265
2265
  function getError() {
2266
2266
  let name = nodeName.replace(/(^_+)|(_+$)/g, "");
2267
- if (ignorePattern && new RegExp(ignorePattern, "u").test(name))
2267
+ if (ignorePattern && new RegExp(ignorePattern, "u").test(name)) {
2268
+ "name" in n && ignoredNodes.add(n.name);
2268
2269
  return;
2270
+ }
2269
2271
  if (prefix && !name.startsWith(prefix))
2270
2272
  return {
2271
2273
  errorMessage: `have "${prefix}" prefix`,
@@ -2322,7 +2324,7 @@ ${TYPES_KINDS.map((kind) => `- \`${kind}\``).join(`
2322
2324
  };
2323
2325
  }
2324
2326
  }, checkUnderscore = (isLeading) => (node) => {
2325
- if (node.parent.kind === "Field" && node.parent.alias !== node)
2327
+ if (ignoredNodes.has(node) || node.parent.kind === "Field" && node.parent.alias !== node)
2326
2328
  return;
2327
2329
  let suggestedName = node.value.replace(isLeading ? /^_+/ : /_+$/, "");
2328
2330
  report(node, `${isLeading ? "Leading" : "Trailing"} underscores are not allowed`, [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-eslint/eslint-plugin",
3
- "version": "4.1.0",
3
+ "version": "4.1.1-alpha-20241129095718-0cc689c0eb8b65d162f4c6d87030879fe63a105b",
4
4
  "type": "module",
5
5
  "description": "GraphQL plugin for ESLint",
6
6
  "repository": "https://github.com/dimaMachina/graphql-eslint",