@graphql-eslint/eslint-plugin 3.14.0 â 3.14.1-alpha-20221227090835-c39b5f5
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/configs/index.js +2 -0
- 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/index.js +2 -0
- 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 +4 -0
- package/typings/configs/index.d.ts +4 -0
package/cjs/configs/index.js
CHANGED
@@ -2,12 +2,14 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.configs = void 0;
|
4
4
|
const tslib_1 = require("tslib");
|
5
|
+
const base_js_1 = tslib_1.__importDefault(require("./base.js"));
|
5
6
|
const schema_recommended_js_1 = tslib_1.__importDefault(require("./schema-recommended.js"));
|
6
7
|
const schema_all_js_1 = tslib_1.__importDefault(require("./schema-all.js"));
|
7
8
|
const operations_recommended_js_1 = tslib_1.__importDefault(require("./operations-recommended.js"));
|
8
9
|
const operations_all_js_1 = tslib_1.__importDefault(require("./operations-all.js"));
|
9
10
|
const relay_js_1 = tslib_1.__importDefault(require("./relay.js"));
|
10
11
|
exports.configs = {
|
12
|
+
base: base_js_1.default,
|
11
13
|
'schema-recommended': schema_recommended_js_1.default,
|
12
14
|
'schema-all': schema_all_js_1.default,
|
13
15
|
'operations-recommended': operations_recommended_js_1.default,
|
@@ -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
|
|
package/esm/configs/index.js
CHANGED
@@ -1,9 +1,11 @@
|
|
1
|
+
import baseConfig from './base.js';
|
1
2
|
import schemaRecommendedConfig from './schema-recommended.js';
|
2
3
|
import schemaAllConfig from './schema-all.js';
|
3
4
|
import operationsRecommendedConfig from './operations-recommended.js';
|
4
5
|
import operationsAllConfig from './operations-all.js';
|
5
6
|
import relayConfig from './relay.js';
|
6
7
|
export const configs = {
|
8
|
+
base: baseConfig,
|
7
9
|
'schema-recommended': schemaRecommendedConfig,
|
8
10
|
'schema-all': schemaAllConfig,
|
9
11
|
'operations-recommended': operationsRecommendedConfig,
|
@@ -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-20221227090835-c39b5f5",
|
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": [
|