@graphql-eslint/eslint-plugin 4.0.0-alpha-20230810160036-304c2c0 → 4.0.0-alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +0 -2
- package/cjs/documents.d.ts +1 -1
- package/cjs/estree-converter/types.d.ts +1 -1
- package/cjs/flat-configs.d.ts +2 -2
- package/cjs/graphql-config.d.ts +1 -1
- package/cjs/graphql-config.js +1 -1
- package/cjs/index.d.ts +2 -4
- package/cjs/parser.d.ts +2 -2
- package/cjs/parser.js +2 -2
- package/cjs/processor.d.ts +1 -1
- package/cjs/rules/alphabetize.d.ts +4 -4
- package/cjs/rules/description-style.d.ts +3 -3
- package/cjs/rules/graphql-js-validation.d.ts +2 -2
- package/cjs/rules/index.d.ts +17 -19
- package/cjs/rules/index.js +1 -1
- package/cjs/rules/input-name.d.ts +3 -3
- package/cjs/rules/lone-executable-definition.d.ts +3 -3
- package/cjs/rules/match-document-filename.d.ts +3 -3
- package/cjs/rules/naming-convention.d.ts +3 -3
- package/cjs/rules/no-anonymous-operations.d.ts +2 -2
- package/cjs/rules/no-deprecated.d.ts +2 -2
- package/cjs/rules/no-duplicate-fields.d.ts +2 -2
- package/cjs/rules/no-hashtag-description.d.ts +2 -2
- package/cjs/rules/no-one-place-fragments.d.ts +2 -2
- package/cjs/rules/no-root-type.d.ts +3 -3
- package/cjs/rules/no-scalar-result-type-on-mutation.d.ts +2 -2
- package/cjs/rules/no-typename-prefix.d.ts +2 -2
- package/cjs/rules/no-unreachable-types.d.ts +2 -2
- package/cjs/rules/no-unreachable-types.js +1 -2
- package/cjs/rules/no-unused-fields.d.ts +2 -2
- package/cjs/rules/relay-arguments.d.ts +3 -3
- package/cjs/rules/relay-connection-types.d.ts +2 -2
- package/cjs/rules/relay-edge-types.d.ts +3 -3
- package/cjs/rules/relay-edge-types.js +1 -1
- package/cjs/rules/relay-page-info.d.ts +2 -2
- package/cjs/rules/require-deprecation-date.d.ts +3 -3
- package/cjs/rules/require-deprecation-reason.d.ts +2 -2
- package/cjs/rules/require-description.d.ts +3 -3
- package/cjs/rules/require-description.js +1 -1
- package/cjs/rules/require-field-of-type-query-in-mutation-result.d.ts +2 -2
- package/cjs/rules/require-import-fragment.d.ts +2 -2
- package/cjs/rules/require-import-fragment.js +4 -8
- package/cjs/rules/require-nullable-fields-with-oneof.d.ts +2 -2
- package/cjs/rules/require-nullable-result-in-root.d.ts +2 -2
- package/cjs/rules/require-selections.d.ts +3 -3
- package/cjs/rules/require-selections.js +1 -1
- package/cjs/rules/require-type-pattern-with-oneof.d.ts +2 -2
- package/cjs/rules/selection-set-depth.d.ts +3 -3
- package/cjs/rules/strict-id-in-types.d.ts +3 -3
- package/cjs/rules/unique-enum-value-names.d.ts +2 -2
- package/cjs/rules/unique-fragment-name.d.ts +1 -1
- package/cjs/rules/unique-operation-name.d.ts +2 -2
- package/cjs/schema.d.ts +1 -1
- package/cjs/siblings.d.ts +2 -2
- package/cjs/types.d.ts +4 -3
- package/cjs/utils.d.ts +3 -3
- package/esm/cache.js +1 -1
- package/esm/configs/index.js +1 -1
- package/esm/configs/operations-all.js +1 -1
- package/esm/configs/operations-recommended.js +1 -1
- package/esm/configs/schema-all.js +1 -1
- package/esm/configs/schema-recommended.js +1 -1
- package/esm/configs/schema-relay.js +1 -1
- package/esm/documents.d.mts +1 -1
- package/esm/documents.js +1 -1
- package/esm/estree-converter/converter.js +1 -1
- package/esm/estree-converter/types.d.mts +1 -1
- package/esm/estree-converter/utils.js +1 -1
- package/esm/flat-configs.d.mts +2 -2
- package/esm/flat-configs.js +1 -1
- package/esm/graphql-config.d.mts +1 -1
- package/esm/graphql-config.js +2 -2
- package/esm/index.d.mts +2 -4
- package/esm/index.js +1 -1
- package/esm/parser.d.mts +2 -2
- package/esm/parser.js +3 -3
- package/esm/processor.d.mts +1 -1
- package/esm/processor.js +1 -1
- package/esm/rules/alphabetize.d.mts +3 -3
- package/esm/rules/alphabetize.js +1 -1
- package/esm/rules/description-style.d.mts +3 -3
- package/esm/rules/description-style.js +1 -1
- package/esm/rules/graphql-js-validation.d.mts +2 -2
- package/esm/rules/graphql-js-validation.js +1 -1
- package/esm/rules/index.d.mts +17 -19
- package/esm/rules/index.js +2 -2
- package/esm/rules/input-name.d.mts +3 -3
- package/esm/rules/input-name.js +1 -1
- package/esm/rules/lone-executable-definition.d.mts +3 -3
- package/esm/rules/lone-executable-definition.js +1 -1
- package/esm/rules/match-document-filename.d.mts +3 -3
- package/esm/rules/match-document-filename.js +1 -1
- package/esm/rules/naming-convention.d.mts +3 -3
- package/esm/rules/naming-convention.js +1 -1
- package/esm/rules/no-anonymous-operations.d.mts +2 -2
- package/esm/rules/no-anonymous-operations.js +1 -1
- package/esm/rules/no-deprecated.d.mts +2 -2
- package/esm/rules/no-deprecated.js +1 -1
- package/esm/rules/no-duplicate-fields.d.mts +2 -2
- package/esm/rules/no-duplicate-fields.js +1 -1
- package/esm/rules/no-hashtag-description.d.mts +2 -2
- package/esm/rules/no-hashtag-description.js +1 -1
- package/esm/rules/no-one-place-fragments.d.mts +2 -2
- package/esm/rules/no-one-place-fragments.js +1 -1
- package/esm/rules/no-root-type.d.mts +3 -3
- package/esm/rules/no-root-type.js +1 -1
- package/esm/rules/no-scalar-result-type-on-mutation.d.mts +2 -2
- package/esm/rules/no-scalar-result-type-on-mutation.js +1 -1
- package/esm/rules/no-typename-prefix.d.mts +2 -2
- package/esm/rules/no-typename-prefix.js +1 -1
- package/esm/rules/no-unreachable-types.d.mts +2 -2
- package/esm/rules/no-unreachable-types.js +2 -3
- package/esm/rules/no-unused-fields.d.mts +2 -2
- package/esm/rules/no-unused-fields.js +1 -1
- package/esm/rules/relay-arguments.d.mts +3 -3
- package/esm/rules/relay-arguments.js +1 -1
- package/esm/rules/relay-connection-types.d.mts +2 -2
- package/esm/rules/relay-connection-types.js +1 -1
- package/esm/rules/relay-edge-types.d.mts +3 -3
- package/esm/rules/relay-edge-types.js +2 -2
- package/esm/rules/relay-page-info.d.mts +2 -2
- package/esm/rules/relay-page-info.js +1 -1
- package/esm/rules/require-deprecation-date.d.mts +3 -3
- package/esm/rules/require-deprecation-date.js +1 -1
- package/esm/rules/require-deprecation-reason.d.mts +2 -2
- package/esm/rules/require-deprecation-reason.js +1 -1
- package/esm/rules/require-description.d.mts +3 -3
- package/esm/rules/require-description.js +2 -2
- package/esm/rules/require-field-of-type-query-in-mutation-result.d.mts +2 -2
- package/esm/rules/require-field-of-type-query-in-mutation-result.js +1 -1
- package/esm/rules/require-import-fragment.d.mts +2 -2
- package/esm/rules/require-import-fragment.js +5 -9
- package/esm/rules/require-nullable-fields-with-oneof.d.mts +2 -2
- package/esm/rules/require-nullable-fields-with-oneof.js +1 -1
- package/esm/rules/require-nullable-result-in-root.d.mts +2 -2
- package/esm/rules/require-nullable-result-in-root.js +1 -1
- package/esm/rules/require-selections.d.mts +3 -3
- package/esm/rules/require-selections.js +2 -2
- package/esm/rules/require-type-pattern-with-oneof.d.mts +2 -2
- package/esm/rules/require-type-pattern-with-oneof.js +1 -1
- package/esm/rules/selection-set-depth.d.mts +3 -3
- package/esm/rules/selection-set-depth.js +1 -1
- package/esm/rules/strict-id-in-types.d.mts +3 -3
- package/esm/rules/strict-id-in-types.js +1 -1
- package/esm/rules/unique-enum-value-names.d.mts +2 -2
- package/esm/rules/unique-enum-value-names.js +1 -1
- package/esm/rules/unique-fragment-name.d.mts +1 -1
- package/esm/rules/unique-fragment-name.js +1 -1
- package/esm/rules/unique-operation-name.d.mts +2 -2
- package/esm/rules/unique-operation-name.js +1 -1
- package/esm/schema.d.mts +1 -1
- package/esm/schema.js +1 -1
- package/esm/siblings.d.mts +2 -2
- package/esm/siblings.js +1 -1
- package/esm/types.d.mts +4 -3
- package/esm/utils.d.mts +3 -3
- package/esm/utils.js +1 -1
- package/index.browser.mjs +721 -726
- package/package.json +5 -5
- /package/esm/{chunk-U3TKCM4X.js → chunk-UIAXBAMD.js} +0 -0
@@ -2,11 +2,11 @@ import { GraphQLESLintRule } from '../types.js';
|
|
2
2
|
import 'eslint';
|
3
3
|
import 'estree';
|
4
4
|
import 'graphql';
|
5
|
+
import 'graphql-config';
|
5
6
|
import 'json-schema-to-ts';
|
7
|
+
import '../estree-converter/types.js';
|
6
8
|
import '../siblings.js';
|
7
9
|
import '@graphql-tools/utils';
|
8
|
-
import '../estree-converter/types.js';
|
9
|
-
import 'graphql-config';
|
10
10
|
|
11
11
|
declare const rule: GraphQLESLintRule;
|
12
12
|
|
@@ -2,11 +2,11 @@ import { Kind } from 'graphql';
|
|
2
2
|
import { GraphQLESLintRule } from '../types.js';
|
3
3
|
import 'eslint';
|
4
4
|
import 'estree';
|
5
|
+
import 'graphql-config';
|
5
6
|
import 'json-schema-to-ts';
|
7
|
+
import '../estree-converter/types.js';
|
6
8
|
import '../siblings.js';
|
7
9
|
import '@graphql-tools/utils';
|
8
|
-
import '../estree-converter/types.js';
|
9
|
-
import 'graphql-config';
|
10
10
|
|
11
11
|
declare const RULE_ID = "require-description";
|
12
12
|
declare const ALLOWED_KINDS: readonly [Kind.OBJECT_TYPE_DEFINITION, Kind.INTERFACE_TYPE_DEFINITION, Kind.ENUM_TYPE_DEFINITION, Kind.SCALAR_TYPE_DEFINITION, Kind.INPUT_OBJECT_TYPE_DEFINITION, Kind.UNION_TYPE_DEFINITION, Kind.DIRECTIVE_DEFINITION, Kind.FIELD_DEFINITION, Kind.INPUT_VALUE_DEFINITION, Kind.ENUM_VALUE_DEFINITION, Kind.OPERATION_DEFINITION];
|
@@ -21,4 +21,4 @@ type RuleOptions = [
|
|
21
21
|
];
|
22
22
|
declare const rule: GraphQLESLintRule<RuleOptions>;
|
23
23
|
|
24
|
-
export { RULE_ID, RuleOptions, rule };
|
24
|
+
export { RULE_ID, type RuleOptions, rule };
|
@@ -19,7 +19,7 @@ __export(require_description_exports, {
|
|
19
19
|
rule: () => rule
|
20
20
|
});
|
21
21
|
module.exports = __toCommonJS(require_description_exports);
|
22
|
-
var
|
22
|
+
var import_graphql = require("graphql"), import_utils = require("@graphql-tools/utils"), import_utils2 = require("../utils.js");
|
23
23
|
const RULE_ID = "require-description", ALLOWED_KINDS = [
|
24
24
|
...import_utils2.TYPES_KINDS,
|
25
25
|
import_graphql.Kind.DIRECTIVE_DEFINITION,
|
@@ -2,11 +2,11 @@ import { GraphQLESLintRule } from '../types.js';
|
|
2
2
|
import 'eslint';
|
3
3
|
import 'estree';
|
4
4
|
import 'graphql';
|
5
|
+
import 'graphql-config';
|
5
6
|
import 'json-schema-to-ts';
|
7
|
+
import '../estree-converter/types.js';
|
6
8
|
import '../siblings.js';
|
7
9
|
import '@graphql-tools/utils';
|
8
|
-
import '../estree-converter/types.js';
|
9
|
-
import 'graphql-config';
|
10
10
|
|
11
11
|
declare const rule: GraphQLESLintRule;
|
12
12
|
|
@@ -2,11 +2,11 @@ import { GraphQLESLintRule } from '../types.js';
|
|
2
2
|
import 'eslint';
|
3
3
|
import 'estree';
|
4
4
|
import 'graphql';
|
5
|
+
import 'graphql-config';
|
5
6
|
import 'json-schema-to-ts';
|
7
|
+
import '../estree-converter/types.js';
|
6
8
|
import '../siblings.js';
|
7
9
|
import '@graphql-tools/utils';
|
8
|
-
import '../estree-converter/types.js';
|
9
|
-
import 'graphql-config';
|
10
10
|
|
11
11
|
declare const rule: GraphQLESLintRule;
|
12
12
|
|
@@ -108,21 +108,17 @@ const RULE_ID = "require-import-fragment", SUGGESTION_ID = "add-import-expressio
|
|
108
108
|
for (const comment of comments) {
|
109
109
|
if (comment.type !== "Line" || !new RegExp(
|
110
110
|
`^\\s*import\\s+(${fragmentName}\\s+from\\s+)?['"]`
|
111
|
-
).test(comment.value))
|
112
|
-
continue;
|
111
|
+
).test(comment.value)) continue;
|
113
112
|
const extractedImportPath = comment.value.match(/(["'])((?:\1|.)*?)\1/)?.[2];
|
114
|
-
if (!extractedImportPath)
|
115
|
-
continue;
|
113
|
+
if (!extractedImportPath) continue;
|
116
114
|
const importPath = import_node_path.default.join(import_node_path.default.dirname(filePath), extractedImportPath);
|
117
115
|
if (fragmentsFromSiblings.some(
|
118
116
|
(source) => source.filePath === importPath
|
119
|
-
))
|
120
|
-
return;
|
117
|
+
)) return;
|
121
118
|
}
|
122
119
|
if (fragmentsFromSiblings.some(
|
123
120
|
(source) => source.filePath === filePath
|
124
|
-
))
|
125
|
-
return;
|
121
|
+
)) return;
|
126
122
|
const suggestedFilePaths = fragmentsFromSiblings.length ? fragmentsFromSiblings.map((o) => import_node_path.default.relative(import_node_path.default.dirname(filePath), o.filePath)) : ["CHANGE_ME.graphql"];
|
127
123
|
context.report({
|
128
124
|
node,
|
@@ -2,11 +2,11 @@ import { GraphQLESLintRule } from '../types.js';
|
|
2
2
|
import 'eslint';
|
3
3
|
import 'estree';
|
4
4
|
import 'graphql';
|
5
|
+
import 'graphql-config';
|
5
6
|
import 'json-schema-to-ts';
|
7
|
+
import '../estree-converter/types.js';
|
6
8
|
import '../siblings.js';
|
7
9
|
import '@graphql-tools/utils';
|
8
|
-
import '../estree-converter/types.js';
|
9
|
-
import 'graphql-config';
|
10
10
|
|
11
11
|
declare const rule: GraphQLESLintRule;
|
12
12
|
|
@@ -2,11 +2,11 @@ import { GraphQLESLintRule } from '../types.js';
|
|
2
2
|
import 'eslint';
|
3
3
|
import 'estree';
|
4
4
|
import 'graphql';
|
5
|
+
import 'graphql-config';
|
5
6
|
import 'json-schema-to-ts';
|
7
|
+
import '../estree-converter/types.js';
|
6
8
|
import '../siblings.js';
|
7
9
|
import '@graphql-tools/utils';
|
8
|
-
import '../estree-converter/types.js';
|
9
|
-
import 'graphql-config';
|
10
10
|
|
11
11
|
declare const rule: GraphQLESLintRule;
|
12
12
|
|
@@ -3,10 +3,10 @@ import { GraphQLESLintRule } from '../types.js';
|
|
3
3
|
import 'eslint';
|
4
4
|
import 'estree';
|
5
5
|
import 'graphql';
|
6
|
+
import 'graphql-config';
|
7
|
+
import '../estree-converter/types.js';
|
6
8
|
import '../siblings.js';
|
7
9
|
import '@graphql-tools/utils';
|
8
|
-
import '../estree-converter/types.js';
|
9
|
-
import 'graphql-config';
|
10
10
|
|
11
11
|
declare const schema: {
|
12
12
|
readonly definitions: {
|
@@ -42,4 +42,4 @@ declare const schema: {
|
|
42
42
|
type RuleOptions = FromSchema<typeof schema>;
|
43
43
|
declare const rule: GraphQLESLintRule<RuleOptions, true>;
|
44
44
|
|
45
|
-
export { RuleOptions, rule };
|
45
|
+
export { type RuleOptions, rule };
|
@@ -18,7 +18,7 @@ __export(require_selections_exports, {
|
|
18
18
|
rule: () => rule
|
19
19
|
});
|
20
20
|
module.exports = __toCommonJS(require_selections_exports);
|
21
|
-
var
|
21
|
+
var import_graphql = require("graphql"), import_utils = require("@graphql-tools/utils"), import_estree_converter = require("../estree-converter/index.js"), import_utils2 = require("../utils.js");
|
22
22
|
const RULE_ID = "require-selections", DEFAULT_ID_FIELD_NAME = "id", schema = {
|
23
23
|
definitions: {
|
24
24
|
asString: {
|
@@ -2,11 +2,11 @@ import { GraphQLESLintRule } from '../types.js';
|
|
2
2
|
import 'eslint';
|
3
3
|
import 'estree';
|
4
4
|
import 'graphql';
|
5
|
+
import 'graphql-config';
|
5
6
|
import 'json-schema-to-ts';
|
7
|
+
import '../estree-converter/types.js';
|
6
8
|
import '../siblings.js';
|
7
9
|
import '@graphql-tools/utils';
|
8
|
-
import '../estree-converter/types.js';
|
9
|
-
import 'graphql-config';
|
10
10
|
|
11
11
|
declare const rule: GraphQLESLintRule;
|
12
12
|
|
@@ -3,10 +3,10 @@ import { GraphQLESLintRule } from '../types.js';
|
|
3
3
|
import 'eslint';
|
4
4
|
import 'estree';
|
5
5
|
import 'graphql';
|
6
|
+
import 'graphql-config';
|
7
|
+
import '../estree-converter/types.js';
|
6
8
|
import '../siblings.js';
|
7
9
|
import '@graphql-tools/utils';
|
8
|
-
import '../estree-converter/types.js';
|
9
|
-
import 'graphql-config';
|
10
10
|
|
11
11
|
declare const schema: {
|
12
12
|
readonly type: "array";
|
@@ -34,4 +34,4 @@ declare const schema: {
|
|
34
34
|
type RuleOptions = FromSchema<typeof schema>;
|
35
35
|
declare const rule: GraphQLESLintRule<RuleOptions>;
|
36
36
|
|
37
|
-
export { RuleOptions, rule };
|
37
|
+
export { type RuleOptions, rule };
|
@@ -3,10 +3,10 @@ import { GraphQLESLintRule } from '../types.js';
|
|
3
3
|
import 'eslint';
|
4
4
|
import 'estree';
|
5
5
|
import 'graphql';
|
6
|
+
import 'graphql-config';
|
7
|
+
import '../estree-converter/types.js';
|
6
8
|
import '../siblings.js';
|
7
9
|
import '@graphql-tools/utils';
|
8
|
-
import '../estree-converter/types.js';
|
9
|
-
import 'graphql-config';
|
10
10
|
|
11
11
|
declare const schema: {
|
12
12
|
readonly type: "array";
|
@@ -63,4 +63,4 @@ declare const schema: {
|
|
63
63
|
type RuleOptions = FromSchema<typeof schema>;
|
64
64
|
declare const rule: GraphQLESLintRule<RuleOptions>;
|
65
65
|
|
66
|
-
export { RuleOptions, rule };
|
66
|
+
export { type RuleOptions, rule };
|
@@ -2,11 +2,11 @@ import { GraphQLESLintRule } from '../types.js';
|
|
2
2
|
import 'eslint';
|
3
3
|
import 'estree';
|
4
4
|
import 'graphql';
|
5
|
+
import 'graphql-config';
|
5
6
|
import 'json-schema-to-ts';
|
7
|
+
import '../estree-converter/types.js';
|
6
8
|
import '../siblings.js';
|
7
9
|
import '@graphql-tools/utils';
|
8
|
-
import '../estree-converter/types.js';
|
9
|
-
import 'graphql-config';
|
10
10
|
|
11
11
|
declare const rule: GraphQLESLintRule;
|
12
12
|
|
@@ -3,10 +3,10 @@ import { GraphQLESTreeNode } from '../estree-converter/types.js';
|
|
3
3
|
import { GraphQLESLintRuleContext, GraphQLESLintRule } from '../types.js';
|
4
4
|
import 'eslint';
|
5
5
|
import 'estree';
|
6
|
+
import 'graphql-config';
|
6
7
|
import 'json-schema-to-ts';
|
7
8
|
import '../siblings.js';
|
8
9
|
import '@graphql-tools/utils';
|
9
|
-
import 'graphql-config';
|
10
10
|
|
11
11
|
declare const checkNode: (context: GraphQLESLintRuleContext, node: GraphQLESTreeNode<ExecutableDefinitionNode>, ruleId: string) => void;
|
12
12
|
declare const rule: GraphQLESLintRule;
|
@@ -2,11 +2,11 @@ import { GraphQLESLintRule } from '../types.js';
|
|
2
2
|
import 'eslint';
|
3
3
|
import 'estree';
|
4
4
|
import 'graphql';
|
5
|
+
import 'graphql-config';
|
5
6
|
import 'json-schema-to-ts';
|
7
|
+
import '../estree-converter/types.js';
|
6
8
|
import '../siblings.js';
|
7
9
|
import '@graphql-tools/utils';
|
8
|
-
import '../estree-converter/types.js';
|
9
|
-
import 'graphql-config';
|
10
10
|
|
11
11
|
declare const rule: GraphQLESLintRule;
|
12
12
|
|
package/cjs/schema.d.ts
CHANGED
@@ -4,9 +4,9 @@ import 'eslint';
|
|
4
4
|
import 'estree';
|
5
5
|
import 'graphql';
|
6
6
|
import 'json-schema-to-ts';
|
7
|
+
import './estree-converter/types.js';
|
7
8
|
import './siblings.js';
|
8
9
|
import '@graphql-tools/utils';
|
9
|
-
import './estree-converter/types.js';
|
10
10
|
|
11
11
|
declare function getSchema(project: GraphQLProjectConfig): Schema;
|
12
12
|
|
package/cjs/siblings.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { Source } from '@graphql-tools/utils';
|
2
1
|
import { FragmentDefinitionNode, OperationDefinitionNode, SelectionSetNode, OperationTypeNode } from 'graphql';
|
2
|
+
import { Source } from '@graphql-tools/utils';
|
3
3
|
|
4
4
|
type FragmentSource = {
|
5
5
|
filePath: string;
|
@@ -21,4 +21,4 @@ type SiblingOperations = {
|
|
21
21
|
};
|
22
22
|
declare function getSiblings(documents: Source[]): SiblingOperations;
|
23
23
|
|
24
|
-
export { FragmentSource, OperationSource, SiblingOperations, getSiblings };
|
24
|
+
export { type FragmentSource, type OperationSource, type SiblingOperations, getSiblings };
|
package/cjs/types.d.ts
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
import { Linter, Rule, AST } from 'eslint';
|
2
2
|
import * as ESTree from 'estree';
|
3
3
|
import { GraphQLSchema, ASTKindToNode } from 'graphql';
|
4
|
+
import { IGraphQLConfig } from 'graphql-config';
|
4
5
|
import { JSONSchema } from 'json-schema-to-ts';
|
5
|
-
import { SiblingOperations } from './siblings.js';
|
6
6
|
import { GraphQLESTreeNode } from './estree-converter/types.js';
|
7
|
-
import {
|
7
|
+
import { SiblingOperations } from './siblings.js';
|
8
8
|
import '@graphql-tools/utils';
|
9
9
|
|
10
10
|
type Schema = GraphQLSchema | null;
|
11
11
|
type Pointer = string | string[];
|
12
|
+
|
12
13
|
interface ParserOptions {
|
13
14
|
graphQLConfig?: IGraphQLConfig;
|
14
15
|
filePath: string;
|
@@ -72,4 +73,4 @@ type OmitRecursively<T extends object, K extends PropertyKey> = Omit<{
|
|
72
73
|
}, K>;
|
73
74
|
type ConfigName = 'operations-all' | 'operations-recommended' | 'schema-all' | 'schema-recommended' | 'schema-relay';
|
74
75
|
|
75
|
-
export { CategoryType, ConfigName, GraphQLESLintParseResult, GraphQLESLintRule, GraphQLESLintRuleContext, GraphQLESLintRuleListener, OmitRecursively, ParserOptions, ParserServices, Pointer, ReportDescriptor, RuleDocsInfo, Schema, ValueOf };
|
76
|
+
export { type CategoryType, type ConfigName, type GraphQLESLintParseResult, type GraphQLESLintRule, type GraphQLESLintRuleContext, type GraphQLESLintRuleListener, GraphQLESTreeNode, type OmitRecursively, type ParserOptions, type ParserServices, type Pointer, type ReportDescriptor, type RuleDocsInfo, type Schema, type ValueOf };
|
package/cjs/utils.d.ts
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
import { AST } from 'eslint';
|
2
2
|
import { Position } from 'estree';
|
3
3
|
import { GraphQLSchema, ASTNode, Kind } from 'graphql';
|
4
|
+
import { GraphQLESTreeNode } from './estree-converter/types.js';
|
4
5
|
import { SiblingOperations } from './siblings.js';
|
5
6
|
import { GraphQLESLintRuleContext } from './types.js';
|
6
|
-
import { GraphQLESTreeNode } from './estree-converter/types.js';
|
7
7
|
import '@graphql-tools/utils';
|
8
|
-
import 'json-schema-to-ts';
|
9
8
|
import 'graphql-config';
|
9
|
+
import 'json-schema-to-ts';
|
10
10
|
|
11
11
|
declare function requireSiblingsOperations(ruleId: string, context: GraphQLESLintRuleContext): SiblingOperations | never;
|
12
12
|
declare function requireGraphQLSchemaFromContext(ruleId: string, context: GraphQLESLintRuleContext): GraphQLSchema | never;
|
@@ -42,4 +42,4 @@ declare function truthy<T>(value: T): value is Truthy<T>;
|
|
42
42
|
declare function displayNodeName(node: GraphQLESTreeNode<ASTNode>): string;
|
43
43
|
declare function getNodeName(node: GraphQLESTreeNode<ASTNode>): string;
|
44
44
|
|
45
|
-
export { ARRAY_DEFAULT_OPTIONS, CWD, CaseStyle, REPORT_ON_FIRST_CHARACTER, TYPES_KINDS, VIRTUAL_DOCUMENT_REGEX, camelCase, convertCase, displayNodeName, englishJoinWords, getLocation, getNodeName, getTypeName, logger, normalizePath, pascalCase, requireGraphQLSchemaFromContext, requireSiblingsOperations, truthy };
|
45
|
+
export { ARRAY_DEFAULT_OPTIONS, CWD, type CaseStyle, REPORT_ON_FIRST_CHARACTER, TYPES_KINDS, VIRTUAL_DOCUMENT_REGEX, camelCase, convertCase, displayNodeName, englishJoinWords, getLocation, getNodeName, getTypeName, logger, normalizePath, pascalCase, requireGraphQLSchemaFromContext, requireSiblingsOperations, truthy };
|
package/esm/cache.js
CHANGED
package/esm/configs/index.js
CHANGED
package/esm/documents.d.mts
CHANGED
package/esm/documents.js
CHANGED
package/esm/flat-configs.d.mts
CHANGED
@@ -3,11 +3,11 @@ import './types.mjs';
|
|
3
3
|
import 'eslint';
|
4
4
|
import 'estree';
|
5
5
|
import 'graphql';
|
6
|
+
import 'graphql-config';
|
6
7
|
import 'json-schema-to-ts';
|
8
|
+
import './estree-converter/types.mjs';
|
7
9
|
import './siblings.mjs';
|
8
10
|
import '@graphql-tools/utils';
|
9
|
-
import './estree-converter/types.mjs';
|
10
|
-
import 'graphql-config';
|
11
11
|
|
12
12
|
declare const flatConfigs: {
|
13
13
|
'operations-all': {
|
package/esm/flat-configs.js
CHANGED
package/esm/graphql-config.d.mts
CHANGED
@@ -4,9 +4,9 @@ import 'eslint';
|
|
4
4
|
import 'estree';
|
5
5
|
import 'graphql';
|
6
6
|
import 'json-schema-to-ts';
|
7
|
+
import './estree-converter/types.mjs';
|
7
8
|
import './siblings.mjs';
|
8
9
|
import '@graphql-tools/utils';
|
9
|
-
import './estree-converter/types.mjs';
|
10
10
|
|
11
11
|
declare function loadOnDiskGraphQLConfig(filePath: string): GraphQLConfig;
|
12
12
|
declare function loadGraphQLConfig({ graphQLConfig: config, filePath, }: ParserOptions): GraphQLConfig;
|
package/esm/graphql-config.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
import "./chunk-
|
1
|
+
import "./chunk-UIAXBAMD.js";
|
2
2
|
import path from "node:path";
|
3
|
-
import { CodeFileLoader } from "@graphql-tools/code-file-loader";
|
4
3
|
import debugFactory from "debug";
|
5
4
|
import { GraphQLConfig, loadConfigSync } from "graphql-config";
|
5
|
+
import { CodeFileLoader } from "@graphql-tools/code-file-loader";
|
6
6
|
const debug = debugFactory("graphql-eslint:graphql-config");
|
7
7
|
let graphQLConfig;
|
8
8
|
function loadOnDiskGraphQLConfig(filePath) {
|
package/esm/index.d.mts
CHANGED
@@ -6,16 +6,14 @@ export { CategoryType, ConfigName, GraphQLESLintParseResult, GraphQLESLintRule,
|
|
6
6
|
export { requireGraphQLSchemaFromContext, requireSiblingsOperations } from './utils.mjs';
|
7
7
|
export { configs } from './configs/index.mjs';
|
8
8
|
export { flatConfigs } from './flat-configs.mjs';
|
9
|
+
export { GraphQLESTreeNode } from './estree-converter/types.mjs';
|
9
10
|
import './rules/require-description.mjs';
|
10
11
|
import 'graphql';
|
11
|
-
import 'graphql/language/ast.js';
|
12
|
-
import 'json-schema-to-ts/lib/types/type-utils/writable.js';
|
13
12
|
import 'estree';
|
13
|
+
import 'graphql-config';
|
14
14
|
import 'json-schema-to-ts';
|
15
15
|
import './siblings.mjs';
|
16
16
|
import '@graphql-tools/utils';
|
17
|
-
import './estree-converter/types.mjs';
|
18
|
-
import 'graphql-config';
|
19
17
|
|
20
18
|
declare const processors: {
|
21
19
|
graphql: {
|
package/esm/index.js
CHANGED
package/esm/parser.d.mts
CHANGED
@@ -2,11 +2,11 @@ import { ParserOptions, GraphQLESLintParseResult } from './types.mjs';
|
|
2
2
|
import 'eslint';
|
3
3
|
import 'estree';
|
4
4
|
import 'graphql';
|
5
|
+
import 'graphql-config';
|
5
6
|
import 'json-schema-to-ts';
|
7
|
+
import './estree-converter/types.mjs';
|
6
8
|
import './siblings.mjs';
|
7
9
|
import '@graphql-tools/utils';
|
8
|
-
import './estree-converter/types.mjs';
|
9
|
-
import 'graphql-config';
|
10
10
|
|
11
11
|
declare function parseForESLint(code: string, options: ParserOptions): GraphQLESLintParseResult;
|
12
12
|
|
package/esm/parser.js
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
import "./chunk-
|
2
|
-
import { parseGraphQLSDL } from "@graphql-tools/utils";
|
1
|
+
import "./chunk-UIAXBAMD.js";
|
3
2
|
import debugFactory from "debug";
|
4
3
|
import { GraphQLError } from "graphql";
|
4
|
+
import { parseGraphQLSDL } from "@graphql-tools/utils";
|
5
|
+
import { getDocuments } from "./documents.js";
|
5
6
|
import { convertToESTree, extractComments, extractTokens } from "./estree-converter/index.js";
|
6
7
|
import { loadGraphQLConfig } from "./graphql-config.js";
|
7
8
|
import { getSchema } from "./schema.js";
|
8
9
|
import { getSiblings } from "./siblings.js";
|
9
10
|
import { CWD, VIRTUAL_DOCUMENT_REGEX } from "./utils.js";
|
10
|
-
import { getDocuments } from "./documents.js";
|
11
11
|
const debug = debugFactory("graphql-eslint:parser");
|
12
12
|
debug("cwd %o", CWD);
|
13
13
|
const LEGACY_PARSER_OPTIONS_KEYS = [
|
package/esm/processor.d.mts
CHANGED
package/esm/processor.js
CHANGED
@@ -3,10 +3,10 @@ import { GraphQLESLintRule } from '../types.mjs';
|
|
3
3
|
import 'eslint';
|
4
4
|
import 'estree';
|
5
5
|
import 'graphql';
|
6
|
+
import 'graphql-config';
|
7
|
+
import '../estree-converter/types.mjs';
|
6
8
|
import '../siblings.mjs';
|
7
9
|
import '@graphql-tools/utils';
|
8
|
-
import '../estree-converter/types.mjs';
|
9
|
-
import 'graphql-config';
|
10
10
|
|
11
11
|
declare const schema: {
|
12
12
|
readonly type: "array";
|
@@ -71,4 +71,4 @@ declare const schema: {
|
|
71
71
|
type RuleOptions = FromSchema<typeof schema>;
|
72
72
|
declare const rule: GraphQLESLintRule<RuleOptions>;
|
73
73
|
|
74
|
-
export { RuleOptions, rule };
|
74
|
+
export { type RuleOptions, rule };
|
package/esm/rules/alphabetize.js
CHANGED
@@ -3,10 +3,10 @@ import { GraphQLESLintRule } from '../types.mjs';
|
|
3
3
|
import 'eslint';
|
4
4
|
import 'estree';
|
5
5
|
import 'graphql';
|
6
|
+
import 'graphql-config';
|
7
|
+
import '../estree-converter/types.mjs';
|
6
8
|
import '../siblings.mjs';
|
7
9
|
import '@graphql-tools/utils';
|
8
|
-
import '../estree-converter/types.mjs';
|
9
|
-
import 'graphql-config';
|
10
10
|
|
11
11
|
declare const schema: {
|
12
12
|
readonly type: "array";
|
@@ -26,4 +26,4 @@ declare const schema: {
|
|
26
26
|
type RuleOptions = FromSchema<typeof schema>;
|
27
27
|
declare const rule: GraphQLESLintRule<RuleOptions>;
|
28
28
|
|
29
|
-
export { RuleOptions, rule };
|
29
|
+
export { type RuleOptions, rule };
|
@@ -2,11 +2,11 @@ import { GraphQLESLintRule } from '../types.mjs';
|
|
2
2
|
import 'eslint';
|
3
3
|
import 'estree';
|
4
4
|
import 'graphql';
|
5
|
+
import 'graphql-config';
|
5
6
|
import 'json-schema-to-ts';
|
7
|
+
import '../estree-converter/types.mjs';
|
6
8
|
import '../siblings.mjs';
|
7
9
|
import '@graphql-tools/utils';
|
8
|
-
import '../estree-converter/types.mjs';
|
9
|
-
import 'graphql-config';
|
10
10
|
|
11
11
|
declare const GRAPHQL_JS_VALIDATIONS: Record<string, GraphQLESLintRule>;
|
12
12
|
|