Skip to content
This repository has been archived by the owner on Sep 28, 2021. It is now read-only.

Update: Rethink options for naming-convention and require-description #3

Open
ilyavolodin opened this issue Jun 9, 2020 · 1 comment
Labels
change request Change to an existing rule or functionality

Comments

@ilyavolodin
Copy link
Owner

Right now, naming-convention allows for too much configuration in some cases (mostly around fields), and doesn't allow specific configuration around types (enum vs input vs type).
On the other hand, require-description only has 3 options and not very flexible. Those two should follow the same convention for configuration options.
One possibility is to allow arbitrary ASTNodes to be listed in the configuration, and provide high-level wrappers (fields, types, etc.)

@ilyavolodin ilyavolodin added the change request Change to an existing rule or functionality label Jun 9, 2020
@ilyavolodin
Copy link
Owner Author

Proposed new format:
['error', { fields: 'PascalCase', types: 'camelCase', overrides: { ASTNode: 'camelCase' } }] where:
types - will include ObjectTypeDefinition, ObjectTypeExtentons, InputObjectTypeDefinition, EnumTypeDefintion, ScalarTypeDefinition, UnionTypeDefinition, InterfaceTypeDefinition
fields - will include InputValueDefinition, FieldDefintion, VariableDeifnitions, directiveDefintion
and overrides will accept any valid GraphQL AST node name

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
change request Change to an existing rule or functionality
Projects
None yet
Development

No branches or pull requests

1 participant