@graphql-eslint/eslint-plugin 2.3.0-alpha-6ba4002.0 → 2.4.0-alpha-be7d9d8.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/README.md +1 -1
- package/configs/all.d.ts +7 -0
- package/configs/index.d.ts +7 -0
- package/docs/README.md +1 -0
- package/docs/custom-rules.md +2 -2
- package/docs/rules/alphabetize.md +140 -0
- package/docs/rules/avoid-operation-name-prefix.md +3 -7
- package/docs/rules/description-style.md +4 -8
- package/docs/rules/input-name.md +5 -9
- package/docs/rules/match-document-filename.md +6 -10
- package/docs/rules/naming-convention.md +15 -19
- package/docs/rules/require-deprecation-date.md +2 -6
- package/docs/rules/require-description.md +2 -10
- package/docs/rules/require-id-when-available.md +2 -6
- package/docs/rules/selection-set-depth.md +4 -12
- package/docs/rules/strict-id-in-types.md +6 -10
- package/estree-parser/converter.d.ts +2 -3
- package/estree-parser/estree-ast.d.ts +2 -2
- package/index.js +322 -63
- package/index.mjs +322 -63
- package/package.json +1 -1
- package/rules/alphabetize.d.ts +17 -0
- package/rules/index.d.ts +7 -0
- package/testkit.d.ts +1 -1
- package/types.d.ts +1 -0
package/package.json
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
import { GraphQLESLintRule } from '../types';
|
2
|
+
declare const fieldsEnum: ("ObjectTypeDefinition" | "InterfaceTypeDefinition" | "InputObjectTypeDefinition")[];
|
3
|
+
declare const valuesEnum: "EnumTypeDefinition"[];
|
4
|
+
declare const selectionsEnum: ("OperationDefinition" | "FragmentDefinition")[];
|
5
|
+
declare const variablesEnum: "OperationDefinition"[];
|
6
|
+
declare const argumentsEnum: ("Field" | "Directive" | "FieldDefinition" | "DirectiveDefinition")[];
|
7
|
+
declare type AlphabetizeConfig = [
|
8
|
+
{
|
9
|
+
fields?: typeof fieldsEnum;
|
10
|
+
values?: typeof valuesEnum;
|
11
|
+
selections?: typeof selectionsEnum;
|
12
|
+
variables?: typeof variablesEnum;
|
13
|
+
arguments?: typeof argumentsEnum;
|
14
|
+
}
|
15
|
+
];
|
16
|
+
declare const rule: GraphQLESLintRule<AlphabetizeConfig>;
|
17
|
+
export default rule;
|
package/rules/index.d.ts
CHANGED
@@ -1,4 +1,11 @@
|
|
1
1
|
export declare const rules: {
|
2
|
+
alphabetize: import("..").GraphQLESLintRule<[{
|
3
|
+
fields?: ("ObjectTypeDefinition" | "InterfaceTypeDefinition" | "InputObjectTypeDefinition")[];
|
4
|
+
values?: "EnumTypeDefinition"[];
|
5
|
+
selections?: ("OperationDefinition" | "FragmentDefinition")[];
|
6
|
+
variables?: "OperationDefinition"[];
|
7
|
+
arguments?: ("Field" | "Directive" | "FieldDefinition" | "DirectiveDefinition")[];
|
8
|
+
}], false>;
|
2
9
|
'avoid-duplicate-fields': import("..").GraphQLESLintRule<[], false>;
|
3
10
|
'avoid-operation-name-prefix': import("..").GraphQLESLintRule<import("./avoid-operation-name-prefix").AvoidOperationNamePrefixConfig, false>;
|
4
11
|
'avoid-scalar-result-type-on-mutation': import("..").GraphQLESLintRule<any[], false>;
|
package/testkit.d.ts
CHANGED
@@ -2,7 +2,7 @@ import { RuleTester } from 'eslint';
|
|
2
2
|
import { ASTKindToNode } from 'graphql';
|
3
3
|
import { GraphQLESTreeNode } from './estree-parser';
|
4
4
|
import { GraphQLESLintRule, ParserOptions } from './types';
|
5
|
-
export declare type GraphQLESLintRuleListener<WithTypeInfo extends boolean> = {
|
5
|
+
export declare type GraphQLESLintRuleListener<WithTypeInfo extends boolean = false> = {
|
6
6
|
[K in keyof ASTKindToNode]?: (node: GraphQLESTreeNode<ASTKindToNode[K], WithTypeInfo>) => void;
|
7
7
|
} & Record<string, any>;
|
8
8
|
export declare type GraphQLValidTestCase<Options> = Omit<RuleTester.ValidTestCase, 'options' | 'parserOptions'> & {
|
package/types.d.ts
CHANGED