@graphql-eslint/eslint-plugin 3.14.0 → 3.14.1-alpha-20221227103351-5f80ba8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/configs/base.js +0 -6
- package/cjs/configs/operations-all.js +1 -1
- package/cjs/configs/operations-recommended.js +2 -1
- package/cjs/configs/relay.js +2 -1
- package/cjs/configs/schema-all.js +1 -1
- package/cjs/configs/schema-recommended.js +2 -1
- package/cjs/rules/lone-executable-definition.js +1 -1
- package/cjs/rules/no-one-place-fragments.js +3 -3
- package/cjs/rules/require-nullable-fields-with-oneof.js +1 -1
- package/docs/README.md +2 -2
- package/docs/rules/lone-executable-definition.md +1 -1
- package/docs/rules/no-one-place-fragments.md +3 -3
- package/docs/rules/require-nullable-fields-with-oneof.md +1 -1
- package/esm/configs/operations-all.js +1 -1
- package/esm/configs/operations-recommended.js +2 -1
- package/esm/configs/relay.js +2 -1
- package/esm/configs/schema-all.js +1 -1
- package/esm/configs/schema-recommended.js +2 -1
- package/esm/rules/lone-executable-definition.js +1 -1
- package/esm/rules/no-one-place-fragments.js +3 -3
- package/esm/rules/require-nullable-fields-with-oneof.js +1 -1
- package/package.json +3 -2
- package/typings/configs/index.d.cts +8 -5
- package/typings/configs/index.d.ts +8 -5
- package/typings/configs/operations-all.d.cts +1 -1
- package/typings/configs/operations-all.d.ts +1 -1
- package/typings/configs/operations-recommended.d.cts +2 -1
- package/typings/configs/operations-recommended.d.ts +2 -1
- package/typings/configs/relay.d.cts +2 -1
- package/typings/configs/relay.d.ts +2 -1
- package/typings/configs/schema-all.d.cts +1 -1
- package/typings/configs/schema-all.d.ts +1 -1
- package/typings/configs/schema-recommended.d.cts +2 -1
- package/typings/configs/schema-recommended.d.ts +2 -1
- package/esm/configs/base.js +0 -4
- package/typings/configs/base.d.cts +0 -5
- package/typings/configs/base.d.ts +0 -5
package/cjs/configs/base.js
CHANGED
@@ -4,7 +4,8 @@
|
|
4
4
|
*/
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.default = {
|
7
|
-
|
7
|
+
parser: '@graphql-eslint/eslint-plugin',
|
8
|
+
plugins: ['@graphql-eslint'],
|
8
9
|
rules: {
|
9
10
|
'@graphql-eslint/executable-definitions': 'error',
|
10
11
|
'@graphql-eslint/fields-on-correct-type': 'error',
|
package/cjs/configs/relay.js
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.default = {
|
4
|
-
|
4
|
+
parser: '@graphql-eslint/eslint-plugin',
|
5
|
+
plugins: ['@graphql-eslint'],
|
5
6
|
rules: {
|
6
7
|
'@graphql-eslint/relay-arguments': 'error',
|
7
8
|
'@graphql-eslint/relay-connection-types': 'error',
|
@@ -4,7 +4,8 @@
|
|
4
4
|
*/
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.default = {
|
7
|
-
|
7
|
+
parser: '@graphql-eslint/eslint-plugin',
|
8
|
+
plugins: ['@graphql-eslint'],
|
8
9
|
rules: {
|
9
10
|
'@graphql-eslint/description-style': 'error',
|
10
11
|
'@graphql-eslint/known-argument-names': 'error',
|
@@ -28,7 +28,7 @@ exports.rule = {
|
|
28
28
|
type: 'suggestion',
|
29
29
|
docs: {
|
30
30
|
category: 'Operations',
|
31
|
-
description: 'Require
|
31
|
+
description: 'Require queries, mutations, subscriptions or fragments to be located in separate files.',
|
32
32
|
url: `https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/${RULE_ID}.md`,
|
33
33
|
examples: [
|
34
34
|
{
|
@@ -8,7 +8,7 @@ exports.rule = {
|
|
8
8
|
type: 'suggestion',
|
9
9
|
docs: {
|
10
10
|
category: 'Schema',
|
11
|
-
description: 'Require
|
11
|
+
description: 'Require `input` or `type` fields to be non-nullable with `@oneOf` directive.',
|
12
12
|
url: `https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/${RULE_ID}.md`,
|
13
13
|
examples: [
|
14
14
|
{
|
package/docs/README.md
CHANGED
@@ -26,7 +26,7 @@ Name &nbs
|
|
26
26
|
[known-fragment-names](rules/known-fragment-names.md)|A GraphQL document is only valid if all `...Fragment` fragment spreads refer to fragments defined in the same document.|![recommended][]|📦|🔮|
|
27
27
|
[known-type-names](rules/known-type-names.md)|A GraphQL document is only valid if referenced types (specifically variable definitions and fragment conditions) are defined by the type schema.|![recommended][]|📄 📦|🔮|💡
|
28
28
|
[lone-anonymous-operation](rules/lone-anonymous-operation.md)|A GraphQL document that contains an anonymous operation (the `query` short-hand) is only valid if it contains only that one operation definition.|![recommended][]|📦|🔮|
|
29
|
-
[lone-executable-definition](rules/lone-executable-definition.md)|Require
|
29
|
+
[lone-executable-definition](rules/lone-executable-definition.md)|Require queries, mutations, subscriptions or fragments to be located in separate files.|![all][]|📦|🚀|
|
30
30
|
[lone-schema-definition](rules/lone-schema-definition.md)|A GraphQL document is only valid if it contains only one schema definition.|![recommended][]|📄|🔮|
|
31
31
|
[match-document-filename](rules/match-document-filename.md)|This rule allows you to enforce that the file name should match the operation name.|![all][]|📦|🚀|
|
32
32
|
[naming-convention](rules/naming-convention.md)|Require names to follow specified conventions.|![recommended][]|📄 📦|🚀|💡
|
@@ -59,7 +59,7 @@ Name &nbs
|
|
59
59
|
[require-description](rules/require-description.md)|Enforce descriptions in type definitions and operations.|![recommended][]|📄|🚀|
|
60
60
|
[require-field-of-type-query-in-mutation-result](rules/require-field-of-type-query-in-mutation-result.md)|Allow the client in one round-trip not only to call mutation but also to get a wagon of data to update their application.|![all][]|📄|🚀|
|
61
61
|
[require-id-when-available](rules/require-id-when-available.md)|Enforce selecting specific fields when they are available on the GraphQL type.|![recommended][]|📦|🚀|💡
|
62
|
-
[require-nullable-fields-with-oneof](rules/require-nullable-fields-with-oneof.md)|Require
|
62
|
+
[require-nullable-fields-with-oneof](rules/require-nullable-fields-with-oneof.md)|Require `input` or `type` fields to be non-nullable with `@oneOf` directive.|![all][]|📄|🚀|
|
63
63
|
[require-type-pattern-with-oneof](rules/require-type-pattern-with-oneof.md)|Enforce types with `@oneOf` directive have `error` and `ok` fields.|![all][]|📄|🚀|
|
64
64
|
[scalar-leafs](rules/scalar-leafs.md)|A GraphQL document is valid only if all leaf fields (fields without sub selections) are of scalar or enum types.|![recommended][]|📦|🔮|💡
|
65
65
|
[selection-set-depth](rules/selection-set-depth.md)|Limit the complexity of the GraphQL operations solely by their depth. Based on [graphql-depth-limit](https://npmjs.com/package/graphql-depth-limit).|![recommended][]|📦|🚀|💡
|
@@ -6,7 +6,7 @@
|
|
6
6
|
- Requires GraphQL Operations: `false`
|
7
7
|
[ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
8
8
|
|
9
|
-
Require
|
9
|
+
Require queries, mutations, subscriptions or fragments to be located in separate files.
|
10
10
|
|
11
11
|
## Usage Examples
|
12
12
|
|
@@ -22,9 +22,6 @@ fragment UserFields on User {
|
|
22
22
|
{
|
23
23
|
user {
|
24
24
|
...UserFields
|
25
|
-
friends {
|
26
|
-
...UserFields
|
27
|
-
}
|
28
25
|
}
|
29
26
|
}
|
30
27
|
```
|
@@ -41,6 +38,9 @@ fragment UserFields on User {
|
|
41
38
|
{
|
42
39
|
user {
|
43
40
|
...UserFields
|
41
|
+
friends {
|
42
|
+
...UserFields
|
43
|
+
}
|
44
44
|
}
|
45
45
|
}
|
46
46
|
```
|
@@ -6,7 +6,7 @@
|
|
6
6
|
- Requires GraphQL Operations: `false`
|
7
7
|
[ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
|
8
8
|
|
9
|
-
Require
|
9
|
+
Require `input` or `type` fields to be non-nullable with `@oneOf` directive.
|
10
10
|
|
11
11
|
## Usage Examples
|
12
12
|
|
@@ -2,7 +2,7 @@
|
|
2
2
|
* 🚨 IMPORTANT! Do not manually modify this file. Run: `yarn generate-configs`
|
3
3
|
*/
|
4
4
|
export default {
|
5
|
-
extends:
|
5
|
+
extends: './configs/operations-recommended',
|
6
6
|
rules: {
|
7
7
|
'@graphql-eslint/alphabetize': [
|
8
8
|
'error',
|
@@ -2,7 +2,8 @@
|
|
2
2
|
* 🚨 IMPORTANT! Do not manually modify this file. Run: `yarn generate-configs`
|
3
3
|
*/
|
4
4
|
export default {
|
5
|
-
|
5
|
+
parser: '@graphql-eslint/eslint-plugin',
|
6
|
+
plugins: ['@graphql-eslint'],
|
6
7
|
rules: {
|
7
8
|
'@graphql-eslint/executable-definitions': 'error',
|
8
9
|
'@graphql-eslint/fields-on-correct-type': 'error',
|
package/esm/configs/relay.js
CHANGED
@@ -2,7 +2,8 @@
|
|
2
2
|
* 🚨 IMPORTANT! Do not manually modify this file. Run: `yarn generate-configs`
|
3
3
|
*/
|
4
4
|
export default {
|
5
|
-
|
5
|
+
parser: '@graphql-eslint/eslint-plugin',
|
6
|
+
plugins: ['@graphql-eslint'],
|
6
7
|
rules: {
|
7
8
|
'@graphql-eslint/description-style': 'error',
|
8
9
|
'@graphql-eslint/known-argument-names': 'error',
|
@@ -25,7 +25,7 @@ export const rule = {
|
|
25
25
|
type: 'suggestion',
|
26
26
|
docs: {
|
27
27
|
category: 'Operations',
|
28
|
-
description: 'Require
|
28
|
+
description: 'Require queries, mutations, subscriptions or fragments to be located in separate files.',
|
29
29
|
url: `https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/${RULE_ID}.md`,
|
30
30
|
examples: [
|
31
31
|
{
|
@@ -5,7 +5,7 @@ export const rule = {
|
|
5
5
|
type: 'suggestion',
|
6
6
|
docs: {
|
7
7
|
category: 'Schema',
|
8
|
-
description: 'Require
|
8
|
+
description: 'Require `input` or `type` fields to be non-nullable with `@oneOf` directive.',
|
9
9
|
url: `https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/${RULE_ID}.md`,
|
10
10
|
examples: [
|
11
11
|
{
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@graphql-eslint/eslint-plugin",
|
3
|
-
"version": "3.14.
|
3
|
+
"version": "3.14.1-alpha-20221227103351-5f80ba8",
|
4
4
|
"description": "GraphQL plugin for ESLint",
|
5
5
|
"sideEffects": false,
|
6
6
|
"peerDependencies": {
|
@@ -16,7 +16,8 @@
|
|
16
16
|
"fast-glob": "^3.2.12",
|
17
17
|
"graphql-config": "^4.4.0",
|
18
18
|
"graphql-depth-limit": "^1.1.0",
|
19
|
-
"lodash.lowercase": "^4.3.0"
|
19
|
+
"lodash.lowercase": "^4.3.0",
|
20
|
+
"tslib": "^2.4.1"
|
20
21
|
},
|
21
22
|
"repository": "https://github.com/B2o5T/graphql-eslint",
|
22
23
|
"keywords": [
|
@@ -1,6 +1,7 @@
|
|
1
1
|
export declare const configs: {
|
2
2
|
'schema-recommended': {
|
3
|
-
|
3
|
+
parser: string;
|
4
|
+
plugins: string[];
|
4
5
|
rules: {
|
5
6
|
'@graphql-eslint/description-style': string;
|
6
7
|
'@graphql-eslint/known-argument-names': string;
|
@@ -46,7 +47,7 @@ export declare const configs: {
|
|
46
47
|
};
|
47
48
|
};
|
48
49
|
'schema-all': {
|
49
|
-
extends: string
|
50
|
+
extends: string;
|
50
51
|
rules: {
|
51
52
|
'@graphql-eslint/alphabetize': (string | {
|
52
53
|
fields: string[];
|
@@ -62,7 +63,8 @@ export declare const configs: {
|
|
62
63
|
};
|
63
64
|
};
|
64
65
|
'operations-recommended': {
|
65
|
-
|
66
|
+
parser: string;
|
67
|
+
plugins: string[];
|
66
68
|
rules: {
|
67
69
|
'@graphql-eslint/executable-definitions': string;
|
68
70
|
'@graphql-eslint/fields-on-correct-type': string;
|
@@ -111,7 +113,7 @@ export declare const configs: {
|
|
111
113
|
};
|
112
114
|
};
|
113
115
|
'operations-all': {
|
114
|
-
extends: string
|
116
|
+
extends: string;
|
115
117
|
rules: {
|
116
118
|
'@graphql-eslint/alphabetize': (string | {
|
117
119
|
selections: string[];
|
@@ -131,7 +133,8 @@ export declare const configs: {
|
|
131
133
|
};
|
132
134
|
};
|
133
135
|
relay: {
|
134
|
-
|
136
|
+
parser: string;
|
137
|
+
plugins: string[];
|
135
138
|
rules: {
|
136
139
|
'@graphql-eslint/relay-arguments': string;
|
137
140
|
'@graphql-eslint/relay-connection-types': string;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
export declare const configs: {
|
2
2
|
'schema-recommended': {
|
3
|
-
|
3
|
+
parser: string;
|
4
|
+
plugins: string[];
|
4
5
|
rules: {
|
5
6
|
'@graphql-eslint/description-style': string;
|
6
7
|
'@graphql-eslint/known-argument-names': string;
|
@@ -46,7 +47,7 @@ export declare const configs: {
|
|
46
47
|
};
|
47
48
|
};
|
48
49
|
'schema-all': {
|
49
|
-
extends: string
|
50
|
+
extends: string;
|
50
51
|
rules: {
|
51
52
|
'@graphql-eslint/alphabetize': (string | {
|
52
53
|
fields: string[];
|
@@ -62,7 +63,8 @@ export declare const configs: {
|
|
62
63
|
};
|
63
64
|
};
|
64
65
|
'operations-recommended': {
|
65
|
-
|
66
|
+
parser: string;
|
67
|
+
plugins: string[];
|
66
68
|
rules: {
|
67
69
|
'@graphql-eslint/executable-definitions': string;
|
68
70
|
'@graphql-eslint/fields-on-correct-type': string;
|
@@ -111,7 +113,7 @@ export declare const configs: {
|
|
111
113
|
};
|
112
114
|
};
|
113
115
|
'operations-all': {
|
114
|
-
extends: string
|
116
|
+
extends: string;
|
115
117
|
rules: {
|
116
118
|
'@graphql-eslint/alphabetize': (string | {
|
117
119
|
selections: string[];
|
@@ -131,7 +133,8 @@ export declare const configs: {
|
|
131
133
|
};
|
132
134
|
};
|
133
135
|
relay: {
|
134
|
-
|
136
|
+
parser: string;
|
137
|
+
plugins: string[];
|
135
138
|
rules: {
|
136
139
|
'@graphql-eslint/relay-arguments': string;
|
137
140
|
'@graphql-eslint/relay-connection-types': string;
|
package/esm/configs/base.js
DELETED