@graphql-eslint/eslint-plugin 3.20.1 → 4.0.0-alpha-20230801163310-8bc4340
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/flat-configs.d.ts +1 -1
- package/cjs/graphql-config.d.ts +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +0 -2
- package/cjs/parser.d.ts +1 -1
- package/cjs/rules/alphabetize.d.ts +1 -1
- package/cjs/rules/description-style.d.ts +1 -1
- package/cjs/rules/graphql-js-validation.d.ts +1 -1
- package/cjs/rules/index.d.ts +1 -1
- package/cjs/rules/input-name.d.ts +1 -1
- package/cjs/rules/lone-executable-definition.d.ts +1 -1
- package/cjs/rules/match-document-filename.d.ts +1 -1
- package/cjs/rules/naming-convention.d.ts +1 -1
- package/cjs/rules/no-anonymous-operations.d.ts +1 -1
- package/cjs/rules/no-case-insensitive-enum-values-duplicates.d.ts +1 -1
- package/cjs/rules/no-deprecated.d.ts +1 -1
- package/cjs/rules/no-duplicate-fields.d.ts +1 -1
- package/cjs/rules/no-hashtag-description.d.ts +1 -1
- package/cjs/rules/no-one-place-fragments.d.ts +1 -1
- package/cjs/rules/no-root-type.d.ts +1 -1
- package/cjs/rules/no-scalar-result-type-on-mutation.d.ts +1 -1
- package/cjs/rules/no-typename-prefix.d.ts +1 -1
- package/cjs/rules/no-unreachable-types.d.ts +1 -1
- package/cjs/rules/no-unused-fields.d.ts +1 -1
- package/cjs/rules/relay-arguments.d.ts +1 -1
- package/cjs/rules/relay-connection-types.d.ts +1 -1
- package/cjs/rules/relay-edge-types.d.ts +1 -1
- package/cjs/rules/relay-page-info.d.ts +1 -1
- package/cjs/rules/require-deprecation-date.d.ts +1 -1
- package/cjs/rules/require-deprecation-reason.d.ts +1 -1
- package/cjs/rules/require-description.d.ts +1 -1
- package/cjs/rules/require-field-of-type-query-in-mutation-result.d.ts +1 -1
- package/cjs/rules/require-id-when-available.d.ts +1 -1
- package/cjs/rules/require-import-fragment.d.ts +1 -1
- package/cjs/rules/require-nullable-fields-with-oneof.d.ts +1 -1
- package/cjs/rules/require-nullable-result-in-root.d.ts +1 -1
- package/cjs/rules/require-type-pattern-with-oneof.d.ts +1 -1
- package/cjs/rules/selection-set-depth.d.ts +1 -1
- package/cjs/rules/strict-id-in-types.d.ts +1 -1
- package/cjs/rules/unique-fragment-name.d.ts +1 -1
- package/cjs/rules/unique-operation-name.d.ts +1 -1
- package/cjs/schema.d.ts +1 -1
- package/cjs/siblings.d.ts +1 -1
- package/cjs/{types-e3367e3c.d.ts → types-8d5f4ae0.d.ts} +6 -28
- package/cjs/types.d.ts +1 -1
- package/cjs/utils.d.ts +1 -1
- package/esm/flat-configs.d.mts +1 -1
- package/esm/graphql-config.d.mts +1 -1
- package/esm/index.d.mts +1 -1
- package/esm/index.js +0 -1
- package/esm/parser.d.mts +1 -1
- package/esm/rules/alphabetize.d.mts +1 -1
- package/esm/rules/description-style.d.mts +1 -1
- package/esm/rules/graphql-js-validation.d.mts +1 -1
- package/esm/rules/index.d.mts +1 -1
- package/esm/rules/input-name.d.mts +1 -1
- package/esm/rules/lone-executable-definition.d.mts +1 -1
- package/esm/rules/match-document-filename.d.mts +1 -1
- package/esm/rules/naming-convention.d.mts +1 -1
- package/esm/rules/no-anonymous-operations.d.mts +1 -1
- package/esm/rules/no-case-insensitive-enum-values-duplicates.d.mts +1 -1
- package/esm/rules/no-deprecated.d.mts +1 -1
- package/esm/rules/no-duplicate-fields.d.mts +1 -1
- package/esm/rules/no-hashtag-description.d.mts +1 -1
- package/esm/rules/no-one-place-fragments.d.mts +1 -1
- package/esm/rules/no-root-type.d.mts +1 -1
- package/esm/rules/no-scalar-result-type-on-mutation.d.mts +1 -1
- package/esm/rules/no-typename-prefix.d.mts +1 -1
- package/esm/rules/no-unreachable-types.d.mts +1 -1
- package/esm/rules/no-unused-fields.d.mts +1 -1
- package/esm/rules/relay-arguments.d.mts +1 -1
- package/esm/rules/relay-connection-types.d.mts +1 -1
- package/esm/rules/relay-edge-types.d.mts +1 -1
- package/esm/rules/relay-page-info.d.mts +1 -1
- package/esm/rules/require-deprecation-date.d.mts +1 -1
- package/esm/rules/require-deprecation-reason.d.mts +1 -1
- package/esm/rules/require-description.d.mts +1 -1
- package/esm/rules/require-field-of-type-query-in-mutation-result.d.mts +1 -1
- package/esm/rules/require-id-when-available.d.mts +1 -1
- package/esm/rules/require-import-fragment.d.mts +1 -1
- package/esm/rules/require-nullable-fields-with-oneof.d.mts +1 -1
- package/esm/rules/require-nullable-result-in-root.d.mts +1 -1
- package/esm/rules/require-type-pattern-with-oneof.d.mts +1 -1
- package/esm/rules/selection-set-depth.d.mts +1 -1
- package/esm/rules/strict-id-in-types.d.mts +1 -1
- package/esm/rules/unique-fragment-name.d.mts +1 -1
- package/esm/rules/unique-operation-name.d.mts +1 -1
- package/esm/schema.d.mts +1 -1
- package/esm/siblings.d.mts +1 -1
- package/esm/{types-2e1afd7c.d.ts → types-ace77d86.d.ts} +6 -28
- package/esm/types.d.mts +1 -1
- package/esm/utils.d.mts +1 -1
- package/package.json +1 -2
- package/cjs/testkit.d.ts +0 -8
- package/cjs/testkit.js +0 -183
- package/esm/testkit.d.mts +0 -8
- package/esm/testkit.js +0 -152
package/cjs/flat-configs.d.ts
CHANGED
package/cjs/graphql-config.d.ts
CHANGED
package/cjs/index.d.ts
CHANGED
@@ -2,7 +2,7 @@ import * as eslint from 'eslint';
|
|
2
2
|
import { Block } from './processor.js';
|
3
3
|
export { parseForESLint } from './parser.js';
|
4
4
|
export { rules } from './rules/index.js';
|
5
|
-
export { C as CategoryType,
|
5
|
+
export { C as CategoryType, G as GraphQLESLintParseResult, f as GraphQLESLintRule, c as GraphQLESLintRuleContext, e as GraphQLESLintRuleListener, O as OmitRecursively, P as ParserOptions, b as ParserServices, a as Pointer, R as ReportDescriptor, d as RuleDocsInfo, S as Schema, V as ValueOf } from './types-8d5f4ae0.js';
|
6
6
|
export { requireGraphQLSchemaFromContext, requireSiblingsOperations } from './utils.js';
|
7
7
|
export { configs } from './configs/index.js';
|
8
8
|
export { flatConfigs } from './flat-configs.js';
|
package/cjs/index.js
CHANGED
@@ -31,7 +31,6 @@ module.exports = __toCommonJS(src_exports);
|
|
31
31
|
var import_processor = require("./processor.js");
|
32
32
|
var import_parser = require("./parser.js");
|
33
33
|
var import_rules = require("./rules/index.js");
|
34
|
-
__reExport(src_exports, require("./testkit.js"), module.exports);
|
35
34
|
__reExport(src_exports, require("./types.js"), module.exports);
|
36
35
|
var import_utils = require("./utils.js");
|
37
36
|
var import_configs = require("./configs/index.js");
|
@@ -46,6 +45,5 @@ const processors = { graphql: import_processor.processor };
|
|
46
45
|
requireGraphQLSchemaFromContext,
|
47
46
|
requireSiblingsOperations,
|
48
47
|
rules,
|
49
|
-
...require("./testkit.js"),
|
50
48
|
...require("./types.js")
|
51
49
|
});
|
package/cjs/parser.d.ts
CHANGED
package/cjs/rules/index.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { RuleOptions } from './require-description.js';
|
2
2
|
import { CaseStyle } from '../utils.js';
|
3
|
-
import {
|
3
|
+
import { f as GraphQLESLintRule } from '../types-8d5f4ae0.js';
|
4
4
|
import * as json_schema_to_ts_lib_types_type_utils_writable_js from 'json-schema-to-ts/lib/types/type-utils/writable.js';
|
5
5
|
import 'graphql';
|
6
6
|
import 'eslint';
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { FromSchema } from 'json-schema-to-ts';
|
2
|
-
import {
|
2
|
+
import { f as GraphQLESLintRule } from '../types-8d5f4ae0.js';
|
3
3
|
import { CaseStyle as CaseStyle$1 } from '../utils.js';
|
4
4
|
import '@graphql-tools/utils';
|
5
5
|
import 'eslint';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ExecutableDefinitionNode } from 'graphql';
|
2
2
|
import { GraphQLESTreeNode } from '../estree-converter/types.js';
|
3
|
-
import {
|
3
|
+
import { c as GraphQLESLintRuleContext, f as GraphQLESLintRule } from '../types-8d5f4ae0.js';
|
4
4
|
import 'eslint';
|
5
5
|
import 'estree';
|
6
6
|
import '@graphql-tools/utils';
|
package/cjs/schema.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { GraphQLProjectConfig } from 'graphql-config';
|
2
|
-
import { P as ParserOptions, S as Schema } from './types-
|
2
|
+
import { P as ParserOptions, S as Schema } from './types-8d5f4ae0.js';
|
3
3
|
import '@graphql-tools/utils';
|
4
4
|
import 'eslint';
|
5
5
|
import 'estree';
|
package/cjs/siblings.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import 'graphql';
|
2
2
|
import 'graphql-config';
|
3
|
-
export { F as FragmentSource,
|
3
|
+
export { F as FragmentSource, h as OperationSource, g as SiblingOperations, i as getSiblings } from './types-8d5f4ae0.js';
|
4
4
|
import '@graphql-tools/utils';
|
5
5
|
import 'eslint';
|
6
6
|
import 'estree';
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { GraphQLParseOptions } from '@graphql-tools/utils';
|
2
|
-
import {
|
2
|
+
import { Linter, Rule, AST } from 'eslint';
|
3
3
|
import * as ESTree from 'estree';
|
4
|
-
import { FragmentDefinitionNode, OperationDefinitionNode, SelectionSetNode, OperationTypeNode,
|
4
|
+
import { FragmentDefinitionNode, OperationDefinitionNode, SelectionSetNode, OperationTypeNode, GraphQLSchema, ASTKindToNode } from 'graphql';
|
5
5
|
import { GraphQLProjectConfig, IExtensions, IGraphQLProject } from 'graphql-config';
|
6
6
|
import { JSONSchema } from 'json-schema-to-ts';
|
7
7
|
import { GraphQLESTreeNode } from './estree-converter/types.js';
|
@@ -26,31 +26,6 @@ type SiblingOperations = {
|
|
26
26
|
};
|
27
27
|
declare function getSiblings(project?: GraphQLProjectConfig, documents?: ParserOptions['documents']): SiblingOperations;
|
28
28
|
|
29
|
-
type GraphQLESLintRuleListener<WithTypeInfo extends boolean = false> = Record<string, any> & {
|
30
|
-
[K in keyof ASTKindToNode]?: (node: GraphQLESTreeNode<ASTKindToNode[K], WithTypeInfo>) => void;
|
31
|
-
};
|
32
|
-
type GraphQLValidTestCase<Options = []> = Omit<RuleTester.ValidTestCase, 'options' | 'parserOptions'> & {
|
33
|
-
options?: Options;
|
34
|
-
parserOptions?: Omit<ParserOptions, 'filePath'>;
|
35
|
-
};
|
36
|
-
type GraphQLInvalidTestCase<T = []> = GraphQLValidTestCase<T> & {
|
37
|
-
errors: (RuleTester.TestCaseError | string)[] | number;
|
38
|
-
output?: string | null;
|
39
|
-
};
|
40
|
-
type RuleTesterConfig = {
|
41
|
-
parser: string;
|
42
|
-
parserOptions: Omit<ParserOptions, 'filePath'>;
|
43
|
-
};
|
44
|
-
declare class GraphQLRuleTester extends RuleTester {
|
45
|
-
config: RuleTesterConfig;
|
46
|
-
constructor(parserOptions?: Omit<ParserOptions, 'filePath'>);
|
47
|
-
fromMockFile(path: string): string;
|
48
|
-
runGraphQLTests<Options, WithTypeInfo extends boolean = false>(ruleId: string, rule: GraphQLESLintRule<Options, WithTypeInfo>, tests: {
|
49
|
-
valid: (GraphQLValidTestCase<Options> | string)[];
|
50
|
-
invalid: GraphQLInvalidTestCase<Options>[];
|
51
|
-
}): void;
|
52
|
-
}
|
53
|
-
|
54
29
|
type Schema = GraphQLSchema | null;
|
55
30
|
type Pointer = string | string[];
|
56
31
|
interface ParserOptions {
|
@@ -110,6 +85,9 @@ type RuleDocsInfo<T> = Omit<RuleMetaDataDocs, 'category' | 'suggestion'> & {
|
|
110
85
|
graphQLJSRuleName?: string;
|
111
86
|
isDisabledForAllConfig?: true;
|
112
87
|
};
|
88
|
+
type GraphQLESLintRuleListener<WithTypeInfo extends boolean = false> = Record<string, any> & {
|
89
|
+
[K in keyof ASTKindToNode]?: (node: GraphQLESTreeNode<ASTKindToNode[K], WithTypeInfo>) => void;
|
90
|
+
};
|
113
91
|
type GraphQLESLintRule<Options = [], WithTypeInfo extends boolean = false> = {
|
114
92
|
meta: Omit<Rule.RuleMetaData, 'docs' | 'schema'> & {
|
115
93
|
docs?: RuleDocsInfo<Options>;
|
@@ -126,4 +104,4 @@ type OmitRecursively<T extends object, K extends PropertyKey> = Omit<{
|
|
126
104
|
[P in keyof T]: OmitDistributive<T[P], K>;
|
127
105
|
}, K>;
|
128
106
|
|
129
|
-
export { CategoryType as C, FragmentSource as F,
|
107
|
+
export { CategoryType as C, FragmentSource as F, GraphQLESLintParseResult as G, OmitRecursively as O, ParserOptions as P, ReportDescriptor as R, Schema as S, ValueOf as V, Pointer as a, ParserServices as b, GraphQLESLintRuleContext as c, RuleDocsInfo as d, GraphQLESLintRuleListener as e, GraphQLESLintRule as f, SiblingOperations as g, OperationSource as h, getSiblings as i };
|
package/cjs/types.d.ts
CHANGED
@@ -4,5 +4,5 @@ import 'estree';
|
|
4
4
|
import 'graphql';
|
5
5
|
import 'graphql-config';
|
6
6
|
import 'json-schema-to-ts';
|
7
|
-
export { C as CategoryType,
|
7
|
+
export { C as CategoryType, G as GraphQLESLintParseResult, f as GraphQLESLintRule, c as GraphQLESLintRuleContext, e as GraphQLESLintRuleListener, O as OmitRecursively, P as ParserOptions, b as ParserServices, a as Pointer, R as ReportDescriptor, d as RuleDocsInfo, S as Schema, V as ValueOf } from './types-8d5f4ae0.js';
|
8
8
|
import './estree-converter/types.js';
|
package/cjs/utils.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { AST } from 'eslint';
|
2
2
|
import { Position } from 'estree';
|
3
3
|
import { GraphQLSchema, ASTNode, Kind } from 'graphql';
|
4
|
-
import {
|
4
|
+
import { c as GraphQLESLintRuleContext, g as SiblingOperations } from './types-8d5f4ae0.js';
|
5
5
|
import { GraphQLESTreeNode } from './estree-converter/types.js';
|
6
6
|
import '@graphql-tools/utils';
|
7
7
|
import 'graphql-config';
|
package/esm/flat-configs.d.mts
CHANGED
package/esm/graphql-config.d.mts
CHANGED
package/esm/index.d.mts
CHANGED
@@ -2,7 +2,7 @@ import * as eslint from 'eslint';
|
|
2
2
|
import { Block } from './processor.mjs';
|
3
3
|
export { parseForESLint } from './parser.mjs';
|
4
4
|
export { rules } from './rules/index.mjs';
|
5
|
-
export { C as CategoryType,
|
5
|
+
export { C as CategoryType, G as GraphQLESLintParseResult, f as GraphQLESLintRule, c as GraphQLESLintRuleContext, e as GraphQLESLintRuleListener, O as OmitRecursively, P as ParserOptions, b as ParserServices, a as Pointer, R as ReportDescriptor, d as RuleDocsInfo, S as Schema, V as ValueOf } from './types-ace77d86.js';
|
6
6
|
export { requireGraphQLSchemaFromContext, requireSiblingsOperations } from './utils.mjs';
|
7
7
|
export { configs } from './configs/index.mjs';
|
8
8
|
export { flatConfigs } from './flat-configs.mjs';
|
package/esm/index.js
CHANGED
@@ -2,7 +2,6 @@ import "./chunk-BMTV3EA2.js";
|
|
2
2
|
import { processor } from "./processor.js";
|
3
3
|
import { parseForESLint } from "./parser.js";
|
4
4
|
import { rules } from "./rules/index.js";
|
5
|
-
export * from "./testkit.js";
|
6
5
|
export * from "./types.js";
|
7
6
|
import { requireGraphQLSchemaFromContext, requireSiblingsOperations } from "./utils.js";
|
8
7
|
const processors = { graphql: processor };
|
package/esm/parser.d.mts
CHANGED
package/esm/rules/index.d.mts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { RuleOptions } from './require-description.mjs';
|
2
2
|
import { CaseStyle } from '../utils.mjs';
|
3
|
-
import {
|
3
|
+
import { f as GraphQLESLintRule } from '../types-ace77d86.js';
|
4
4
|
import * as json_schema_to_ts_lib_types_type_utils_writable_js from 'json-schema-to-ts/lib/types/type-utils/writable.js';
|
5
5
|
import 'graphql';
|
6
6
|
import 'eslint';
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { FromSchema } from 'json-schema-to-ts';
|
2
|
-
import {
|
2
|
+
import { f as GraphQLESLintRule } from '../types-ace77d86.js';
|
3
3
|
import { CaseStyle as CaseStyle$1 } from '../utils.mjs';
|
4
4
|
import '@graphql-tools/utils';
|
5
5
|
import 'eslint';
|