@graphql-eslint/eslint-plugin 3.11.0-alpha-20220828112016-ee5ae70 → 3.11.0-alpha-20220828135426-e9545b1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. package/index.js +2 -2
  2. package/index.mjs +2 -2
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -767,7 +767,7 @@ const rule = {
767
767
  const prevNode = nodes[i - 1];
768
768
  const prevName = ('alias' in prevNode && ((_c = prevNode.alias) === null || _c === void 0 ? void 0 : _c.value)) || ('name' in prevNode && ((_d = prevNode.name) === null || _d === void 0 ? void 0 : _d.value));
769
769
  if (prevName) {
770
- if (opts.ignorePrefix.length > 0) {
770
+ if ((opts.ignorePrefix || []).length > 0) {
771
771
  const shouldSkipIgnorePrefix = opts.ignorePrefix.some(prefix => prefix === prevName || prefix === currName || prevName.startsWith(prefix) || currName.startsWith(prefix));
772
772
  if (shouldSkipIgnorePrefix) {
773
773
  continue;
@@ -776,7 +776,7 @@ const rule = {
776
776
  console.error(`${opts.ignorePrefix} is not match to "${prevName}" or "${currName}"`);
777
777
  }
778
778
  }
779
- if (opts.ignoreSuffix.length > 0) {
779
+ if ((opts.ignoreSuffix || []).length > 0) {
780
780
  const shouldSkipIgnoreSuffix = opts.ignoreSuffix.some(suffix => suffix === prevName || suffix === currName || prevName.endsWith(suffix) || currName.endsWith(suffix));
781
781
  if (shouldSkipIgnoreSuffix) {
782
782
  continue;
package/index.mjs CHANGED
@@ -761,7 +761,7 @@ const rule = {
761
761
  const prevNode = nodes[i - 1];
762
762
  const prevName = ('alias' in prevNode && ((_c = prevNode.alias) === null || _c === void 0 ? void 0 : _c.value)) || ('name' in prevNode && ((_d = prevNode.name) === null || _d === void 0 ? void 0 : _d.value));
763
763
  if (prevName) {
764
- if (opts.ignorePrefix.length > 0) {
764
+ if ((opts.ignorePrefix || []).length > 0) {
765
765
  const shouldSkipIgnorePrefix = opts.ignorePrefix.some(prefix => prefix === prevName || prefix === currName || prevName.startsWith(prefix) || currName.startsWith(prefix));
766
766
  if (shouldSkipIgnorePrefix) {
767
767
  continue;
@@ -770,7 +770,7 @@ const rule = {
770
770
  console.error(`${opts.ignorePrefix} is not match to "${prevName}" or "${currName}"`);
771
771
  }
772
772
  }
773
- if (opts.ignoreSuffix.length > 0) {
773
+ if ((opts.ignoreSuffix || []).length > 0) {
774
774
  const shouldSkipIgnoreSuffix = opts.ignoreSuffix.some(suffix => suffix === prevName || suffix === currName || prevName.endsWith(suffix) || currName.endsWith(suffix));
775
775
  if (shouldSkipIgnoreSuffix) {
776
776
  continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-eslint/eslint-plugin",
3
- "version": "3.11.0-alpha-20220828112016-ee5ae70",
3
+ "version": "3.11.0-alpha-20220828135426-e9545b1",
4
4
  "description": "GraphQL plugin for ESLint",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {