@graphql-eslint/eslint-plugin 4.0.0-alpha.14 → 4.0.0-alpha.16
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/cache.js +1 -2
- package/cjs/configs/index.d.cts +427 -10
- package/cjs/configs/index.js +1 -2
- package/cjs/configs/operations-all.d.cts +8 -8
- package/cjs/configs/operations-all.js +30 -33
- package/cjs/configs/operations-recommended.d.cts +35 -35
- package/cjs/configs/operations-recommended.js +56 -59
- package/cjs/configs/schema-all.d.cts +12 -12
- package/cjs/configs/schema-all.js +26 -29
- package/cjs/configs/schema-recommended.d.cts +23 -23
- package/cjs/configs/schema-recommended.js +70 -73
- package/cjs/configs/schema-relay.d.cts +5 -5
- package/cjs/configs/schema-relay.js +14 -17
- package/cjs/documents.js +1 -2
- package/cjs/estree-converter/converter.js +1 -2
- package/cjs/estree-converter/utils.js +1 -2
- package/cjs/graphql-config.d.cts +6 -1
- package/cjs/graphql-config.js +9 -3
- package/cjs/index.d.cts +433 -15
- package/cjs/index.js +1 -2
- package/cjs/meta.js +1 -2
- package/cjs/parser.js +2 -6
- package/cjs/processor.js +5 -2
- package/cjs/rules/alphabetize/index.js +1 -2
- package/cjs/rules/description-style/index.js +1 -2
- package/cjs/rules/graphql-js-validation.js +1 -2
- package/cjs/rules/index.d.cts +4 -4
- package/cjs/rules/index.js +1 -2
- package/cjs/rules/input-name/index.js +1 -2
- package/cjs/rules/lone-executable-definition/index.js +1 -2
- package/cjs/rules/match-document-filename/index.js +1 -2
- package/cjs/rules/naming-convention/index.js +1 -2
- package/cjs/rules/no-anonymous-operations/index.js +1 -2
- package/cjs/rules/no-deprecated/index.js +8 -6
- package/cjs/rules/no-duplicate-fields/index.js +1 -2
- package/cjs/rules/no-hashtag-description/index.js +1 -2
- package/cjs/rules/no-one-place-fragments/index.js +1 -2
- package/cjs/rules/no-root-type/index.js +1 -2
- package/cjs/rules/no-scalar-result-type-on-mutation/index.js +1 -2
- package/cjs/rules/no-typename-prefix/index.js +1 -2
- package/cjs/rules/no-unreachable-types/index.js +1 -2
- package/cjs/rules/no-unused-fields/index.js +1 -2
- package/cjs/rules/relay-arguments/index.js +1 -2
- package/cjs/rules/relay-connection-types/index.js +1 -2
- package/cjs/rules/relay-edge-types/index.js +1 -2
- package/cjs/rules/relay-page-info/index.js +1 -2
- package/cjs/rules/require-deprecation-date/index.js +1 -2
- package/cjs/rules/require-deprecation-reason/index.js +1 -2
- package/cjs/rules/require-description/index.js +1 -2
- package/cjs/rules/require-field-of-type-query-in-mutation-result/index.js +1 -2
- package/cjs/rules/require-import-fragment/index.js +1 -2
- package/cjs/rules/require-nullable-fields-with-oneof/index.js +1 -2
- package/cjs/rules/require-nullable-result-in-root/index.js +1 -2
- package/cjs/rules/require-selections/index.js +1 -2
- package/cjs/rules/require-type-pattern-with-oneof/index.js +1 -2
- package/cjs/rules/selection-set-depth/index.js +1 -2
- package/cjs/rules/strict-id-in-types/index.js +1 -2
- package/cjs/rules/unique-enum-value-names/index.js +1 -2
- package/cjs/rules/unique-fragment-name/index.js +1 -2
- package/cjs/rules/unique-operation-name/index.js +1 -2
- package/cjs/schema.js +1 -2
- package/cjs/siblings.js +1 -2
- package/cjs/utils.js +1 -2
- package/esm/cache.js +0 -1
- package/esm/configs/index.d.ts +427 -10
- package/esm/configs/index.js +0 -1
- package/esm/configs/operations-all.d.ts +7 -7
- package/esm/configs/operations-all.js +28 -33
- package/esm/configs/operations-recommended.d.ts +34 -34
- package/esm/configs/operations-recommended.js +54 -59
- package/esm/configs/schema-all.d.ts +11 -11
- package/esm/configs/schema-all.js +24 -29
- package/esm/configs/schema-recommended.d.ts +22 -22
- package/esm/configs/schema-recommended.js +68 -73
- package/esm/configs/schema-relay.d.ts +4 -4
- package/esm/configs/schema-relay.js +12 -17
- package/esm/documents.js +0 -1
- package/esm/estree-converter/converter.js +0 -1
- package/esm/estree-converter/utils.js +0 -1
- package/esm/graphql-config.d.ts +6 -1
- package/esm/graphql-config.js +8 -2
- package/esm/index.d.ts +433 -15
- package/esm/index.js +0 -1
- package/esm/meta.js +1 -2
- package/esm/parser.js +3 -7
- package/esm/processor.js +4 -1
- package/esm/rules/alphabetize/index.js +0 -1
- package/esm/rules/description-style/index.js +0 -1
- package/esm/rules/graphql-js-validation.js +0 -1
- package/esm/rules/index.d.ts +4 -4
- package/esm/rules/index.js +0 -1
- package/esm/rules/input-name/index.js +0 -1
- package/esm/rules/lone-executable-definition/index.js +0 -1
- package/esm/rules/match-document-filename/index.js +0 -1
- package/esm/rules/naming-convention/index.js +0 -1
- package/esm/rules/no-anonymous-operations/index.js +0 -1
- package/esm/rules/no-deprecated/index.js +7 -5
- package/esm/rules/no-duplicate-fields/index.js +0 -1
- package/esm/rules/no-hashtag-description/index.js +0 -1
- package/esm/rules/no-one-place-fragments/index.js +0 -1
- package/esm/rules/no-root-type/index.js +0 -1
- package/esm/rules/no-scalar-result-type-on-mutation/index.js +0 -1
- package/esm/rules/no-typename-prefix/index.js +0 -1
- package/esm/rules/no-unreachable-types/index.js +0 -1
- package/esm/rules/no-unused-fields/index.js +0 -1
- package/esm/rules/relay-arguments/index.js +0 -1
- package/esm/rules/relay-connection-types/index.js +0 -1
- package/esm/rules/relay-edge-types/index.js +0 -1
- package/esm/rules/relay-page-info/index.js +0 -1
- package/esm/rules/require-deprecation-date/index.js +0 -1
- package/esm/rules/require-deprecation-reason/index.js +0 -1
- package/esm/rules/require-description/index.js +0 -1
- package/esm/rules/require-field-of-type-query-in-mutation-result/index.js +0 -1
- package/esm/rules/require-import-fragment/index.js +0 -1
- package/esm/rules/require-nullable-fields-with-oneof/index.js +0 -1
- package/esm/rules/require-nullable-result-in-root/index.js +0 -1
- package/esm/rules/require-selections/index.js +0 -1
- package/esm/rules/require-type-pattern-with-oneof/index.js +0 -1
- package/esm/rules/selection-set-depth/index.js +0 -1
- package/esm/rules/strict-id-in-types/index.js +0 -1
- package/esm/rules/unique-enum-value-names/index.js +0 -1
- package/esm/rules/unique-fragment-name/index.js +0 -1
- package/esm/rules/unique-operation-name/index.js +0 -1
- package/esm/schema.js +0 -1
- package/esm/siblings.js +0 -1
- package/esm/utils.js +0 -1
- package/index.browser.js +210 -255
- package/package.json +1 -1
- package/cjs/chunk-UIAXBAMD.js +0 -8
- package/esm/chunk-UIAXBAMD.js +0 -8
@@ -1,61 +1,58 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
"
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
FragmentDefinition: {
|
28
|
-
style: "PascalCase",
|
29
|
-
forbiddenPrefixes: ["Fragment"],
|
30
|
-
forbiddenSuffixes: ["Fragment"]
|
31
|
-
}
|
32
|
-
}
|
33
|
-
],
|
34
|
-
"@graphql-eslint/no-anonymous-operations": "error",
|
35
|
-
"@graphql-eslint/no-deprecated": "error",
|
36
|
-
"@graphql-eslint/no-duplicate-fields": "error",
|
37
|
-
"@graphql-eslint/no-fragment-cycles": "error",
|
38
|
-
"@graphql-eslint/no-undefined-variables": "error",
|
39
|
-
"@graphql-eslint/no-unused-fragments": "error",
|
40
|
-
"@graphql-eslint/no-unused-variables": "error",
|
41
|
-
"@graphql-eslint/one-field-subscriptions": "error",
|
42
|
-
"@graphql-eslint/overlapping-fields-can-be-merged": "error",
|
43
|
-
"@graphql-eslint/possible-fragment-spread": "error",
|
44
|
-
"@graphql-eslint/provided-required-arguments": "error",
|
45
|
-
"@graphql-eslint/require-selections": "error",
|
46
|
-
"@graphql-eslint/scalar-leafs": "error",
|
47
|
-
"@graphql-eslint/selection-set-depth": ["error", { maxDepth: 7 }],
|
48
|
-
"@graphql-eslint/unique-argument-names": "error",
|
49
|
-
"@graphql-eslint/unique-directive-names-per-location": "error",
|
50
|
-
"@graphql-eslint/unique-fragment-name": "error",
|
51
|
-
"@graphql-eslint/unique-input-field-names": "error",
|
52
|
-
"@graphql-eslint/unique-operation-name": "error",
|
53
|
-
"@graphql-eslint/unique-variable-names": "error",
|
54
|
-
"@graphql-eslint/value-literals-of-correct-type": "error",
|
55
|
-
"@graphql-eslint/variables-are-input-types": "error",
|
56
|
-
"@graphql-eslint/variables-in-allowed-position": "error"
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var operations_recommended_default = {
|
2
|
+
parser: "@graphql-eslint/eslint-plugin",
|
3
|
+
plugins: ["@graphql-eslint"],
|
4
|
+
rules: {
|
5
|
+
"@graphql-eslint/executable-definitions": "error",
|
6
|
+
"@graphql-eslint/fields-on-correct-type": "error",
|
7
|
+
"@graphql-eslint/fragments-on-composite-type": "error",
|
8
|
+
"@graphql-eslint/known-argument-names": "error",
|
9
|
+
"@graphql-eslint/known-directives": "error",
|
10
|
+
"@graphql-eslint/known-fragment-names": "error",
|
11
|
+
"@graphql-eslint/known-type-names": "error",
|
12
|
+
"@graphql-eslint/lone-anonymous-operation": "error",
|
13
|
+
"@graphql-eslint/naming-convention": [
|
14
|
+
"error",
|
15
|
+
{
|
16
|
+
VariableDefinition: "camelCase",
|
17
|
+
OperationDefinition: {
|
18
|
+
style: "PascalCase",
|
19
|
+
forbiddenPrefixes: ["Query", "Mutation", "Subscription", "Get"],
|
20
|
+
forbiddenSuffixes: ["Query", "Mutation", "Subscription"]
|
21
|
+
},
|
22
|
+
FragmentDefinition: {
|
23
|
+
style: "PascalCase",
|
24
|
+
forbiddenPrefixes: ["Fragment"],
|
25
|
+
forbiddenSuffixes: ["Fragment"]
|
26
|
+
}
|
57
27
|
}
|
58
|
-
|
28
|
+
],
|
29
|
+
"@graphql-eslint/no-anonymous-operations": "error",
|
30
|
+
"@graphql-eslint/no-deprecated": "error",
|
31
|
+
"@graphql-eslint/no-duplicate-fields": "error",
|
32
|
+
"@graphql-eslint/no-fragment-cycles": "error",
|
33
|
+
"@graphql-eslint/no-undefined-variables": "error",
|
34
|
+
"@graphql-eslint/no-unused-fragments": "error",
|
35
|
+
"@graphql-eslint/no-unused-variables": "error",
|
36
|
+
"@graphql-eslint/one-field-subscriptions": "error",
|
37
|
+
"@graphql-eslint/overlapping-fields-can-be-merged": "error",
|
38
|
+
"@graphql-eslint/possible-fragment-spread": "error",
|
39
|
+
"@graphql-eslint/provided-required-arguments": "error",
|
40
|
+
"@graphql-eslint/require-selections": "error",
|
41
|
+
"@graphql-eslint/scalar-leafs": "error",
|
42
|
+
"@graphql-eslint/selection-set-depth": ["error", { maxDepth: 7 }],
|
43
|
+
"@graphql-eslint/unique-argument-names": "error",
|
44
|
+
"@graphql-eslint/unique-directive-names-per-location": "error",
|
45
|
+
"@graphql-eslint/unique-fragment-name": "error",
|
46
|
+
"@graphql-eslint/unique-input-field-names": "error",
|
47
|
+
"@graphql-eslint/unique-operation-name": "error",
|
48
|
+
"@graphql-eslint/unique-variable-names": "error",
|
49
|
+
"@graphql-eslint/value-literals-of-correct-type": "error",
|
50
|
+
"@graphql-eslint/variables-are-input-types": "error",
|
51
|
+
"@graphql-eslint/variables-in-allowed-position": "error"
|
59
52
|
}
|
60
|
-
}
|
61
|
-
|
53
|
+
};
|
54
|
+
|
55
|
+
|
56
|
+
exports.default = operations_recommended_default;
|
57
|
+
|
58
|
+
module.exports = exports.default;
|
@@ -1,24 +1,24 @@
|
|
1
1
|
declare const _default: {
|
2
2
|
extends: string;
|
3
3
|
rules: {
|
4
|
-
'@graphql-eslint/alphabetize':
|
4
|
+
'@graphql-eslint/alphabetize': ["error", {
|
5
5
|
definitions: boolean;
|
6
6
|
fields: string[];
|
7
7
|
values: boolean;
|
8
8
|
arguments: string[];
|
9
9
|
groups: string[];
|
10
|
-
}
|
11
|
-
'@graphql-eslint/input-name':
|
12
|
-
'@graphql-eslint/no-root-type':
|
10
|
+
}];
|
11
|
+
'@graphql-eslint/input-name': "error";
|
12
|
+
'@graphql-eslint/no-root-type': ["error", {
|
13
13
|
disallow: string[];
|
14
|
-
}
|
15
|
-
'@graphql-eslint/no-scalar-result-type-on-mutation':
|
16
|
-
'@graphql-eslint/require-deprecation-date':
|
17
|
-
'@graphql-eslint/require-field-of-type-query-in-mutation-result':
|
18
|
-
'@graphql-eslint/require-nullable-fields-with-oneof':
|
19
|
-
'@graphql-eslint/require-nullable-result-in-root':
|
20
|
-
'@graphql-eslint/require-type-pattern-with-oneof':
|
14
|
+
}];
|
15
|
+
'@graphql-eslint/no-scalar-result-type-on-mutation': "error";
|
16
|
+
'@graphql-eslint/require-deprecation-date': "error";
|
17
|
+
'@graphql-eslint/require-field-of-type-query-in-mutation-result': "error";
|
18
|
+
'@graphql-eslint/require-nullable-fields-with-oneof': "error";
|
19
|
+
'@graphql-eslint/require-nullable-result-in-root': "error";
|
20
|
+
'@graphql-eslint/require-type-pattern-with-oneof': "error";
|
21
21
|
};
|
22
22
|
};
|
23
23
|
|
24
|
-
export
|
24
|
+
export = _default;
|
@@ -1,31 +1,28 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
definitions: !0,
|
13
|
-
fields: ["ObjectTypeDefinition", "InterfaceTypeDefinition", "InputObjectTypeDefinition"],
|
14
|
-
values: !0,
|
15
|
-
arguments: ["FieldDefinition", "Field", "DirectiveDefinition", "Directive"],
|
16
|
-
groups: ["id", "*", "createdAt", "updatedAt"]
|
17
|
-
}
|
18
|
-
],
|
19
|
-
"@graphql-eslint/input-name": "error",
|
20
|
-
"@graphql-eslint/no-root-type": ["error", { disallow: ["mutation", "subscription"] }],
|
21
|
-
"@graphql-eslint/no-scalar-result-type-on-mutation": "error",
|
22
|
-
"@graphql-eslint/require-deprecation-date": "error",
|
23
|
-
"@graphql-eslint/require-field-of-type-query-in-mutation-result": "error",
|
24
|
-
"@graphql-eslint/require-nullable-fields-with-oneof": "error",
|
25
|
-
"@graphql-eslint/require-nullable-result-in-root": "error",
|
26
|
-
"@graphql-eslint/require-type-pattern-with-oneof": "error"
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var schema_all_default = {
|
2
|
+
extends: "./configs/schema-recommended",
|
3
|
+
rules: {
|
4
|
+
"@graphql-eslint/alphabetize": [
|
5
|
+
"error",
|
6
|
+
{
|
7
|
+
definitions: !0,
|
8
|
+
fields: ["ObjectTypeDefinition", "InterfaceTypeDefinition", "InputObjectTypeDefinition"],
|
9
|
+
values: !0,
|
10
|
+
arguments: ["FieldDefinition", "Field", "DirectiveDefinition", "Directive"],
|
11
|
+
groups: ["id", "*", "createdAt", "updatedAt"]
|
27
12
|
}
|
28
|
-
|
13
|
+
],
|
14
|
+
"@graphql-eslint/input-name": "error",
|
15
|
+
"@graphql-eslint/no-root-type": ["error", { disallow: ["mutation", "subscription"] }],
|
16
|
+
"@graphql-eslint/no-scalar-result-type-on-mutation": "error",
|
17
|
+
"@graphql-eslint/require-deprecation-date": "error",
|
18
|
+
"@graphql-eslint/require-field-of-type-query-in-mutation-result": "error",
|
19
|
+
"@graphql-eslint/require-nullable-fields-with-oneof": "error",
|
20
|
+
"@graphql-eslint/require-nullable-result-in-root": "error",
|
21
|
+
"@graphql-eslint/require-type-pattern-with-oneof": "error"
|
29
22
|
}
|
30
|
-
}
|
31
|
-
|
23
|
+
};
|
24
|
+
|
25
|
+
|
26
|
+
exports.default = schema_all_default;
|
27
|
+
|
28
|
+
module.exports = exports.default;
|
@@ -2,12 +2,12 @@ declare const _default: {
|
|
2
2
|
parser: string;
|
3
3
|
plugins: string[];
|
4
4
|
rules: {
|
5
|
-
'@graphql-eslint/description-style':
|
6
|
-
'@graphql-eslint/known-argument-names':
|
7
|
-
'@graphql-eslint/known-directives':
|
8
|
-
'@graphql-eslint/known-type-names':
|
9
|
-
'@graphql-eslint/lone-schema-definition':
|
10
|
-
'@graphql-eslint/naming-convention':
|
5
|
+
'@graphql-eslint/description-style': "error";
|
6
|
+
'@graphql-eslint/known-argument-names': "error";
|
7
|
+
'@graphql-eslint/known-directives': "error";
|
8
|
+
'@graphql-eslint/known-type-names': "error";
|
9
|
+
'@graphql-eslint/lone-schema-definition': "error";
|
10
|
+
'@graphql-eslint/naming-convention': ["error", {
|
11
11
|
types: string;
|
12
12
|
FieldDefinition: string;
|
13
13
|
InputValueDefinition: string;
|
@@ -42,26 +42,26 @@ declare const _default: {
|
|
42
42
|
forbiddenPrefixes: string[];
|
43
43
|
forbiddenSuffixes: string[];
|
44
44
|
};
|
45
|
-
}
|
46
|
-
'@graphql-eslint/no-hashtag-description':
|
47
|
-
'@graphql-eslint/no-typename-prefix':
|
48
|
-
'@graphql-eslint/no-unreachable-types':
|
49
|
-
'@graphql-eslint/possible-type-extension':
|
50
|
-
'@graphql-eslint/provided-required-arguments':
|
51
|
-
'@graphql-eslint/require-deprecation-reason':
|
52
|
-
'@graphql-eslint/require-description':
|
45
|
+
}];
|
46
|
+
'@graphql-eslint/no-hashtag-description': "error";
|
47
|
+
'@graphql-eslint/no-typename-prefix': "error";
|
48
|
+
'@graphql-eslint/no-unreachable-types': "error";
|
49
|
+
'@graphql-eslint/possible-type-extension': "error";
|
50
|
+
'@graphql-eslint/provided-required-arguments': "error";
|
51
|
+
'@graphql-eslint/require-deprecation-reason': "error";
|
52
|
+
'@graphql-eslint/require-description': ["error", {
|
53
53
|
types: boolean;
|
54
54
|
DirectiveDefinition: boolean;
|
55
55
|
rootField: boolean;
|
56
|
-
}
|
57
|
-
'@graphql-eslint/strict-id-in-types':
|
58
|
-
'@graphql-eslint/unique-directive-names':
|
59
|
-
'@graphql-eslint/unique-directive-names-per-location':
|
60
|
-
'@graphql-eslint/unique-enum-value-names':
|
61
|
-
'@graphql-eslint/unique-field-definition-names':
|
62
|
-
'@graphql-eslint/unique-operation-types':
|
63
|
-
'@graphql-eslint/unique-type-names':
|
56
|
+
}];
|
57
|
+
'@graphql-eslint/strict-id-in-types': "error";
|
58
|
+
'@graphql-eslint/unique-directive-names': "error";
|
59
|
+
'@graphql-eslint/unique-directive-names-per-location': "error";
|
60
|
+
'@graphql-eslint/unique-enum-value-names': "error";
|
61
|
+
'@graphql-eslint/unique-field-definition-names': "error";
|
62
|
+
'@graphql-eslint/unique-operation-types': "error";
|
63
|
+
'@graphql-eslint/unique-type-names': "error";
|
64
64
|
};
|
65
65
|
};
|
66
66
|
|
67
|
-
export
|
67
|
+
export = _default;
|
@@ -1,75 +1,72 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
"
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
},
|
48
|
-
"ObjectTypeDefinition,ObjectTypeExtension": {
|
49
|
-
forbiddenPrefixes: ["Type"],
|
50
|
-
forbiddenSuffixes: ["Type"]
|
51
|
-
}
|
52
|
-
}
|
53
|
-
],
|
54
|
-
"@graphql-eslint/no-hashtag-description": "error",
|
55
|
-
"@graphql-eslint/no-typename-prefix": "error",
|
56
|
-
"@graphql-eslint/no-unreachable-types": "error",
|
57
|
-
"@graphql-eslint/possible-type-extension": "error",
|
58
|
-
"@graphql-eslint/provided-required-arguments": "error",
|
59
|
-
"@graphql-eslint/require-deprecation-reason": "error",
|
60
|
-
"@graphql-eslint/require-description": [
|
61
|
-
"error",
|
62
|
-
{ types: !0, DirectiveDefinition: !0, rootField: !0 }
|
63
|
-
],
|
64
|
-
"@graphql-eslint/strict-id-in-types": "error",
|
65
|
-
"@graphql-eslint/unique-directive-names": "error",
|
66
|
-
"@graphql-eslint/unique-directive-names-per-location": "error",
|
67
|
-
"@graphql-eslint/unique-enum-value-names": "error",
|
68
|
-
"@graphql-eslint/unique-field-definition-names": "error",
|
69
|
-
"@graphql-eslint/unique-operation-types": "error",
|
70
|
-
"@graphql-eslint/unique-type-names": "error"
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var schema_recommended_default = {
|
2
|
+
parser: "@graphql-eslint/eslint-plugin",
|
3
|
+
plugins: ["@graphql-eslint"],
|
4
|
+
rules: {
|
5
|
+
"@graphql-eslint/description-style": "error",
|
6
|
+
"@graphql-eslint/known-argument-names": "error",
|
7
|
+
"@graphql-eslint/known-directives": "error",
|
8
|
+
"@graphql-eslint/known-type-names": "error",
|
9
|
+
"@graphql-eslint/lone-schema-definition": "error",
|
10
|
+
"@graphql-eslint/naming-convention": [
|
11
|
+
"error",
|
12
|
+
{
|
13
|
+
types: "PascalCase",
|
14
|
+
FieldDefinition: "camelCase",
|
15
|
+
InputValueDefinition: "camelCase",
|
16
|
+
Argument: "camelCase",
|
17
|
+
DirectiveDefinition: "camelCase",
|
18
|
+
EnumValueDefinition: "UPPER_CASE",
|
19
|
+
"FieldDefinition[parent.name.value=Query]": {
|
20
|
+
forbiddenPrefixes: ["query", "get"],
|
21
|
+
forbiddenSuffixes: ["Query"]
|
22
|
+
},
|
23
|
+
"FieldDefinition[parent.name.value=Mutation]": {
|
24
|
+
forbiddenPrefixes: ["mutation"],
|
25
|
+
forbiddenSuffixes: ["Mutation"]
|
26
|
+
},
|
27
|
+
"FieldDefinition[parent.name.value=Subscription]": {
|
28
|
+
forbiddenPrefixes: ["subscription"],
|
29
|
+
forbiddenSuffixes: ["Subscription"]
|
30
|
+
},
|
31
|
+
"EnumTypeDefinition,EnumTypeExtension": {
|
32
|
+
forbiddenPrefixes: ["Enum"],
|
33
|
+
forbiddenSuffixes: ["Enum"]
|
34
|
+
},
|
35
|
+
"InterfaceTypeDefinition,InterfaceTypeExtension": {
|
36
|
+
forbiddenPrefixes: ["Interface"],
|
37
|
+
forbiddenSuffixes: ["Interface"]
|
38
|
+
},
|
39
|
+
"UnionTypeDefinition,UnionTypeExtension": {
|
40
|
+
forbiddenPrefixes: ["Union"],
|
41
|
+
forbiddenSuffixes: ["Union"]
|
42
|
+
},
|
43
|
+
"ObjectTypeDefinition,ObjectTypeExtension": {
|
44
|
+
forbiddenPrefixes: ["Type"],
|
45
|
+
forbiddenSuffixes: ["Type"]
|
46
|
+
}
|
71
47
|
}
|
72
|
-
|
48
|
+
],
|
49
|
+
"@graphql-eslint/no-hashtag-description": "error",
|
50
|
+
"@graphql-eslint/no-typename-prefix": "error",
|
51
|
+
"@graphql-eslint/no-unreachable-types": "error",
|
52
|
+
"@graphql-eslint/possible-type-extension": "error",
|
53
|
+
"@graphql-eslint/provided-required-arguments": "error",
|
54
|
+
"@graphql-eslint/require-deprecation-reason": "error",
|
55
|
+
"@graphql-eslint/require-description": [
|
56
|
+
"error",
|
57
|
+
{ types: !0, DirectiveDefinition: !0, rootField: !0 }
|
58
|
+
],
|
59
|
+
"@graphql-eslint/strict-id-in-types": "error",
|
60
|
+
"@graphql-eslint/unique-directive-names": "error",
|
61
|
+
"@graphql-eslint/unique-directive-names-per-location": "error",
|
62
|
+
"@graphql-eslint/unique-enum-value-names": "error",
|
63
|
+
"@graphql-eslint/unique-field-definition-names": "error",
|
64
|
+
"@graphql-eslint/unique-operation-types": "error",
|
65
|
+
"@graphql-eslint/unique-type-names": "error"
|
73
66
|
}
|
74
|
-
}
|
75
|
-
|
67
|
+
};
|
68
|
+
|
69
|
+
|
70
|
+
exports.default = schema_recommended_default;
|
71
|
+
|
72
|
+
module.exports = exports.default;
|
@@ -2,11 +2,11 @@ declare const _default: {
|
|
2
2
|
parser: string;
|
3
3
|
plugins: string[];
|
4
4
|
rules: {
|
5
|
-
'@graphql-eslint/relay-arguments':
|
6
|
-
'@graphql-eslint/relay-connection-types':
|
7
|
-
'@graphql-eslint/relay-edge-types':
|
8
|
-
'@graphql-eslint/relay-page-info':
|
5
|
+
'@graphql-eslint/relay-arguments': "error";
|
6
|
+
'@graphql-eslint/relay-connection-types': "error";
|
7
|
+
'@graphql-eslint/relay-edge-types': "error";
|
8
|
+
'@graphql-eslint/relay-page-info': "error";
|
9
9
|
};
|
10
10
|
};
|
11
11
|
|
12
|
-
export
|
12
|
+
export = _default;
|
@@ -1,18 +1,15 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
rules: {
|
10
|
-
"@graphql-eslint/relay-arguments": "error",
|
11
|
-
"@graphql-eslint/relay-connection-types": "error",
|
12
|
-
"@graphql-eslint/relay-edge-types": "error",
|
13
|
-
"@graphql-eslint/relay-page-info": "error"
|
14
|
-
}
|
15
|
-
};
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var schema_relay_default = {
|
2
|
+
parser: "@graphql-eslint/eslint-plugin",
|
3
|
+
plugins: ["@graphql-eslint"],
|
4
|
+
rules: {
|
5
|
+
"@graphql-eslint/relay-arguments": "error",
|
6
|
+
"@graphql-eslint/relay-connection-types": "error",
|
7
|
+
"@graphql-eslint/relay-edge-types": "error",
|
8
|
+
"@graphql-eslint/relay-page-info": "error"
|
16
9
|
}
|
17
|
-
}
|
18
|
-
|
10
|
+
};
|
11
|
+
|
12
|
+
|
13
|
+
exports.default = schema_relay_default;
|
14
|
+
|
15
|
+
module.exports = exports.default;
|
package/cjs/documents.js
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }require('
|
2
|
-
var _nodepath = require('node:path'); var _nodepath2 = _interopRequireDefault(_nodepath);
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _nodepath = require('node:path'); var _nodepath2 = _interopRequireDefault(_nodepath);
|
3
2
|
var _debug = require('debug'); var _debug2 = _interopRequireDefault(_debug);
|
4
3
|
var _fastglob = require('fast-glob'); var _fastglob2 = _interopRequireDefault(_fastglob);
|
5
4
|
var _cachejs = require('./cache.js');
|
package/cjs/graphql-config.d.cts
CHANGED
@@ -8,7 +8,12 @@ import './estree-converter/types.cjs';
|
|
8
8
|
import './siblings.cjs';
|
9
9
|
import '@graphql-tools/utils';
|
10
10
|
|
11
|
+
/**
|
12
|
+
* Filepath can be a virtual file, so we need to find the first existing path
|
13
|
+
*
|
14
|
+
*/
|
15
|
+
declare function getFirstExistingPath(filePath: string): string;
|
11
16
|
declare function loadOnDiskGraphQLConfig(filePath: string): GraphQLConfig;
|
12
17
|
declare function loadGraphQLConfig({ graphQLConfig: config, filePath, }: ParserOptions): GraphQLConfig;
|
13
18
|
|
14
|
-
export { loadGraphQLConfig, loadOnDiskGraphQLConfig };
|
19
|
+
export { getFirstExistingPath, loadGraphQLConfig, loadOnDiskGraphQLConfig };
|
package/cjs/graphql-config.js
CHANGED
@@ -1,14 +1,19 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }require('
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _nodefs = require('node:fs'); var _nodefs2 = _interopRequireDefault(_nodefs);
|
2
2
|
var _nodepath = require('node:path'); var _nodepath2 = _interopRequireDefault(_nodepath);
|
3
3
|
var _debug = require('debug'); var _debug2 = _interopRequireDefault(_debug);
|
4
4
|
var _graphqlconfig = require('graphql-config');
|
5
5
|
var _codefileloader = require('@graphql-tools/code-file-loader');
|
6
6
|
const debug = _debug2.default.call(void 0, "graphql-eslint:graphql-config");
|
7
7
|
let graphQLConfig;
|
8
|
+
function getFirstExistingPath(filePath) {
|
9
|
+
for (; !_nodefs2.default.existsSync(filePath); )
|
10
|
+
filePath = _nodepath2.default.dirname(filePath);
|
11
|
+
return filePath;
|
12
|
+
}
|
8
13
|
function loadOnDiskGraphQLConfig(filePath) {
|
9
14
|
return _graphqlconfig.loadConfigSync.call(void 0, {
|
10
15
|
// load config relative to the file being linted
|
11
|
-
rootDir: _nodepath2.default.dirname(filePath),
|
16
|
+
rootDir: getFirstExistingPath(_nodepath2.default.dirname(filePath)),
|
12
17
|
throwOnMissing: !1,
|
13
18
|
extensions: [codeFileLoaderExtension]
|
14
19
|
});
|
@@ -36,4 +41,5 @@ const codeFileLoaderExtension = (api) => {
|
|
36
41
|
|
37
42
|
|
38
43
|
|
39
|
-
|
44
|
+
|
45
|
+
exports.getFirstExistingPath = getFirstExistingPath; exports.loadGraphQLConfig = loadGraphQLConfig; exports.loadOnDiskGraphQLConfig = loadOnDiskGraphQLConfig;
|