@graphql-eslint/eslint-plugin 3.14.3 → 3.14.4-alpha-20221229152648-0a153c6
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/cache.js +3 -2
- package/cjs/documents.js +8 -5
- package/cjs/estree-converter/converter.js +1 -1
- package/cjs/parser.js +4 -2
- package/cjs/processor.js +4 -2
- package/cjs/rules/alphabetize.js +5 -3
- package/cjs/rules/graphql-js-validation.js +9 -6
- package/cjs/rules/input-name.js +5 -4
- package/cjs/rules/naming-convention.js +2 -2
- package/cjs/rules/no-case-insensitive-enum-values-duplicates.js +3 -2
- package/cjs/rules/no-duplicate-fields.js +2 -2
- package/cjs/rules/no-hashtag-description.js +3 -0
- package/cjs/rules/no-root-type.js +1 -1
- package/cjs/rules/no-typename-prefix.js +1 -1
- package/cjs/rules/no-unreachable-types.js +1 -1
- package/cjs/rules/relay-arguments.js +2 -1
- package/cjs/rules/relay-connection-types.js +2 -2
- package/cjs/rules/relay-edge-types.js +7 -4
- package/cjs/rules/relay-page-info.js +2 -1
- package/cjs/rules/require-deprecation-date.js +2 -2
- package/cjs/rules/require-deprecation-reason.js +2 -1
- package/cjs/rules/require-description.js +1 -1
- package/cjs/rules/require-field-of-type-query-in-mutation-result.js +1 -1
- package/cjs/rules/require-id-when-available.js +2 -1
- package/cjs/rules/require-nullable-fields-with-oneof.js +2 -2
- package/cjs/rules/require-type-pattern-with-oneof.js +2 -1
- package/cjs/rules/strict-id-in-types.js +4 -4
- package/cjs/rules/unique-fragment-name.js +1 -0
- package/cjs/schema.js +3 -1
- package/cjs/testkit.js +4 -7
- package/cjs/utils.js +11 -5
- package/esm/cache.js +3 -2
- package/esm/documents.js +8 -5
- package/esm/estree-converter/converter.js +1 -1
- package/esm/graphql-config.js +1 -1
- package/esm/parser.js +4 -2
- package/esm/processor.js +5 -3
- package/esm/rules/alphabetize.js +6 -4
- package/esm/rules/graphql-js-validation.js +9 -6
- package/esm/rules/input-name.js +5 -4
- package/esm/rules/naming-convention.js +3 -3
- package/esm/rules/no-case-insensitive-enum-values-duplicates.js +3 -2
- package/esm/rules/no-duplicate-fields.js +2 -2
- package/esm/rules/no-hashtag-description.js +3 -0
- package/esm/rules/no-root-type.js +2 -2
- package/esm/rules/no-typename-prefix.js +1 -1
- package/esm/rules/no-unreachable-types.js +1 -1
- package/esm/rules/relay-arguments.js +2 -1
- package/esm/rules/relay-connection-types.js +2 -2
- package/esm/rules/relay-edge-types.js +7 -4
- package/esm/rules/relay-page-info.js +2 -1
- package/esm/rules/require-deprecation-date.js +2 -2
- package/esm/rules/require-deprecation-reason.js +2 -1
- package/esm/rules/require-description.js +1 -1
- package/esm/rules/require-field-of-type-query-in-mutation-result.js +1 -1
- package/esm/rules/require-id-when-available.js +2 -1
- package/esm/rules/require-nullable-fields-with-oneof.js +2 -2
- package/esm/rules/require-type-pattern-with-oneof.js +2 -1
- package/esm/rules/strict-id-in-types.js +5 -5
- package/esm/rules/unique-fragment-name.js +1 -0
- package/esm/schema.js +3 -1
- package/esm/testkit.js +4 -7
- package/esm/utils.js +9 -4
- package/package.json +1 -1
- package/typings/cache.d.cts +1 -1
- package/typings/cache.d.ts +1 -1
- package/typings/estree-converter/types.d.cts +4 -4
- package/typings/estree-converter/types.d.ts +4 -4
- package/typings/estree-converter/utils.d.cts +2 -2
- package/typings/estree-converter/utils.d.ts +2 -2
- package/typings/rules/index.d.cts +68 -68
- package/typings/rules/index.d.ts +68 -68
- package/typings/testkit.d.cts +6 -4
- package/typings/testkit.d.ts +6 -4
- package/typings/types.d.cts +4 -3
- package/typings/types.d.ts +4 -3
- package/typings/utils.d.cts +8 -5
- package/typings/utils.d.ts +8 -5
package/typings/utils.d.ts
CHANGED
@@ -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:
|
10
|
-
warn: (...args:
|
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:
|
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:
|
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 {};
|