@graphql-eslint/eslint-plugin 3.0.0-alpha-580615a.0 → 3.0.0-alpha-7462f3d.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-eslint/eslint-plugin",
3
- "version": "3.0.0-alpha-580615a.0",
3
+ "version": "3.0.0-alpha-7462f3d.0",
4
4
  "sideEffects": false,
5
5
  "peerDependencies": {
6
6
  "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0"
package/rules/index.d.ts CHANGED
@@ -6,10 +6,6 @@ export declare const rules: {
6
6
  variables?: ["OperationDefinition"];
7
7
  arguments?: ("Field" | "Directive" | "FieldDefinition" | "DirectiveDefinition")[];
8
8
  }], false>;
9
- 'avoid-duplicate-fields': import("..").GraphQLESLintRule<any[], false>;
10
- 'avoid-operation-name-prefix': import("..").GraphQLESLintRule<import("./avoid-operation-name-prefix").AvoidOperationNamePrefixConfig, false>;
11
- 'avoid-scalar-result-type-on-mutation': import("..").GraphQLESLintRule<any[], false>;
12
- 'avoid-typename-prefix': import("..").GraphQLESLintRule<any[], false>;
13
9
  'description-style': import("..").GraphQLESLintRule<[{
14
10
  style: "block" | "inline";
15
11
  }], false>;
@@ -159,11 +155,13 @@ export declare const rules: {
159
155
  'no-anonymous-operations': import("..").GraphQLESLintRule<any[], false>;
160
156
  'no-case-insensitive-enum-values-duplicates': import("..").GraphQLESLintRule<any[], false>;
161
157
  'no-deprecated': import("..").GraphQLESLintRule<[], true>;
158
+ 'no-duplicate-fields': import("..").GraphQLESLintRule<any[], false>;
162
159
  'no-hashtag-description': import("..").GraphQLESLintRule<any[], false>;
163
- 'no-operation-name-suffix': import("..").GraphQLESLintRule<any[], false>;
164
160
  'no-root-type': import("..").GraphQLESLintRule<[{
165
161
  disallow: ("query" | "mutation" | "subscription")[];
166
162
  }], false>;
163
+ 'no-scalar-result-type-on-mutation': import("..").GraphQLESLintRule<any[], false>;
164
+ 'no-typename-prefix': import("..").GraphQLESLintRule<any[], false>;
167
165
  'no-unreachable-types': import("..").GraphQLESLintRule<any[], false>;
168
166
  'no-unused-fields': import("..").GraphQLESLintRule<any[], false>;
169
167
  'require-deprecation-date': import("..").GraphQLESLintRule<[{
@@ -1,50 +0,0 @@
1
- # `avoid-operation-name-prefix`
2
-
3
- - Category: `Stylistic Issues`
4
- - Rule name: `@graphql-eslint/avoid-operation-name-prefix`
5
- - Requires GraphQL Schema: `false` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
6
- - Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
7
-
8
- Enforce/avoid operation name prefix, useful if you wish to avoid prefix in your root fields, or avoid using REST terminology in your schema.
9
-
10
- ## Usage Examples
11
-
12
- ### Incorrect
13
-
14
- ```graphql
15
- # eslint @graphql-eslint/avoid-operation-name-prefix: ['error', { keywords: ['get'] }]
16
-
17
- query getUserDetails {
18
- # ...
19
- }
20
- ```
21
-
22
- ### Correct
23
-
24
- ```graphql
25
- # eslint @graphql-eslint/avoid-operation-name-prefix: ['error', { keywords: ['get'] }]
26
-
27
- query userDetails {
28
- # ...
29
- }
30
- ```
31
-
32
- ## Config Schema
33
-
34
- The schema defines the following properties:
35
-
36
- ### `caseSensitive` (boolean)
37
-
38
- Default: `false`
39
-
40
- ### `keywords` (array, required)
41
-
42
- The object is an array with all elements of the type `string`.
43
-
44
- Additional restrictions:
45
-
46
- * Minimum items: `1`
47
-
48
- ## Resources
49
-
50
- - [Rule source](../../packages/plugin/src/rules/avoid-operation-name-prefix.ts)
@@ -1,38 +0,0 @@
1
- # `no-operation-name-suffix`
2
-
3
- ✅ The `"extends": "plugin:@graphql-eslint/recommended"` property in a configuration file enables this rule.
4
-
5
- 🔧 The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#--fix) can automatically fix some of the problems reported by this rule.
6
-
7
- - Category: `Stylistic Issues`
8
- - Rule name: `@graphql-eslint/no-operation-name-suffix`
9
- - Requires GraphQL Schema: `false` [ℹ️](../../README.md#extended-linting-rules-with-graphql-schema)
10
- - Requires GraphQL Operations: `false` [ℹ️](../../README.md#extended-linting-rules-with-siblings-operations)
11
-
12
- Makes sure you are not adding the operation type to the name of the operation.
13
-
14
- ## Usage Examples
15
-
16
- ### Incorrect
17
-
18
- ```graphql
19
- # eslint @graphql-eslint/no-operation-name-suffix: 'error'
20
-
21
- query userQuery {
22
- # ...
23
- }
24
- ```
25
-
26
- ### Correct
27
-
28
- ```graphql
29
- # eslint @graphql-eslint/no-operation-name-suffix: 'error'
30
-
31
- query user {
32
- # ...
33
- }
34
- ```
35
-
36
- ## Resources
37
-
38
- - [Rule source](../../packages/plugin/src/rules/no-operation-name-suffix.ts)
@@ -1,9 +0,0 @@
1
- import { GraphQLESLintRule } from '../types';
2
- export declare type AvoidOperationNamePrefixConfig = [
3
- {
4
- keywords: string[];
5
- caseSensitive?: boolean;
6
- }
7
- ];
8
- declare const rule: GraphQLESLintRule<AvoidOperationNamePrefixConfig>;
9
- export default rule;
@@ -1,3 +0,0 @@
1
- import { GraphQLESLintRule } from '../types';
2
- declare const rule: GraphQLESLintRule;
3
- export default rule;