@graphql-eslint/eslint-plugin 3.16.2-alpha-20230316063229-8463019 → 3.16.2-alpha-20230318045109-091842b

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -98,27 +98,15 @@ const handleMissingFragments = ({ ruleId, context, node }) => {
98
98
  };
99
99
  const validationToRule = ({ ruleId, ruleName, getDocumentNode, schema = [], hasDidYouMeanSuggestions, }, docs) => {
100
100
  let ruleFn = null;
101
- const ruleKey = `${ruleName}Rule`;
102
101
  try {
103
- ruleFn = require(`graphql/validation/rules/${ruleKey}`)[ruleKey];
102
+ ruleFn = require(`graphql/validation/rules/${ruleName}Rule`)[`${ruleName}Rule`];
104
103
  }
105
104
  catch (_a) {
106
105
  try {
107
- ruleFn = require(`graphql/validation/rules/${ruleName}`)[ruleKey];
106
+ ruleFn = require(`graphql/validation/rules/${ruleName}`)[`${ruleName}Rule`];
108
107
  }
109
108
  catch (_b) {
110
- try {
111
- ruleFn = require('graphql/validation')[ruleKey];
112
- }
113
- catch (_c) {
114
- try {
115
- const { specifiedRules } = require('graphql');
116
- ruleFn = specifiedRules.find((ruleFn) => ruleFn.name === ruleKey);
117
- }
118
- catch (_d) {
119
- ruleFn = null;
120
- }
121
- }
109
+ ruleFn = require('graphql/validation')[`${ruleName}Rule`];
122
110
  }
123
111
  }
124
112
  return {
@@ -48,6 +48,9 @@ exports.rule = {
48
48
  if (!value) {
49
49
  context.report({
50
50
  node: node.name,
51
+ data: {
52
+ test: 'test',
53
+ },
51
54
  message: 'Directive "@deprecated" must have a reason!',
52
55
  });
53
56
  }
package/cjs/types.js CHANGED
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +0,0 @@
1
- export {};
@@ -97,27 +97,15 @@ const handleMissingFragments = ({ ruleId, context, node }) => {
97
97
  };
98
98
  const validationToRule = ({ ruleId, ruleName, getDocumentNode, schema = [], hasDidYouMeanSuggestions, }, docs) => {
99
99
  let ruleFn = null;
100
- const ruleKey = `${ruleName}Rule`;
101
100
  try {
102
- ruleFn = require(`graphql/validation/rules/${ruleKey}`)[ruleKey];
101
+ ruleFn = require(`graphql/validation/rules/${ruleName}Rule`)[`${ruleName}Rule`];
103
102
  }
104
103
  catch (_a) {
105
104
  try {
106
- ruleFn = require(`graphql/validation/rules/${ruleName}`)[ruleKey];
105
+ ruleFn = require(`graphql/validation/rules/${ruleName}`)[`${ruleName}Rule`];
107
106
  }
108
107
  catch (_b) {
109
- try {
110
- ruleFn = require('graphql/validation')[ruleKey];
111
- }
112
- catch (_c) {
113
- try {
114
- const { specifiedRules } = require('graphql');
115
- ruleFn = specifiedRules.find((ruleFn) => ruleFn.name === ruleKey);
116
- }
117
- catch (_d) {
118
- ruleFn = null;
119
- }
120
- }
108
+ ruleFn = require('graphql/validation')[`${ruleName}Rule`];
121
109
  }
122
110
  }
123
111
  return {
@@ -45,6 +45,9 @@ export const rule = {
45
45
  if (!value) {
46
46
  context.report({
47
47
  node: node.name,
48
+ data: {
49
+ test: 'test',
50
+ },
48
51
  message: 'Directive "@deprecated" must have a reason!',
49
52
  });
50
53
  }
package/esm/types.js CHANGED
@@ -1 +0,0 @@
1
- export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-eslint/eslint-plugin",
3
- "version": "3.16.2-alpha-20230316063229-8463019",
3
+ "version": "3.16.2-alpha-20230318045109-091842b",
4
4
  "description": "GraphQL plugin for ESLint",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {