@graphql-eslint/eslint-plugin 3.14.0-alpha-20221222211539-5e993f5 → 3.14.0-alpha-20221223011700-eed94bd
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/configs/index.js +10 -10
- package/cjs/documents.js +5 -5
- package/cjs/estree-converter/converter.js +2 -2
- package/cjs/estree-converter/index.js +3 -3
- package/cjs/estree-converter/utils.js +2 -2
- package/cjs/flat-configs.js +36 -0
- package/cjs/index.js +16 -14
- package/cjs/parser.js +13 -13
- package/cjs/processor.js +2 -2
- package/cjs/rules/alphabetize.js +7 -7
- package/cjs/rules/graphql-js-validation.js +9 -9
- package/cjs/rules/index.js +66 -66
- package/cjs/rules/lone-executable-definition.js +4 -4
- package/cjs/rules/match-document-filename.js +4 -4
- package/cjs/rules/naming-convention.js +6 -6
- package/cjs/rules/no-anonymous-operations.js +2 -2
- package/cjs/rules/no-deprecated.js +2 -2
- package/cjs/rules/no-one-place-fragments.js +3 -4
- package/cjs/rules/no-root-type.js +3 -3
- package/cjs/rules/no-scalar-result-type-on-mutation.js +2 -2
- package/cjs/rules/no-unreachable-types.js +3 -3
- package/cjs/rules/no-unused-fields.js +3 -3
- package/cjs/rules/relay-arguments.js +2 -2
- package/cjs/rules/relay-edge-types.js +6 -6
- package/cjs/rules/relay-page-info.js +5 -5
- package/cjs/rules/require-deprecation-date.js +2 -2
- package/cjs/rules/require-deprecation-reason.js +2 -2
- package/cjs/rules/require-description.js +8 -8
- package/cjs/rules/require-field-of-type-query-in-mutation-result.js +3 -3
- package/cjs/rules/require-id-when-available.js +8 -8
- package/cjs/rules/selection-set-depth.js +5 -5
- package/cjs/rules/strict-id-in-types.js +7 -7
- package/cjs/rules/unique-fragment-name.js +4 -4
- package/cjs/rules/unique-operation-name.js +2 -2
- package/cjs/schema.js +2 -2
- package/esm/cache.js +25 -0
- package/esm/configs/base.js +4 -0
- package/esm/configs/index.js +12 -0
- package/esm/configs/operations-all.js +29 -0
- package/esm/configs/operations-recommended.js +53 -0
- package/esm/configs/relay.js +9 -0
- package/esm/configs/schema-all.js +22 -0
- package/esm/configs/schema-recommended.js +49 -0
- package/esm/documents.js +144 -0
- package/esm/estree-converter/converter.js +58 -0
- package/esm/estree-converter/index.js +3 -0
- package/esm/estree-converter/types.js +1 -0
- package/esm/estree-converter/utils.js +102 -0
- package/esm/flat-configs.js +33 -0
- package/esm/graphql-config.js +49 -0
- package/esm/index.js +9 -0
- package/esm/package.json +1 -0
- package/esm/parser.js +56 -0
- package/esm/processor.js +75 -0
- package/esm/rules/alphabetize.js +344 -0
- package/esm/rules/description-style.js +75 -0
- package/esm/rules/graphql-js-validation.js +498 -0
- package/esm/rules/index.js +71 -0
- package/esm/rules/input-name.js +133 -0
- package/esm/rules/lone-executable-definition.js +85 -0
- package/esm/rules/match-document-filename.js +232 -0
- package/esm/rules/naming-convention.js +307 -0
- package/esm/rules/no-anonymous-operations.js +64 -0
- package/esm/rules/no-case-insensitive-enum-values-duplicates.js +58 -0
- package/esm/rules/no-deprecated.js +121 -0
- package/esm/rules/no-duplicate-fields.js +109 -0
- package/esm/rules/no-hashtag-description.js +86 -0
- package/esm/rules/no-one-place-fragments.js +80 -0
- package/esm/rules/no-root-type.js +83 -0
- package/esm/rules/no-scalar-result-type-on-mutation.js +63 -0
- package/esm/rules/no-typename-prefix.js +62 -0
- package/esm/rules/no-unreachable-types.js +154 -0
- package/esm/rules/no-unused-fields.js +127 -0
- package/esm/rules/relay-arguments.js +118 -0
- package/esm/rules/relay-connection-types.js +104 -0
- package/esm/rules/relay-edge-types.js +186 -0
- package/esm/rules/relay-page-info.js +97 -0
- package/esm/rules/require-deprecation-date.js +120 -0
- package/esm/rules/require-deprecation-reason.js +53 -0
- package/esm/rules/require-description.js +190 -0
- package/esm/rules/require-field-of-type-query-in-mutation-result.js +69 -0
- package/esm/rules/require-id-when-available.js +196 -0
- package/esm/rules/require-nullable-fields-with-oneof.js +58 -0
- package/esm/rules/require-type-pattern-with-oneof.js +57 -0
- package/esm/rules/selection-set-depth.js +131 -0
- package/esm/rules/strict-id-in-types.js +159 -0
- package/esm/rules/unique-fragment-name.js +86 -0
- package/esm/rules/unique-operation-name.js +62 -0
- package/esm/schema.js +37 -0
- package/esm/testkit.js +181 -0
- package/esm/types.js +1 -0
- package/esm/utils.js +83 -0
- package/package.json +10 -1
- package/typings/estree-converter/converter.d.cts +1 -1
- package/typings/estree-converter/converter.d.ts +1 -1
- package/typings/estree-converter/index.d.cts +3 -3
- package/typings/estree-converter/index.d.ts +3 -3
- package/typings/estree-converter/types.d.cts +3 -3
- package/typings/estree-converter/types.d.ts +3 -3
- package/typings/estree-converter/utils.d.cts +2 -2
- package/typings/estree-converter/utils.d.ts +2 -2
- package/typings/flat-configs.d.cts +248 -0
- package/typings/flat-configs.d.ts +248 -0
- package/typings/graphql-config.d.cts +1 -1
- package/typings/graphql-config.d.ts +1 -1
- package/typings/index.d.cts +8 -7
- package/typings/index.d.ts +8 -7
- package/typings/parser.d.cts +1 -1
- package/typings/parser.d.ts +1 -1
- package/typings/rules/alphabetize.d.cts +1 -1
- package/typings/rules/alphabetize.d.ts +1 -1
- package/typings/rules/description-style.d.cts +1 -1
- package/typings/rules/description-style.d.ts +1 -1
- package/typings/rules/graphql-js-validation.d.cts +1 -1
- package/typings/rules/graphql-js-validation.d.ts +1 -1
- package/typings/rules/index.d.cts +45 -45
- package/typings/rules/index.d.ts +45 -45
- package/typings/rules/input-name.d.cts +1 -1
- package/typings/rules/input-name.d.ts +1 -1
- package/typings/rules/lone-executable-definition.d.cts +1 -1
- package/typings/rules/lone-executable-definition.d.ts +1 -1
- package/typings/rules/match-document-filename.d.cts +2 -2
- package/typings/rules/match-document-filename.d.ts +2 -2
- package/typings/rules/naming-convention.d.cts +1 -1
- package/typings/rules/naming-convention.d.ts +1 -1
- package/typings/rules/no-anonymous-operations.d.cts +1 -1
- package/typings/rules/no-anonymous-operations.d.ts +1 -1
- package/typings/rules/no-case-insensitive-enum-values-duplicates.d.cts +1 -1
- package/typings/rules/no-case-insensitive-enum-values-duplicates.d.ts +1 -1
- package/typings/rules/no-deprecated.d.cts +1 -1
- package/typings/rules/no-deprecated.d.ts +1 -1
- package/typings/rules/no-duplicate-fields.d.cts +1 -1
- package/typings/rules/no-duplicate-fields.d.ts +1 -1
- package/typings/rules/no-hashtag-description.d.cts +1 -1
- package/typings/rules/no-hashtag-description.d.ts +1 -1
- package/typings/rules/no-one-place-fragments.d.cts +1 -1
- package/typings/rules/no-one-place-fragments.d.ts +1 -1
- package/typings/rules/no-root-type.d.cts +1 -1
- package/typings/rules/no-root-type.d.ts +1 -1
- package/typings/rules/no-scalar-result-type-on-mutation.d.cts +1 -1
- package/typings/rules/no-scalar-result-type-on-mutation.d.ts +1 -1
- package/typings/rules/no-typename-prefix.d.cts +1 -1
- package/typings/rules/no-typename-prefix.d.ts +1 -1
- package/typings/rules/no-unreachable-types.d.cts +1 -1
- package/typings/rules/no-unreachable-types.d.ts +1 -1
- package/typings/rules/no-unused-fields.d.cts +1 -1
- package/typings/rules/no-unused-fields.d.ts +1 -1
- package/typings/rules/relay-arguments.d.cts +1 -1
- package/typings/rules/relay-arguments.d.ts +1 -1
- package/typings/rules/relay-connection-types.d.cts +1 -1
- package/typings/rules/relay-connection-types.d.ts +1 -1
- package/typings/rules/relay-edge-types.d.cts +1 -1
- package/typings/rules/relay-edge-types.d.ts +1 -1
- package/typings/rules/relay-page-info.d.cts +1 -1
- package/typings/rules/relay-page-info.d.ts +1 -1
- package/typings/rules/require-deprecation-date.d.cts +1 -1
- package/typings/rules/require-deprecation-date.d.ts +1 -1
- package/typings/rules/require-deprecation-reason.d.cts +1 -1
- package/typings/rules/require-deprecation-reason.d.ts +1 -1
- package/typings/rules/require-description.d.cts +1 -1
- package/typings/rules/require-description.d.ts +1 -1
- package/typings/rules/require-field-of-type-query-in-mutation-result.d.cts +1 -1
- package/typings/rules/require-field-of-type-query-in-mutation-result.d.ts +1 -1
- package/typings/rules/require-id-when-available.d.cts +1 -1
- package/typings/rules/require-id-when-available.d.ts +1 -1
- package/typings/rules/require-nullable-fields-with-oneof.d.cts +1 -1
- package/typings/rules/require-nullable-fields-with-oneof.d.ts +1 -1
- package/typings/rules/require-type-pattern-with-oneof.d.cts +1 -1
- package/typings/rules/require-type-pattern-with-oneof.d.ts +1 -1
- package/typings/rules/selection-set-depth.d.cts +1 -1
- package/typings/rules/selection-set-depth.d.ts +1 -1
- package/typings/rules/strict-id-in-types.d.cts +1 -1
- package/typings/rules/strict-id-in-types.d.ts +1 -1
- package/typings/rules/unique-fragment-name.d.cts +2 -2
- package/typings/rules/unique-fragment-name.d.ts +2 -2
- package/typings/rules/unique-operation-name.d.cts +1 -1
- package/typings/rules/unique-operation-name.d.ts +1 -1
- package/typings/schema.d.cts +1 -1
- package/typings/schema.d.ts +1 -1
- package/typings/testkit.d.cts +3 -3
- package/typings/testkit.d.ts +3 -3
- package/typings/types.d.cts +2 -2
- package/typings/types.d.ts +2 -2
- package/typings/utils.d.cts +2 -2
- package/typings/utils.d.ts +2 -2
package/esm/utils.js
ADDED
@@ -0,0 +1,83 @@
|
|
1
|
+
import { Kind } from 'graphql';
|
2
|
+
import lowerCase from 'lodash.lowercase';
|
3
|
+
import chalk from 'chalk';
|
4
|
+
export function requireSiblingsOperations(ruleId, context) {
|
5
|
+
const { siblingOperations } = context.parserServices;
|
6
|
+
if (!siblingOperations.available) {
|
7
|
+
throw new Error(`Rule \`${ruleId}\` requires \`parserOptions.operations\` to be set and loaded. See https://bit.ly/graphql-eslint-operations for more info`);
|
8
|
+
}
|
9
|
+
return siblingOperations;
|
10
|
+
}
|
11
|
+
export function requireGraphQLSchemaFromContext(ruleId, context) {
|
12
|
+
const { schema } = context.parserServices;
|
13
|
+
if (!schema) {
|
14
|
+
throw new Error(`Rule \`${ruleId}\` requires \`parserOptions.schema\` to be set and loaded. See https://bit.ly/graphql-eslint-schema for more info`);
|
15
|
+
}
|
16
|
+
else if (schema instanceof Error) {
|
17
|
+
throw schema;
|
18
|
+
}
|
19
|
+
return schema;
|
20
|
+
}
|
21
|
+
export const logger = {
|
22
|
+
// eslint-disable-next-line no-console
|
23
|
+
error: (...args) => console.error(chalk.red('error'), '[graphql-eslint]', chalk(...args)),
|
24
|
+
// eslint-disable-next-line no-console
|
25
|
+
warn: (...args) => console.warn(chalk.yellow('warning'), '[graphql-eslint]', chalk(...args)),
|
26
|
+
};
|
27
|
+
export const normalizePath = (path) => (path || '').replace(/\\/g, '/');
|
28
|
+
export const VIRTUAL_DOCUMENT_REGEX = /\/\d+_document.graphql$/;
|
29
|
+
export const CWD = process.cwd();
|
30
|
+
export const getTypeName = (node) => 'type' in node ? getTypeName(node.type) : node.name.value;
|
31
|
+
export const TYPES_KINDS = [
|
32
|
+
Kind.OBJECT_TYPE_DEFINITION,
|
33
|
+
Kind.INTERFACE_TYPE_DEFINITION,
|
34
|
+
Kind.ENUM_TYPE_DEFINITION,
|
35
|
+
Kind.SCALAR_TYPE_DEFINITION,
|
36
|
+
Kind.INPUT_OBJECT_TYPE_DEFINITION,
|
37
|
+
Kind.UNION_TYPE_DEFINITION,
|
38
|
+
];
|
39
|
+
export const pascalCase = (str) => lowerCase(str)
|
40
|
+
.split(' ')
|
41
|
+
.map(word => word.charAt(0).toUpperCase() + word.slice(1))
|
42
|
+
.join('');
|
43
|
+
export const camelCase = (str) => {
|
44
|
+
const result = pascalCase(str);
|
45
|
+
return result.charAt(0).toLowerCase() + result.slice(1);
|
46
|
+
};
|
47
|
+
export const convertCase = (style, str) => {
|
48
|
+
switch (style) {
|
49
|
+
case 'camelCase':
|
50
|
+
return camelCase(str);
|
51
|
+
case 'PascalCase':
|
52
|
+
return pascalCase(str);
|
53
|
+
case 'snake_case':
|
54
|
+
return lowerCase(str).replace(/ /g, '_');
|
55
|
+
case 'UPPER_CASE':
|
56
|
+
return lowerCase(str).replace(/ /g, '_').toUpperCase();
|
57
|
+
case 'kebab-case':
|
58
|
+
return lowerCase(str).replace(/ /g, '-');
|
59
|
+
}
|
60
|
+
};
|
61
|
+
export function getLocation(start, fieldName = '') {
|
62
|
+
const { line, column } = start;
|
63
|
+
return {
|
64
|
+
start: {
|
65
|
+
line,
|
66
|
+
column,
|
67
|
+
},
|
68
|
+
end: {
|
69
|
+
line,
|
70
|
+
column: column + fieldName.length,
|
71
|
+
},
|
72
|
+
};
|
73
|
+
}
|
74
|
+
export const REPORT_ON_FIRST_CHARACTER = { column: 0, line: 1 };
|
75
|
+
export const ARRAY_DEFAULT_OPTIONS = {
|
76
|
+
type: 'array',
|
77
|
+
uniqueItems: true,
|
78
|
+
minItems: 1,
|
79
|
+
items: {
|
80
|
+
type: 'string',
|
81
|
+
},
|
82
|
+
};
|
83
|
+
export const englishJoinWords = words => new Intl.ListFormat('en-US', { type: 'disjunction' }).format(words);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@graphql-eslint/eslint-plugin",
|
3
|
-
"version": "3.14.0-alpha-
|
3
|
+
"version": "3.14.0-alpha-20221223011700-eed94bd",
|
4
4
|
"description": "GraphQL plugin for ESLint",
|
5
5
|
"sideEffects": false,
|
6
6
|
"peerDependencies": {
|
@@ -28,6 +28,7 @@
|
|
28
28
|
"author": "Dotan Simha <dotansimha@gmail.com>",
|
29
29
|
"license": "MIT",
|
30
30
|
"main": "cjs/index.js",
|
31
|
+
"module": "esm/index.js",
|
31
32
|
"typings": "typings/index.d.ts",
|
32
33
|
"typescript": {
|
33
34
|
"definition": "typings/index.d.ts"
|
@@ -38,6 +39,14 @@
|
|
38
39
|
"require": {
|
39
40
|
"types": "./typings/index.d.cts",
|
40
41
|
"default": "./cjs/index.js"
|
42
|
+
},
|
43
|
+
"import": {
|
44
|
+
"types": "./typings/index.d.ts",
|
45
|
+
"default": "./esm/index.js"
|
46
|
+
},
|
47
|
+
"default": {
|
48
|
+
"types": "./typings/index.d.ts",
|
49
|
+
"default": "./esm/index.js"
|
41
50
|
}
|
42
51
|
}
|
43
52
|
}
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { DocumentNode, GraphQLSchema } from 'graphql';
|
2
|
-
import
|
2
|
+
import { GraphQLESTreeNode } from './types.cjs';
|
3
3
|
export declare function convertToESTree<T extends DocumentNode>(node: T, schema?: GraphQLSchema): GraphQLESTreeNode<T, false>;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { DocumentNode, GraphQLSchema } from 'graphql';
|
2
|
-
import
|
2
|
+
import { GraphQLESTreeNode } from './types.js';
|
3
3
|
export declare function convertToESTree<T extends DocumentNode>(node: T, schema?: GraphQLSchema): GraphQLESTreeNode<T, false>;
|
@@ -1,3 +1,3 @@
|
|
1
|
-
export * from './converter';
|
2
|
-
export * from './types';
|
3
|
-
export * from './utils';
|
1
|
+
export * from './converter.cjs';
|
2
|
+
export * from './types.cjs';
|
3
|
+
export * from './utils.cjs';
|
@@ -1,3 +1,3 @@
|
|
1
|
-
export * from './converter';
|
2
|
-
export * from './types';
|
3
|
-
export * from './utils';
|
1
|
+
export * from './converter.js';
|
2
|
+
export * from './types.js';
|
3
|
+
export * from './utils.js';
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import
|
2
|
-
import
|
3
|
-
import
|
1
|
+
import { ASTNode, TypeInfo, TypeNode, DocumentNode, ExecutableDefinitionNode, NameNode, TypeDefinitionNode, FieldDefinitionNode, ObjectTypeExtensionNode, ObjectTypeDefinitionNode, InterfaceTypeDefinitionNode, InterfaceTypeExtensionNode, SelectionSetNode, SelectionNode, DefinitionNode, TypeExtensionNode, DirectiveDefinitionNode, VariableNode, FieldNode, FragmentSpreadNode, EnumValueDefinitionNode, ArgumentNode, NamedTypeNode, EnumTypeDefinitionNode, EnumTypeExtensionNode, InputValueDefinitionNode, InputObjectTypeDefinitionNode, InputObjectTypeExtensionNode, InlineFragmentNode, VariableDefinitionNode, ListTypeNode, NonNullTypeNode, OperationTypeDefinitionNode } from 'graphql';
|
2
|
+
import { SourceLocation, Comment } from 'estree';
|
3
|
+
import { AST } from 'eslint';
|
4
4
|
type SafeGraphQLType<T extends ASTNode> = T extends {
|
5
5
|
type: TypeNode;
|
6
6
|
} ? Omit<T, 'loc' | 'type'> & {
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import
|
2
|
-
import
|
3
|
-
import
|
1
|
+
import { ASTNode, TypeInfo, TypeNode, DocumentNode, ExecutableDefinitionNode, NameNode, TypeDefinitionNode, FieldDefinitionNode, ObjectTypeExtensionNode, ObjectTypeDefinitionNode, InterfaceTypeDefinitionNode, InterfaceTypeExtensionNode, SelectionSetNode, SelectionNode, DefinitionNode, TypeExtensionNode, DirectiveDefinitionNode, VariableNode, FieldNode, FragmentSpreadNode, EnumValueDefinitionNode, ArgumentNode, NamedTypeNode, EnumTypeDefinitionNode, EnumTypeExtensionNode, InputValueDefinitionNode, InputObjectTypeDefinitionNode, InputObjectTypeExtensionNode, InlineFragmentNode, VariableDefinitionNode, ListTypeNode, NonNullTypeNode, OperationTypeDefinitionNode } from 'graphql';
|
2
|
+
import { SourceLocation, Comment } from 'estree';
|
3
|
+
import { AST } from 'eslint';
|
4
4
|
type SafeGraphQLType<T extends ASTNode> = T extends {
|
5
5
|
type: TypeNode;
|
6
6
|
} ? Omit<T, 'loc' | 'type'> & {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Location, GraphQLOutputType, GraphQLNamedType, Token } from 'graphql';
|
2
|
-
import
|
3
|
-
import
|
2
|
+
import { Comment, SourceLocation } from 'estree';
|
3
|
+
import { AST } from 'eslint';
|
4
4
|
export declare const valueFromNode: (valueNode: import("graphql").ValueNode, variables?: import("graphql/jsutils/ObjMap").ObjMap<unknown>) => any;
|
5
5
|
export declare function getBaseType(type: GraphQLOutputType): GraphQLNamedType;
|
6
6
|
type TokenKindValue = '<SOF>' | '!' | '$' | '&' | '(' | ')' | '...' | ':' | '=' | '@' | '[' | ']' | '{' | '|' | '}' | 'Name' | 'Int' | 'Float' | 'String' | 'BlockString' | 'Comment';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Location, GraphQLOutputType, GraphQLNamedType, Token } from 'graphql';
|
2
|
-
import
|
3
|
-
import
|
2
|
+
import { Comment, SourceLocation } from 'estree';
|
3
|
+
import { AST } from 'eslint';
|
4
4
|
export declare const valueFromNode: (valueNode: import("graphql").ValueNode, variables?: import("graphql/jsutils/ObjMap").ObjMap<unknown>) => any;
|
5
5
|
export declare function getBaseType(type: GraphQLOutputType): GraphQLNamedType;
|
6
6
|
type TokenKindValue = '<SOF>' | '!' | '$' | '&' | '(' | ')' | '...' | ':' | '=' | '@' | '[' | ']' | '{' | '|' | '}' | 'Name' | 'Int' | 'Float' | 'String' | 'BlockString' | 'Comment';
|
@@ -0,0 +1,248 @@
|
|
1
|
+
import { parseForESLint } from './parser.cjs';
|
2
|
+
export declare const flatConfigs: {
|
3
|
+
'operations-all': {
|
4
|
+
languageOptions: {
|
5
|
+
parser: {
|
6
|
+
parseForESLint: typeof parseForESLint;
|
7
|
+
};
|
8
|
+
};
|
9
|
+
rules: {
|
10
|
+
'@graphql-eslint/alphabetize': (string | {
|
11
|
+
selections: string[];
|
12
|
+
variables: string[];
|
13
|
+
arguments: string[];
|
14
|
+
})[];
|
15
|
+
'@graphql-eslint/lone-executable-definition': string;
|
16
|
+
'@graphql-eslint/match-document-filename': (string | {
|
17
|
+
query: string;
|
18
|
+
mutation: string;
|
19
|
+
subscription: string;
|
20
|
+
fragment: string;
|
21
|
+
})[];
|
22
|
+
'@graphql-eslint/no-one-place-fragments': string;
|
23
|
+
'@graphql-eslint/unique-fragment-name': string;
|
24
|
+
'@graphql-eslint/unique-operation-name': string;
|
25
|
+
'@graphql-eslint/executable-definitions': string;
|
26
|
+
'@graphql-eslint/fields-on-correct-type': string;
|
27
|
+
'@graphql-eslint/fragments-on-composite-type': string;
|
28
|
+
'@graphql-eslint/known-argument-names': string;
|
29
|
+
'@graphql-eslint/known-directives': string;
|
30
|
+
'@graphql-eslint/known-fragment-names': string;
|
31
|
+
'@graphql-eslint/known-type-names': string;
|
32
|
+
'@graphql-eslint/lone-anonymous-operation': string;
|
33
|
+
'@graphql-eslint/naming-convention': (string | {
|
34
|
+
VariableDefinition: string;
|
35
|
+
OperationDefinition: {
|
36
|
+
style: string;
|
37
|
+
forbiddenPrefixes: string[];
|
38
|
+
forbiddenSuffixes: string[];
|
39
|
+
};
|
40
|
+
FragmentDefinition: {
|
41
|
+
style: string;
|
42
|
+
forbiddenPrefixes: string[];
|
43
|
+
forbiddenSuffixes: string[];
|
44
|
+
};
|
45
|
+
})[];
|
46
|
+
'@graphql-eslint/no-anonymous-operations': string;
|
47
|
+
'@graphql-eslint/no-deprecated': string;
|
48
|
+
'@graphql-eslint/no-duplicate-fields': string;
|
49
|
+
'@graphql-eslint/no-fragment-cycles': string;
|
50
|
+
'@graphql-eslint/no-undefined-variables': string;
|
51
|
+
'@graphql-eslint/no-unused-fragments': string;
|
52
|
+
'@graphql-eslint/no-unused-variables': string;
|
53
|
+
'@graphql-eslint/one-field-subscriptions': string;
|
54
|
+
'@graphql-eslint/overlapping-fields-can-be-merged': string;
|
55
|
+
'@graphql-eslint/possible-fragment-spread': string;
|
56
|
+
'@graphql-eslint/provided-required-arguments': string;
|
57
|
+
'@graphql-eslint/require-id-when-available': string;
|
58
|
+
'@graphql-eslint/scalar-leafs': string;
|
59
|
+
'@graphql-eslint/selection-set-depth': (string | {
|
60
|
+
maxDepth: number;
|
61
|
+
})[];
|
62
|
+
'@graphql-eslint/unique-argument-names': string;
|
63
|
+
'@graphql-eslint/unique-directive-names-per-location': string;
|
64
|
+
'@graphql-eslint/unique-input-field-names': string;
|
65
|
+
'@graphql-eslint/unique-variable-names': string;
|
66
|
+
'@graphql-eslint/value-literals-of-correct-type': string;
|
67
|
+
'@graphql-eslint/variables-are-input-types': string;
|
68
|
+
'@graphql-eslint/variables-in-allowed-position': string;
|
69
|
+
};
|
70
|
+
};
|
71
|
+
'operations-recommended': {
|
72
|
+
languageOptions: {
|
73
|
+
parser: {
|
74
|
+
parseForESLint: typeof parseForESLint;
|
75
|
+
};
|
76
|
+
};
|
77
|
+
rules: {
|
78
|
+
'@graphql-eslint/executable-definitions': string;
|
79
|
+
'@graphql-eslint/fields-on-correct-type': string;
|
80
|
+
'@graphql-eslint/fragments-on-composite-type': string;
|
81
|
+
'@graphql-eslint/known-argument-names': string;
|
82
|
+
'@graphql-eslint/known-directives': string;
|
83
|
+
'@graphql-eslint/known-fragment-names': string;
|
84
|
+
'@graphql-eslint/known-type-names': string;
|
85
|
+
'@graphql-eslint/lone-anonymous-operation': string;
|
86
|
+
'@graphql-eslint/naming-convention': (string | {
|
87
|
+
VariableDefinition: string;
|
88
|
+
OperationDefinition: {
|
89
|
+
style: string;
|
90
|
+
forbiddenPrefixes: string[];
|
91
|
+
forbiddenSuffixes: string[];
|
92
|
+
};
|
93
|
+
FragmentDefinition: {
|
94
|
+
style: string;
|
95
|
+
forbiddenPrefixes: string[];
|
96
|
+
forbiddenSuffixes: string[];
|
97
|
+
};
|
98
|
+
})[];
|
99
|
+
'@graphql-eslint/no-anonymous-operations': string;
|
100
|
+
'@graphql-eslint/no-deprecated': string;
|
101
|
+
'@graphql-eslint/no-duplicate-fields': string;
|
102
|
+
'@graphql-eslint/no-fragment-cycles': string;
|
103
|
+
'@graphql-eslint/no-undefined-variables': string;
|
104
|
+
'@graphql-eslint/no-unused-fragments': string;
|
105
|
+
'@graphql-eslint/no-unused-variables': string;
|
106
|
+
'@graphql-eslint/one-field-subscriptions': string;
|
107
|
+
'@graphql-eslint/overlapping-fields-can-be-merged': string;
|
108
|
+
'@graphql-eslint/possible-fragment-spread': string;
|
109
|
+
'@graphql-eslint/provided-required-arguments': string;
|
110
|
+
'@graphql-eslint/require-id-when-available': string;
|
111
|
+
'@graphql-eslint/scalar-leafs': string;
|
112
|
+
'@graphql-eslint/selection-set-depth': (string | {
|
113
|
+
maxDepth: number;
|
114
|
+
})[];
|
115
|
+
'@graphql-eslint/unique-argument-names': string;
|
116
|
+
'@graphql-eslint/unique-directive-names-per-location': string;
|
117
|
+
'@graphql-eslint/unique-input-field-names': string;
|
118
|
+
'@graphql-eslint/unique-variable-names': string;
|
119
|
+
'@graphql-eslint/value-literals-of-correct-type': string;
|
120
|
+
'@graphql-eslint/variables-are-input-types': string;
|
121
|
+
'@graphql-eslint/variables-in-allowed-position': string;
|
122
|
+
};
|
123
|
+
};
|
124
|
+
relay: {
|
125
|
+
languageOptions: {
|
126
|
+
parser: {
|
127
|
+
parseForESLint: typeof parseForESLint;
|
128
|
+
};
|
129
|
+
};
|
130
|
+
rules: {
|
131
|
+
'@graphql-eslint/relay-arguments': string;
|
132
|
+
'@graphql-eslint/relay-connection-types': string;
|
133
|
+
'@graphql-eslint/relay-edge-types': string;
|
134
|
+
'@graphql-eslint/relay-page-info': string;
|
135
|
+
};
|
136
|
+
};
|
137
|
+
'schema-all': {
|
138
|
+
languageOptions: {
|
139
|
+
parser: {
|
140
|
+
parseForESLint: typeof parseForESLint;
|
141
|
+
};
|
142
|
+
};
|
143
|
+
rules: {
|
144
|
+
'@graphql-eslint/alphabetize': (string | {
|
145
|
+
fields: string[];
|
146
|
+
values: string[];
|
147
|
+
arguments: string[];
|
148
|
+
})[];
|
149
|
+
'@graphql-eslint/input-name': string;
|
150
|
+
'@graphql-eslint/no-scalar-result-type-on-mutation': string;
|
151
|
+
'@graphql-eslint/require-deprecation-date': string;
|
152
|
+
'@graphql-eslint/require-field-of-type-query-in-mutation-result': string;
|
153
|
+
'@graphql-eslint/require-nullable-fields-with-oneof': string;
|
154
|
+
'@graphql-eslint/require-type-pattern-with-oneof': string;
|
155
|
+
'@graphql-eslint/description-style': string;
|
156
|
+
'@graphql-eslint/known-argument-names': string;
|
157
|
+
'@graphql-eslint/known-directives': string;
|
158
|
+
'@graphql-eslint/known-type-names': string;
|
159
|
+
'@graphql-eslint/lone-schema-definition': string;
|
160
|
+
'@graphql-eslint/naming-convention': (string | {
|
161
|
+
types: string;
|
162
|
+
FieldDefinition: string;
|
163
|
+
InputValueDefinition: string;
|
164
|
+
Argument: string;
|
165
|
+
DirectiveDefinition: string;
|
166
|
+
EnumValueDefinition: string;
|
167
|
+
'FieldDefinition[parent.name.value=Query]': {
|
168
|
+
forbiddenPrefixes: string[];
|
169
|
+
forbiddenSuffixes: string[];
|
170
|
+
};
|
171
|
+
'FieldDefinition[parent.name.value=Mutation]': {
|
172
|
+
forbiddenPrefixes: string[];
|
173
|
+
forbiddenSuffixes: string[];
|
174
|
+
};
|
175
|
+
'FieldDefinition[parent.name.value=Subscription]': {
|
176
|
+
forbiddenPrefixes: string[];
|
177
|
+
forbiddenSuffixes: string[];
|
178
|
+
};
|
179
|
+
})[];
|
180
|
+
'@graphql-eslint/no-case-insensitive-enum-values-duplicates': string;
|
181
|
+
'@graphql-eslint/no-hashtag-description': string;
|
182
|
+
'@graphql-eslint/no-typename-prefix': string;
|
183
|
+
'@graphql-eslint/no-unreachable-types': string;
|
184
|
+
'@graphql-eslint/provided-required-arguments': string;
|
185
|
+
'@graphql-eslint/require-deprecation-reason': string;
|
186
|
+
'@graphql-eslint/require-description': (string | {
|
187
|
+
types: boolean;
|
188
|
+
DirectiveDefinition: boolean;
|
189
|
+
})[];
|
190
|
+
'@graphql-eslint/strict-id-in-types': string;
|
191
|
+
'@graphql-eslint/unique-directive-names': string;
|
192
|
+
'@graphql-eslint/unique-directive-names-per-location': string;
|
193
|
+
'@graphql-eslint/unique-field-definition-names': string;
|
194
|
+
'@graphql-eslint/unique-operation-types': string;
|
195
|
+
'@graphql-eslint/unique-type-names': string;
|
196
|
+
};
|
197
|
+
};
|
198
|
+
'schema-recommended': {
|
199
|
+
languageOptions: {
|
200
|
+
parser: {
|
201
|
+
parseForESLint: typeof parseForESLint;
|
202
|
+
};
|
203
|
+
};
|
204
|
+
rules: {
|
205
|
+
'@graphql-eslint/description-style': string;
|
206
|
+
'@graphql-eslint/known-argument-names': string;
|
207
|
+
'@graphql-eslint/known-directives': string;
|
208
|
+
'@graphql-eslint/known-type-names': string;
|
209
|
+
'@graphql-eslint/lone-schema-definition': string;
|
210
|
+
'@graphql-eslint/naming-convention': (string | {
|
211
|
+
types: string;
|
212
|
+
FieldDefinition: string;
|
213
|
+
InputValueDefinition: string;
|
214
|
+
Argument: string;
|
215
|
+
DirectiveDefinition: string;
|
216
|
+
EnumValueDefinition: string;
|
217
|
+
'FieldDefinition[parent.name.value=Query]': {
|
218
|
+
forbiddenPrefixes: string[];
|
219
|
+
forbiddenSuffixes: string[];
|
220
|
+
};
|
221
|
+
'FieldDefinition[parent.name.value=Mutation]': {
|
222
|
+
forbiddenPrefixes: string[];
|
223
|
+
forbiddenSuffixes: string[];
|
224
|
+
};
|
225
|
+
'FieldDefinition[parent.name.value=Subscription]': {
|
226
|
+
forbiddenPrefixes: string[];
|
227
|
+
forbiddenSuffixes: string[];
|
228
|
+
};
|
229
|
+
})[];
|
230
|
+
'@graphql-eslint/no-case-insensitive-enum-values-duplicates': string;
|
231
|
+
'@graphql-eslint/no-hashtag-description': string;
|
232
|
+
'@graphql-eslint/no-typename-prefix': string;
|
233
|
+
'@graphql-eslint/no-unreachable-types': string;
|
234
|
+
'@graphql-eslint/provided-required-arguments': string;
|
235
|
+
'@graphql-eslint/require-deprecation-reason': string;
|
236
|
+
'@graphql-eslint/require-description': (string | {
|
237
|
+
types: boolean;
|
238
|
+
DirectiveDefinition: boolean;
|
239
|
+
})[];
|
240
|
+
'@graphql-eslint/strict-id-in-types': string;
|
241
|
+
'@graphql-eslint/unique-directive-names': string;
|
242
|
+
'@graphql-eslint/unique-directive-names-per-location': string;
|
243
|
+
'@graphql-eslint/unique-field-definition-names': string;
|
244
|
+
'@graphql-eslint/unique-operation-types': string;
|
245
|
+
'@graphql-eslint/unique-type-names': string;
|
246
|
+
};
|
247
|
+
};
|
248
|
+
};
|