@graphql-eslint/eslint-plugin 3.8.0-alpha-2d2b247.0 → 3.8.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.
@@ -1,5 +1,6 @@
1
- import { CaseStyle } from '../utils';
1
+ import { CaseStyle as _CaseStyle } from '../utils';
2
2
  import { GraphQLESLintRule } from '../types';
3
+ declare type CaseStyle = _CaseStyle | 'matchDocumentStyle';
3
4
  declare const ACCEPTED_EXTENSIONS: ['.gql', '.graphql'];
4
5
  declare type PropertySchema = {
5
6
  style?: CaseStyle;
@@ -1,6 +1,6 @@
1
1
  import { Kind } from 'graphql';
2
2
  import { GraphQLESLintRule } from '../types';
3
- declare const ALLOWED_KINDS: readonly [Kind.OBJECT_TYPE_DEFINITION, Kind.INTERFACE_TYPE_DEFINITION, Kind.ENUM_TYPE_DEFINITION, Kind.SCALAR_TYPE_DEFINITION, Kind.INPUT_OBJECT_TYPE_DEFINITION, Kind.UNION_TYPE_DEFINITION, Kind.FIELD_DEFINITION, Kind.INPUT_VALUE_DEFINITION, Kind.ENUM_VALUE_DEFINITION, Kind.DIRECTIVE_DEFINITION, Kind.OPERATION_DEFINITION];
3
+ declare const ALLOWED_KINDS: readonly [Kind.OBJECT_TYPE_DEFINITION, Kind.INTERFACE_TYPE_DEFINITION, Kind.ENUM_TYPE_DEFINITION, Kind.SCALAR_TYPE_DEFINITION, Kind.INPUT_OBJECT_TYPE_DEFINITION, Kind.UNION_TYPE_DEFINITION, Kind.DIRECTIVE_DEFINITION, Kind.FIELD_DEFINITION, Kind.INPUT_VALUE_DEFINITION, Kind.ENUM_VALUE_DEFINITION, Kind.OPERATION_DEFINITION];
4
4
  declare type AllowedKind = typeof ALLOWED_KINDS[number];
5
5
  export declare type RequireDescriptionRuleConfig = {
6
6
  types?: boolean;
package/utils.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { GraphQLSchema, Source, Kind } from 'graphql';
2
- import { AST } from 'eslint';
1
+ import { GraphQLSchema, Kind } from 'graphql';
2
+ import type { AST } from 'eslint';
3
3
  import { Source as LoaderSource } from '@graphql-tools/utils';
4
4
  import { GraphQLESLintRuleContext } from './types';
5
5
  import { SiblingOperations } from './sibling-operations';
6
- import { UsedFields, ReachableTypes } from './graphql-ast';
6
+ import { ReachableTypes, UsedFields } from './graphql-ast';
7
7
  export declare function requireSiblingsOperations(ruleName: string, context: GraphQLESLintRuleContext): SiblingOperations | never;
8
8
  export declare function requireGraphQLSchemaFromContext(ruleName: string, context: GraphQLESLintRuleContext): GraphQLSchema | never;
9
9
  export declare const logger: {
@@ -12,7 +12,6 @@ export declare const logger: {
12
12
  };
13
13
  export declare function requireReachableTypesFromContext(ruleName: string, context: GraphQLESLintRuleContext): ReachableTypes | never;
14
14
  export declare function requireUsedFieldsFromContext(ruleName: string, context: GraphQLESLintRuleContext): UsedFields | never;
15
- export declare function extractTokens(source: Source): AST.Token[];
16
15
  export declare const normalizePath: (path: string) => string;
17
16
  /**
18
17
  * https://github.com/prettier/eslint-plugin-prettier/blob/76bd45ece6d56eb52f75db6b4a1efdd2efb56392/eslint-plugin-prettier.js#L71
@@ -27,7 +26,4 @@ export declare const TYPES_KINDS: readonly [Kind.OBJECT_TYPE_DEFINITION, Kind.IN
27
26
  export declare type CaseStyle = 'camelCase' | 'PascalCase' | 'snake_case' | 'UPPER_CASE' | 'kebab-case';
28
27
  export declare const camelCase: (str: string) => string;
29
28
  export declare const convertCase: (style: CaseStyle, str: string) => string;
30
- export declare function getLocation(loc: Partial<AST.SourceLocation>, fieldName?: string, offset?: {
31
- offsetStart?: number;
32
- offsetEnd?: number;
33
- }): AST.SourceLocation;
29
+ export declare function getLocation(loc: Partial<AST.SourceLocation>, fieldName?: string): AST.SourceLocation;