@graphql-eslint/eslint-plugin 3.16.2-alpha-20230322112454-cb28ba7 → 3.16.2-alpha-20230322142004-517b0c3
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/utils.js +1 -0
- package/esm/utils.js +1 -0
- package/package.json +1 -1
- package/typings/estree-converter/converter.d.cts +1 -1
- package/typings/estree-converter/converter.d.ts +1 -1
- package/typings/rules/index.d.cts +29 -29
- package/typings/rules/index.d.ts +29 -29
- package/typings/utils.d.cts +2 -1
- package/typings/utils.d.ts +2 -1
package/cjs/utils.js
CHANGED
package/esm/utils.js
CHANGED
package/package.json
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
import { DocumentNode, GraphQLSchema } from 'graphql';
|
2
2
|
import { GraphQLESTreeNode } from './types.cjs';
|
3
|
-
export declare function convertToESTree<T extends DocumentNode>(node: T, schema?: GraphQLSchema | null): GraphQLESTreeNode<T
|
3
|
+
export declare function convertToESTree<T extends DocumentNode>(node: T, schema?: GraphQLSchema | null): GraphQLESTreeNode<T>;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { DocumentNode, GraphQLSchema } from 'graphql';
|
2
2
|
import { GraphQLESTreeNode } from './types.js';
|
3
|
-
export declare function convertToESTree<T extends DocumentNode>(node: T, schema?: GraphQLSchema | null): GraphQLESTreeNode<T
|
3
|
+
export declare function convertToESTree<T extends DocumentNode>(node: T, schema?: GraphQLSchema | null): GraphQLESTreeNode<T>;
|
@@ -7,19 +7,19 @@ export declare const rules: {
|
|
7
7
|
fields?: import("json-schema-to-ts/lib/types/type-utils/writable.js").DeepWritable<"ObjectTypeDefinition" | "InterfaceTypeDefinition" | "InputObjectTypeDefinition">[] | undefined;
|
8
8
|
variables?: "OperationDefinition"[] | undefined;
|
9
9
|
groups?: string[] | undefined;
|
10
|
-
}[]
|
10
|
+
}[]>;
|
11
11
|
'description-style': import("../types.js").GraphQLESLintRule<{
|
12
12
|
style?: "block" | "inline" | undefined;
|
13
|
-
}[]
|
13
|
+
}[]>;
|
14
14
|
'input-name': import("../types.js").GraphQLESLintRule<{
|
15
15
|
checkInputType?: boolean | undefined;
|
16
16
|
caseSensitiveInputType?: boolean | undefined;
|
17
17
|
checkQueries?: boolean | undefined;
|
18
18
|
checkMutations?: boolean | undefined;
|
19
|
-
}[]
|
19
|
+
}[]>;
|
20
20
|
'lone-executable-definition': import("../types.js").GraphQLESLintRule<{
|
21
21
|
ignore?: ("fragment" | "query" | "mutation" | "subscription")[] | undefined;
|
22
|
-
}[]
|
22
|
+
}[]>;
|
23
23
|
'match-document-filename': import("../types.js").GraphQLESLintRule<{
|
24
24
|
fragment?: import("json-schema-to-ts/lib/types/type-utils/writable.js").DeepWritable<import("../utils.js").CaseStyle | "matchDocumentStyle"> | {
|
25
25
|
style?: import("json-schema-to-ts/lib/types/type-utils/writable.js").DeepWritable<import("../utils.js").CaseStyle | "matchDocumentStyle"> | undefined;
|
@@ -42,7 +42,7 @@ export declare const rules: {
|
|
42
42
|
prefix?: string | undefined;
|
43
43
|
} | undefined;
|
44
44
|
fileExtension?: ".gql" | ".graphql" | undefined;
|
45
|
-
}[]
|
45
|
+
}[]>;
|
46
46
|
'naming-convention': import("../types.js").GraphQLESLintRule<{
|
47
47
|
[x: string]: unknown;
|
48
48
|
types?: import("json-schema-to-ts/lib/types/type-utils/writable.js").DeepWritable<"camelCase" | "PascalCase" | "snake_case" | "UPPER_CASE"> | {
|
@@ -55,46 +55,46 @@ export declare const rules: {
|
|
55
55
|
} | undefined;
|
56
56
|
allowLeadingUnderscore?: boolean | undefined;
|
57
57
|
allowTrailingUnderscore?: boolean | undefined;
|
58
|
-
}[]
|
59
|
-
'no-anonymous-operations': import("../types.js").GraphQLESLintRule
|
60
|
-
'no-case-insensitive-enum-values-duplicates': import("../types.js").GraphQLESLintRule
|
58
|
+
}[]>;
|
59
|
+
'no-anonymous-operations': import("../types.js").GraphQLESLintRule;
|
60
|
+
'no-case-insensitive-enum-values-duplicates': import("../types.js").GraphQLESLintRule;
|
61
61
|
'no-deprecated': import("../types.js").GraphQLESLintRule<[], true>;
|
62
|
-
'no-duplicate-fields': import("../types.js").GraphQLESLintRule
|
63
|
-
'no-hashtag-description': import("../types.js").GraphQLESLintRule
|
64
|
-
'no-one-place-fragments': import("../types.js").GraphQLESLintRule
|
62
|
+
'no-duplicate-fields': import("../types.js").GraphQLESLintRule;
|
63
|
+
'no-hashtag-description': import("../types.js").GraphQLESLintRule;
|
64
|
+
'no-one-place-fragments': import("../types.js").GraphQLESLintRule;
|
65
65
|
'no-root-type': import("../types.js").GraphQLESLintRule<{
|
66
66
|
disallow: ("mutation" | "subscription")[];
|
67
|
-
}[]
|
68
|
-
'no-scalar-result-type-on-mutation': import("../types.js").GraphQLESLintRule
|
69
|
-
'no-typename-prefix': import("../types.js").GraphQLESLintRule
|
70
|
-
'no-unreachable-types': import("../types.js").GraphQLESLintRule
|
71
|
-
'no-unused-fields': import("../types.js").GraphQLESLintRule
|
67
|
+
}[]>;
|
68
|
+
'no-scalar-result-type-on-mutation': import("../types.js").GraphQLESLintRule;
|
69
|
+
'no-typename-prefix': import("../types.js").GraphQLESLintRule;
|
70
|
+
'no-unreachable-types': import("../types.js").GraphQLESLintRule;
|
71
|
+
'no-unused-fields': import("../types.js").GraphQLESLintRule;
|
72
72
|
'relay-arguments': import("../types.js").GraphQLESLintRule<{
|
73
73
|
includeBoth?: boolean | undefined;
|
74
74
|
}[], true>;
|
75
|
-
'relay-connection-types': import("../types.js").GraphQLESLintRule
|
75
|
+
'relay-connection-types': import("../types.js").GraphQLESLintRule;
|
76
76
|
'relay-edge-types': import("../types.js").GraphQLESLintRule<{
|
77
77
|
withEdgeSuffix?: boolean | undefined;
|
78
78
|
shouldImplementNode?: boolean | undefined;
|
79
79
|
listTypeCanWrapOnlyEdgeType?: boolean | undefined;
|
80
80
|
}[], true>;
|
81
|
-
'relay-page-info': import("../types.js").GraphQLESLintRule
|
81
|
+
'relay-page-info': import("../types.js").GraphQLESLintRule;
|
82
82
|
'require-deprecation-date': import("../types.js").GraphQLESLintRule<{
|
83
83
|
argumentName?: string | undefined;
|
84
|
-
}[]
|
85
|
-
'require-deprecation-reason': import("../types.js").GraphQLESLintRule
|
86
|
-
'require-description': import("../types.js").GraphQLESLintRule<import("./require-description.js").RuleOptions
|
87
|
-
'require-field-of-type-query-in-mutation-result': import("../types.js").GraphQLESLintRule
|
84
|
+
}[]>;
|
85
|
+
'require-deprecation-reason': import("../types.js").GraphQLESLintRule;
|
86
|
+
'require-description': import("../types.js").GraphQLESLintRule<import("./require-description.js").RuleOptions>;
|
87
|
+
'require-field-of-type-query-in-mutation-result': import("../types.js").GraphQLESLintRule;
|
88
88
|
'require-id-when-available': import("../types.js").GraphQLESLintRule<{
|
89
89
|
fieldName?: string | string[] | undefined;
|
90
90
|
}[], true>;
|
91
|
-
'require-import-fragment': import("../types.js").GraphQLESLintRule
|
92
|
-
'require-nullable-fields-with-oneof': import("../types.js").GraphQLESLintRule
|
93
|
-
'require-type-pattern-with-oneof': import("../types.js").GraphQLESLintRule
|
91
|
+
'require-import-fragment': import("../types.js").GraphQLESLintRule;
|
92
|
+
'require-nullable-fields-with-oneof': import("../types.js").GraphQLESLintRule;
|
93
|
+
'require-type-pattern-with-oneof': import("../types.js").GraphQLESLintRule;
|
94
94
|
'selection-set-depth': import("../types.js").GraphQLESLintRule<{
|
95
95
|
ignore?: string[] | undefined;
|
96
96
|
maxDepth: number;
|
97
|
-
}[]
|
97
|
+
}[]>;
|
98
98
|
'strict-id-in-types': import("../types.js").GraphQLESLintRule<{
|
99
99
|
acceptedIdNames?: string[] | undefined;
|
100
100
|
acceptedIdTypes?: string[] | undefined;
|
@@ -102,7 +102,7 @@ export declare const rules: {
|
|
102
102
|
types?: string[] | undefined;
|
103
103
|
suffixes?: string[] | undefined;
|
104
104
|
} | undefined;
|
105
|
-
}[]
|
106
|
-
'unique-fragment-name': import("../types.js").GraphQLESLintRule
|
107
|
-
'unique-operation-name': import("../types.js").GraphQLESLintRule
|
105
|
+
}[]>;
|
106
|
+
'unique-fragment-name': import("../types.js").GraphQLESLintRule;
|
107
|
+
'unique-operation-name': import("../types.js").GraphQLESLintRule;
|
108
108
|
};
|
package/typings/rules/index.d.ts
CHANGED
@@ -7,19 +7,19 @@ export declare const rules: {
|
|
7
7
|
fields?: import("json-schema-to-ts/lib/types/type-utils/writable.js").DeepWritable<"ObjectTypeDefinition" | "InterfaceTypeDefinition" | "InputObjectTypeDefinition">[] | undefined;
|
8
8
|
variables?: "OperationDefinition"[] | undefined;
|
9
9
|
groups?: string[] | undefined;
|
10
|
-
}[]
|
10
|
+
}[]>;
|
11
11
|
'description-style': import("../types.js").GraphQLESLintRule<{
|
12
12
|
style?: "block" | "inline" | undefined;
|
13
|
-
}[]
|
13
|
+
}[]>;
|
14
14
|
'input-name': import("../types.js").GraphQLESLintRule<{
|
15
15
|
checkInputType?: boolean | undefined;
|
16
16
|
caseSensitiveInputType?: boolean | undefined;
|
17
17
|
checkQueries?: boolean | undefined;
|
18
18
|
checkMutations?: boolean | undefined;
|
19
|
-
}[]
|
19
|
+
}[]>;
|
20
20
|
'lone-executable-definition': import("../types.js").GraphQLESLintRule<{
|
21
21
|
ignore?: ("fragment" | "query" | "mutation" | "subscription")[] | undefined;
|
22
|
-
}[]
|
22
|
+
}[]>;
|
23
23
|
'match-document-filename': import("../types.js").GraphQLESLintRule<{
|
24
24
|
fragment?: import("json-schema-to-ts/lib/types/type-utils/writable.js").DeepWritable<import("../utils.js").CaseStyle | "matchDocumentStyle"> | {
|
25
25
|
style?: import("json-schema-to-ts/lib/types/type-utils/writable.js").DeepWritable<import("../utils.js").CaseStyle | "matchDocumentStyle"> | undefined;
|
@@ -42,7 +42,7 @@ export declare const rules: {
|
|
42
42
|
prefix?: string | undefined;
|
43
43
|
} | undefined;
|
44
44
|
fileExtension?: ".gql" | ".graphql" | undefined;
|
45
|
-
}[]
|
45
|
+
}[]>;
|
46
46
|
'naming-convention': import("../types.js").GraphQLESLintRule<{
|
47
47
|
[x: string]: unknown;
|
48
48
|
types?: import("json-schema-to-ts/lib/types/type-utils/writable.js").DeepWritable<"camelCase" | "PascalCase" | "snake_case" | "UPPER_CASE"> | {
|
@@ -55,46 +55,46 @@ export declare const rules: {
|
|
55
55
|
} | undefined;
|
56
56
|
allowLeadingUnderscore?: boolean | undefined;
|
57
57
|
allowTrailingUnderscore?: boolean | undefined;
|
58
|
-
}[]
|
59
|
-
'no-anonymous-operations': import("../types.js").GraphQLESLintRule
|
60
|
-
'no-case-insensitive-enum-values-duplicates': import("../types.js").GraphQLESLintRule
|
58
|
+
}[]>;
|
59
|
+
'no-anonymous-operations': import("../types.js").GraphQLESLintRule;
|
60
|
+
'no-case-insensitive-enum-values-duplicates': import("../types.js").GraphQLESLintRule;
|
61
61
|
'no-deprecated': import("../types.js").GraphQLESLintRule<[], true>;
|
62
|
-
'no-duplicate-fields': import("../types.js").GraphQLESLintRule
|
63
|
-
'no-hashtag-description': import("../types.js").GraphQLESLintRule
|
64
|
-
'no-one-place-fragments': import("../types.js").GraphQLESLintRule
|
62
|
+
'no-duplicate-fields': import("../types.js").GraphQLESLintRule;
|
63
|
+
'no-hashtag-description': import("../types.js").GraphQLESLintRule;
|
64
|
+
'no-one-place-fragments': import("../types.js").GraphQLESLintRule;
|
65
65
|
'no-root-type': import("../types.js").GraphQLESLintRule<{
|
66
66
|
disallow: ("mutation" | "subscription")[];
|
67
|
-
}[]
|
68
|
-
'no-scalar-result-type-on-mutation': import("../types.js").GraphQLESLintRule
|
69
|
-
'no-typename-prefix': import("../types.js").GraphQLESLintRule
|
70
|
-
'no-unreachable-types': import("../types.js").GraphQLESLintRule
|
71
|
-
'no-unused-fields': import("../types.js").GraphQLESLintRule
|
67
|
+
}[]>;
|
68
|
+
'no-scalar-result-type-on-mutation': import("../types.js").GraphQLESLintRule;
|
69
|
+
'no-typename-prefix': import("../types.js").GraphQLESLintRule;
|
70
|
+
'no-unreachable-types': import("../types.js").GraphQLESLintRule;
|
71
|
+
'no-unused-fields': import("../types.js").GraphQLESLintRule;
|
72
72
|
'relay-arguments': import("../types.js").GraphQLESLintRule<{
|
73
73
|
includeBoth?: boolean | undefined;
|
74
74
|
}[], true>;
|
75
|
-
'relay-connection-types': import("../types.js").GraphQLESLintRule
|
75
|
+
'relay-connection-types': import("../types.js").GraphQLESLintRule;
|
76
76
|
'relay-edge-types': import("../types.js").GraphQLESLintRule<{
|
77
77
|
withEdgeSuffix?: boolean | undefined;
|
78
78
|
shouldImplementNode?: boolean | undefined;
|
79
79
|
listTypeCanWrapOnlyEdgeType?: boolean | undefined;
|
80
80
|
}[], true>;
|
81
|
-
'relay-page-info': import("../types.js").GraphQLESLintRule
|
81
|
+
'relay-page-info': import("../types.js").GraphQLESLintRule;
|
82
82
|
'require-deprecation-date': import("../types.js").GraphQLESLintRule<{
|
83
83
|
argumentName?: string | undefined;
|
84
|
-
}[]
|
85
|
-
'require-deprecation-reason': import("../types.js").GraphQLESLintRule
|
86
|
-
'require-description': import("../types.js").GraphQLESLintRule<import("./require-description.js").RuleOptions
|
87
|
-
'require-field-of-type-query-in-mutation-result': import("../types.js").GraphQLESLintRule
|
84
|
+
}[]>;
|
85
|
+
'require-deprecation-reason': import("../types.js").GraphQLESLintRule;
|
86
|
+
'require-description': import("../types.js").GraphQLESLintRule<import("./require-description.js").RuleOptions>;
|
87
|
+
'require-field-of-type-query-in-mutation-result': import("../types.js").GraphQLESLintRule;
|
88
88
|
'require-id-when-available': import("../types.js").GraphQLESLintRule<{
|
89
89
|
fieldName?: string | string[] | undefined;
|
90
90
|
}[], true>;
|
91
|
-
'require-import-fragment': import("../types.js").GraphQLESLintRule
|
92
|
-
'require-nullable-fields-with-oneof': import("../types.js").GraphQLESLintRule
|
93
|
-
'require-type-pattern-with-oneof': import("../types.js").GraphQLESLintRule
|
91
|
+
'require-import-fragment': import("../types.js").GraphQLESLintRule;
|
92
|
+
'require-nullable-fields-with-oneof': import("../types.js").GraphQLESLintRule;
|
93
|
+
'require-type-pattern-with-oneof': import("../types.js").GraphQLESLintRule;
|
94
94
|
'selection-set-depth': import("../types.js").GraphQLESLintRule<{
|
95
95
|
ignore?: string[] | undefined;
|
96
96
|
maxDepth: number;
|
97
|
-
}[]
|
97
|
+
}[]>;
|
98
98
|
'strict-id-in-types': import("../types.js").GraphQLESLintRule<{
|
99
99
|
acceptedIdNames?: string[] | undefined;
|
100
100
|
acceptedIdTypes?: string[] | undefined;
|
@@ -102,7 +102,7 @@ export declare const rules: {
|
|
102
102
|
types?: string[] | undefined;
|
103
103
|
suffixes?: string[] | undefined;
|
104
104
|
} | undefined;
|
105
|
-
}[]
|
106
|
-
'unique-fragment-name': import("../types.js").GraphQLESLintRule
|
107
|
-
'unique-operation-name': import("../types.js").GraphQLESLintRule
|
105
|
+
}[]>;
|
106
|
+
'unique-fragment-name': import("../types.js").GraphQLESLintRule;
|
107
|
+
'unique-operation-name': import("../types.js").GraphQLESLintRule;
|
108
108
|
};
|
package/typings/utils.d.cts
CHANGED
@@ -3,6 +3,7 @@ import { Position } from 'estree';
|
|
3
3
|
import { ASTNode, GraphQLSchema, Kind } from 'graphql';
|
4
4
|
import { SiblingOperations } from './siblings.cjs';
|
5
5
|
import { GraphQLESLintRuleContext } from './types.cjs';
|
6
|
+
import { GraphQLESTreeNode } from './estree-converter/index.cjs';
|
6
7
|
export declare function requireSiblingsOperations(ruleId: string, context: GraphQLESLintRuleContext): SiblingOperations | never;
|
7
8
|
export declare function requireGraphQLSchemaFromContext(ruleId: string, context: GraphQLESLintRuleContext): GraphQLSchema | never;
|
8
9
|
export declare const logger: {
|
@@ -35,5 +36,5 @@ export declare const ARRAY_DEFAULT_OPTIONS: {
|
|
35
36
|
export declare const englishJoinWords: (words: string[]) => string;
|
36
37
|
type Truthy<T> = T extends '' | 0 | false | null | undefined ? never : T;
|
37
38
|
export declare function truthy<T>(value: T): value is Truthy<T>;
|
38
|
-
export declare function getNodeName(node:
|
39
|
+
export declare function getNodeName(node: GraphQLESTreeNode<ASTNode>): string;
|
39
40
|
export {};
|
package/typings/utils.d.ts
CHANGED
@@ -3,6 +3,7 @@ import { Position } from 'estree';
|
|
3
3
|
import { ASTNode, GraphQLSchema, Kind } from 'graphql';
|
4
4
|
import { SiblingOperations } from './siblings.js';
|
5
5
|
import { GraphQLESLintRuleContext } from './types.js';
|
6
|
+
import { GraphQLESTreeNode } from './estree-converter/index.js';
|
6
7
|
export declare function requireSiblingsOperations(ruleId: string, context: GraphQLESLintRuleContext): SiblingOperations | never;
|
7
8
|
export declare function requireGraphQLSchemaFromContext(ruleId: string, context: GraphQLESLintRuleContext): GraphQLSchema | never;
|
8
9
|
export declare const logger: {
|
@@ -35,5 +36,5 @@ export declare const ARRAY_DEFAULT_OPTIONS: {
|
|
35
36
|
export declare const englishJoinWords: (words: string[]) => string;
|
36
37
|
type Truthy<T> = T extends '' | 0 | false | null | undefined ? never : T;
|
37
38
|
export declare function truthy<T>(value: T): value is Truthy<T>;
|
38
|
-
export declare function getNodeName(node:
|
39
|
+
export declare function getNodeName(node: GraphQLESTreeNode<ASTNode>): string;
|
39
40
|
export {};
|