Skip to content

Commit

Permalink
update components (#2258)
Browse files Browse the repository at this point in the history
* prettier

* prettier

* prettier

* add check icon

* fixes

* f
  • Loading branch information
dimaMachina authored Apr 11, 2024
1 parent 02208cc commit 807fb2d
Show file tree
Hide file tree
Showing 10 changed files with 298 additions and 270 deletions.
1 change: 1 addition & 0 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ const { plugins, ...prettierConfig } = require('@theguild/prettier-config');
module.exports = {
...prettierConfig,
plugins: [...plugins, 'prettier-plugin-tailwindcss'],
tailwindConfig: './website/tailwind.config.ts',
};
64 changes: 32 additions & 32 deletions packages/plugin/src/estree-converter/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,34 +79,34 @@ type NodeWithType =
type ParentNode<T> = T extends DocumentNode
? AST.Program
: T extends DefinitionNode
? DocumentNode
: T extends EnumValueDefinitionNode
? EnumTypeDefinitionNode | EnumTypeExtensionNode
: T extends InputValueDefinitionNode
?
| DirectiveDefinitionNode
| FieldDefinitionNode
| InputObjectTypeDefinitionNode
| InputObjectTypeExtensionNode
: T extends FieldDefinitionNode
?
| InterfaceTypeDefinitionNode
| InterfaceTypeExtensionNode
| ObjectTypeDefinitionNode
| ObjectTypeExtensionNode
: T extends SelectionSetNode
? ExecutableDefinitionNode | FieldNode | InlineFragmentNode
: T extends SelectionNode
? SelectionSetNode
: T extends TypeNode
? NodeWithType
: T extends NameNode
? NodeWithName
: T extends DirectiveNode
? InputObjectTypeDefinitionNode | ObjectTypeDefinitionNode
: T extends VariableNode
? VariableDefinitionNode
: unknown; // Explicitly show error to add new ternary with parent nodes
? DocumentNode
: T extends EnumValueDefinitionNode
? EnumTypeDefinitionNode | EnumTypeExtensionNode
: T extends InputValueDefinitionNode
?
| DirectiveDefinitionNode
| FieldDefinitionNode
| InputObjectTypeDefinitionNode
| InputObjectTypeExtensionNode
: T extends FieldDefinitionNode
?
| InterfaceTypeDefinitionNode
| InterfaceTypeExtensionNode
| ObjectTypeDefinitionNode
| ObjectTypeExtensionNode
: T extends SelectionSetNode
? ExecutableDefinitionNode | FieldNode | InlineFragmentNode
: T extends SelectionNode
? SelectionSetNode
: T extends TypeNode
? NodeWithType
: T extends NameNode
? NodeWithName
: T extends DirectiveNode
? InputObjectTypeDefinitionNode | ObjectTypeDefinitionNode
: T extends VariableNode
? VariableDefinitionNode
: unknown; // Explicitly show error to add new ternary with parent nodes

type Node<T extends ASTNode, WithTypeInfo extends boolean> =
// Remove readonly for friendly editor popup
Expand All @@ -130,7 +130,7 @@ export type GraphQLESTreeNode<T, W extends boolean = false> =
: GraphQLESTreeNode<Node<T, W>[K], W>;
}
: // If Program node => add `parent: null` field
T extends AST.Program
? T & { parent: null }
: // Return value as is
T;
T extends AST.Program
? T & { parent: null }
: // Return value as is
T;
Loading

0 comments on commit 807fb2d

Please sign in to comment.