@graphql-eslint/eslint-plugin 3.14.3 → 3.14.4-alpha-20221229151835-f439b5b

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. package/cjs/cache.js +3 -2
  2. package/cjs/documents.js +8 -5
  3. package/cjs/estree-converter/converter.js +1 -1
  4. package/cjs/parser.js +4 -2
  5. package/cjs/processor.js +4 -2
  6. package/cjs/rules/alphabetize.js +5 -3
  7. package/cjs/rules/graphql-js-validation.js +9 -6
  8. package/cjs/rules/input-name.js +5 -4
  9. package/cjs/rules/naming-convention.js +2 -2
  10. package/cjs/rules/no-case-insensitive-enum-values-duplicates.js +3 -2
  11. package/cjs/rules/no-duplicate-fields.js +2 -2
  12. package/cjs/rules/no-hashtag-description.js +3 -0
  13. package/cjs/rules/no-root-type.js +1 -1
  14. package/cjs/rules/no-typename-prefix.js +1 -1
  15. package/cjs/rules/no-unreachable-types.js +1 -1
  16. package/cjs/rules/relay-arguments.js +2 -1
  17. package/cjs/rules/relay-connection-types.js +2 -2
  18. package/cjs/rules/relay-edge-types.js +7 -4
  19. package/cjs/rules/relay-page-info.js +2 -1
  20. package/cjs/rules/require-deprecation-date.js +2 -2
  21. package/cjs/rules/require-deprecation-reason.js +2 -1
  22. package/cjs/rules/require-description.js +1 -1
  23. package/cjs/rules/require-field-of-type-query-in-mutation-result.js +1 -1
  24. package/cjs/rules/require-id-when-available.js +2 -1
  25. package/cjs/rules/require-nullable-fields-with-oneof.js +2 -2
  26. package/cjs/rules/require-type-pattern-with-oneof.js +2 -1
  27. package/cjs/rules/strict-id-in-types.js +4 -4
  28. package/cjs/rules/unique-fragment-name.js +1 -0
  29. package/cjs/schema.js +3 -1
  30. package/cjs/testkit.js +4 -7
  31. package/cjs/utils.js +11 -5
  32. package/esm/cache.js +3 -2
  33. package/esm/documents.js +8 -5
  34. package/esm/estree-converter/converter.js +1 -1
  35. package/esm/graphql-config.js +1 -1
  36. package/esm/parser.js +4 -2
  37. package/esm/processor.js +5 -3
  38. package/esm/rules/alphabetize.js +6 -4
  39. package/esm/rules/graphql-js-validation.js +9 -6
  40. package/esm/rules/input-name.js +5 -4
  41. package/esm/rules/naming-convention.js +3 -3
  42. package/esm/rules/no-case-insensitive-enum-values-duplicates.js +3 -2
  43. package/esm/rules/no-duplicate-fields.js +2 -2
  44. package/esm/rules/no-hashtag-description.js +3 -0
  45. package/esm/rules/no-root-type.js +2 -2
  46. package/esm/rules/no-typename-prefix.js +1 -1
  47. package/esm/rules/no-unreachable-types.js +1 -1
  48. package/esm/rules/relay-arguments.js +2 -1
  49. package/esm/rules/relay-connection-types.js +2 -2
  50. package/esm/rules/relay-edge-types.js +7 -4
  51. package/esm/rules/relay-page-info.js +2 -1
  52. package/esm/rules/require-deprecation-date.js +2 -2
  53. package/esm/rules/require-deprecation-reason.js +2 -1
  54. package/esm/rules/require-description.js +1 -1
  55. package/esm/rules/require-field-of-type-query-in-mutation-result.js +1 -1
  56. package/esm/rules/require-id-when-available.js +2 -1
  57. package/esm/rules/require-nullable-fields-with-oneof.js +2 -2
  58. package/esm/rules/require-type-pattern-with-oneof.js +2 -1
  59. package/esm/rules/strict-id-in-types.js +5 -5
  60. package/esm/rules/unique-fragment-name.js +1 -0
  61. package/esm/schema.js +3 -1
  62. package/esm/testkit.js +4 -7
  63. package/esm/utils.js +9 -4
  64. package/package.json +1 -1
  65. package/typings/cache.d.cts +1 -1
  66. package/typings/cache.d.ts +1 -1
  67. package/typings/estree-converter/types.d.cts +4 -4
  68. package/typings/estree-converter/types.d.ts +4 -4
  69. package/typings/estree-converter/utils.d.cts +2 -2
  70. package/typings/estree-converter/utils.d.ts +2 -2
  71. package/typings/rules/index.d.cts +68 -68
  72. package/typings/rules/index.d.ts +68 -68
  73. package/typings/testkit.d.cts +6 -4
  74. package/typings/testkit.d.ts +6 -4
  75. package/typings/types.d.cts +4 -3
  76. package/typings/types.d.ts +4 -3
  77. package/typings/utils.d.cts +8 -5
  78. package/typings/utils.d.ts +8 -5
@@ -1,4 +1,4 @@
1
- import { GraphQLSchema, Kind } from 'graphql';
1
+ import { ASTNode, GraphQLSchema, Kind } from 'graphql';
2
2
  import { AST } from 'eslint';
3
3
  import { Position } from 'estree';
4
4
  import { GraphQLESLintRuleContext } from './types.js';
@@ -6,13 +6,13 @@ import { SiblingOperations } from './documents.js';
6
6
  export declare function requireSiblingsOperations(ruleId: string, context: GraphQLESLintRuleContext): SiblingOperations | never;
7
7
  export declare function requireGraphQLSchemaFromContext(ruleId: string, context: GraphQLESLintRuleContext): GraphQLSchema | never;
8
8
  export declare const logger: {
9
- error: (...args: any[]) => void;
10
- warn: (...args: any[]) => void;
9
+ error: (...args: unknown[]) => void;
10
+ warn: (...args: unknown[]) => void;
11
11
  };
12
12
  export declare const normalizePath: (path: string) => string;
13
13
  export declare const VIRTUAL_DOCUMENT_REGEX: RegExp;
14
14
  export declare const CWD: string;
15
- export declare const getTypeName: (node: any) => string;
15
+ export declare const getTypeName: (node: ASTNode) => string;
16
16
  export declare const TYPES_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];
17
17
  export type CaseStyle = 'camelCase' | 'PascalCase' | 'snake_case' | 'UPPER_CASE' | 'kebab-case';
18
18
  export declare const pascalCase: (str: string) => string;
@@ -31,4 +31,7 @@ export declare const ARRAY_DEFAULT_OPTIONS: {
31
31
  readonly type: "string";
32
32
  };
33
33
  };
34
- export declare const englishJoinWords: (words: any) => string;
34
+ export declare const englishJoinWords: (words: string[]) => string;
35
+ type Truthy<T> = T extends false | '' | 0 | null | undefined ? never : T;
36
+ export declare function truthy<T>(value: T): value is Truthy<T>;
37
+ export {};