eslint-plugin-type-graphql
v1.0.0
Published
Linter for TypeGraphQL decorators
Downloads
13,563
Readme
eslint-plugin-type-graphql
TypeGraphQL linting rules for ESLint
Installation
Install prerequisites:
npm i -D eslint @typescript-eslint/parser
Install eslint-plugin-type-graphql:
npm i -D eslint-plugin-type-graphql
Recommended configuration
Create an ESLint configuration and add the plugin rules like so:
{
"plugins": ["type-graphql"],
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:type-graphql/recommended"
],
"parser": "@typescript-eslint/parser"
}
Provided rules
- invalid-decorated-type: Find errors in types that are decorated
- invalid-decorator-type: Find errors in decorators
- invalid-nullable-input-type: Prevent errors on nullable input types
- invalid-nullable-output-type: Prevent errors on nullable output types
- missing-decorator-type: Find missing type functions in decorators
- wrong-decorator-signature: Find mismatches between decorators and decorated types
License
This plugin is licensed under the Apache 2.0 license.