@graphql-eslint/eslint-plugin 3.16.2-alpha-20230316061943-b3c71ef → 3.16.2-alpha-20230318045109-091842b
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/estree-converter/types.js +0 -2
- package/cjs/rules/graphql-js-validation.js +3 -13
- package/cjs/rules/require-deprecation-reason.js +3 -0
- package/cjs/types.js +0 -2
- package/esm/estree-converter/types.js +0 -1
- package/esm/rules/graphql-js-validation.js +3 -13
- package/esm/rules/require-deprecation-reason.js +3 -0
- package/esm/types.js +0 -1
- package/package.json +1 -1
@@ -98,27 +98,17 @@ 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/${
|
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}`)[
|
106
|
+
ruleFn = require(`graphql/validation/rules/${ruleName}`)[`${ruleName}Rule`];
|
108
107
|
}
|
109
108
|
catch (_b) {
|
110
|
-
|
111
|
-
ruleFn = require('graphql/validation')[ruleKey];
|
112
|
-
}
|
113
|
-
catch (_c) {
|
114
|
-
const { specifiedRules } = require('graphql');
|
115
|
-
ruleFn = specifiedRules.find((ruleFn) => ruleFn.name === ruleKey);
|
116
|
-
}
|
109
|
+
ruleFn = require('graphql/validation')[`${ruleName}Rule`];
|
117
110
|
}
|
118
111
|
}
|
119
|
-
if (!ruleFn) {
|
120
|
-
throw new Error(`Failed to locate rule "${ruleName}" in "graphql-js" package!`);
|
121
|
-
}
|
122
112
|
return {
|
123
113
|
[ruleId]: {
|
124
114
|
meta: {
|
package/cjs/types.js
CHANGED
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -97,27 +97,17 @@ 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/${
|
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}`)[
|
105
|
+
ruleFn = require(`graphql/validation/rules/${ruleName}`)[`${ruleName}Rule`];
|
107
106
|
}
|
108
107
|
catch (_b) {
|
109
|
-
|
110
|
-
ruleFn = require('graphql/validation')[ruleKey];
|
111
|
-
}
|
112
|
-
catch (_c) {
|
113
|
-
const { specifiedRules } = require('graphql');
|
114
|
-
ruleFn = specifiedRules.find((ruleFn) => ruleFn.name === ruleKey);
|
115
|
-
}
|
108
|
+
ruleFn = require('graphql/validation')[`${ruleName}Rule`];
|
116
109
|
}
|
117
110
|
}
|
118
|
-
if (!ruleFn) {
|
119
|
-
throw new Error(`Failed to locate rule "${ruleName}" in "graphql-js" package!`);
|
120
|
-
}
|
121
111
|
return {
|
122
112
|
[ruleId]: {
|
123
113
|
meta: {
|
package/esm/types.js
CHANGED
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
package/package.json
CHANGED