0.0.2 • Published 9 years ago
eslint-plugin-graphql-descriptions v0.0.2
Politely asks about adding descriptions in GraphQL
Installation
You'll first need to install ESLint:
$ yard add dev eslintNext, install eslint-plugin-graphql-descriptions:
$ yarn add dev eslint-plugin-graphql-descriptionsNote: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-graphql-descriptions globally.
Usage
Add graphql-descriptions to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"plugins": [
"graphql-descriptions"
]
}Supported Rules
- Ensure that all
GraphQLObjectTypeobjects have a description field.
// Fails
const BidderType = new GraphQLObjectType({
name: 'Bidder',
fields: () => ({}),
});
// Passes
const BidderType = new GraphQLObjectType({
name: 'Bidder',
description: 'A user with bids'
fields: () => ({}),
});0.0.2
9 years ago