@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.
@@ -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 all queries, mutations, subscriptions and fragments to be located in separate files.',
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
  {
@@ -23,9 +23,6 @@ exports.rule = {
23
23
  {
24
24
  user {
25
25
  ...UserFields
26
- friends {
27
- ...UserFields
28
- }
29
26
  }
30
27
  }
31
28
  `,
@@ -40,6 +37,9 @@ exports.rule = {
40
37
  {
41
38
  user {
42
39
  ...UserFields
40
+ friends {
41
+ ...UserFields
42
+ }
43
43
  }
44
44
  }
45
45
  `,
@@ -8,7 +8,7 @@ exports.rule = {
8
8
  type: 'suggestion',
9
9
  docs: {
10
10
  category: 'Schema',
11
- description: 'Require are `input` or `type` fields be non nullable with `@oneOf` directive.',
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 all queries, mutations, subscriptions and fragments to be located in separate files.|![all][]|đŸ“Ļ|🚀|
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 are `input` or `type` fields be non nullable with `@oneOf` directive.|![all][]|📄|🚀|
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 all queries, mutations, subscriptions and fragments to be located in separate files.
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 are `input` or `type` fields be non nullable with `@oneOf` directive.
9
+ Require `input` or `type` fields to be non-nullable with `@oneOf` directive.
10
10
 
11
11
  ## Usage Examples
12
12
 
@@ -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 all queries, mutations, subscriptions and fragments to be located in separate files.',
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
  {
@@ -20,9 +20,6 @@ export const rule = {
20
20
  {
21
21
  user {
22
22
  ...UserFields
23
- friends {
24
- ...UserFields
25
- }
26
23
  }
27
24
  }
28
25
  `,
@@ -37,6 +34,9 @@ export const rule = {
37
34
  {
38
35
  user {
39
36
  ...UserFields
37
+ friends {
38
+ ...UserFields
39
+ }
40
40
  }
41
41
  }
42
42
  `,
@@ -5,7 +5,7 @@ export const rule = {
5
5
  type: 'suggestion',
6
6
  docs: {
7
7
  category: 'Schema',
8
- description: 'Require are `input` or `type` fields be non nullable with `@oneOf` directive.',
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.0",
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": [
@@ -1,4 +1,8 @@
1
1
  export declare const configs: {
2
+ base: {
3
+ parser: string;
4
+ plugins: string[];
5
+ };
2
6
  'schema-recommended': {
3
7
  extends: string;
4
8
  rules: {
@@ -1,4 +1,8 @@
1
1
  export declare const configs: {
2
+ base: {
3
+ parser: string;
4
+ plugins: string[];
5
+ };
2
6
  'schema-recommended': {
3
7
  extends: string;
4
8
  rules: {