Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/borremosch/eslint-plugin-type-graphql
Linter for TypeGraphQL decorators
https://github.com/borremosch/eslint-plugin-type-graphql
Last synced: 3 months ago
JSON representation
Linter for TypeGraphQL decorators
- Host: GitHub
- URL: https://github.com/borremosch/eslint-plugin-type-graphql
- Owner: borremosch
- License: apache-2.0
- Created: 2020-10-07T19:51:19.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-26T07:46:58.000Z (over 2 years ago)
- Last Synced: 2024-07-03T06:15:25.652Z (4 months ago)
- Language: TypeScript
- Size: 248 KB
- Stars: 17
- Watchers: 3
- Forks: 3
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-eslint - TypeGraphQL - Linting rules for TypeGraphQL, targeted at finding common mistakes. (Plugins / Libraries)
README
[![npm version](https://badge.fury.io/js/eslint-plugin-type-graphql.svg)](https://badge.fury.io/js/eslint-plugin-type-graphql)
![build](https://github.com/borremosch/eslint-plugin-type-graphql/workflows/Node.js%20CI/badge.svg)
[![codecov](https://codecov.io/gh/borremosch/eslint-plugin-type-graphql/branch/main/graph/badge.svg)](https://codecov.io/gh/borremosch/eslint-plugin-type-graphql)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
![language](https://img.shields.io/github/languages/top/borremosch/eslint-plugin-type-graphql)# eslint-plugin-type-graphql
TypeGraphQL linting rules for ESLint
## Installation
Install prerequisites:
```bash
npm i -D eslint @typescript-eslint/parser
```Install eslint-plugin-type-graphql:
```bash
npm i -D eslint-plugin-type-graphql
```## Recommended configuration
Create an ESLint configuration and add the plugin rules like so:
```json
{
"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](docs/rules/invalid-decorated-type.md): Find errors in types that are decorated
- [invalid-decorator-type](docs/rules/invalid-decorator-type.md): Find errors in decorators
- [invalid-nullable-input-type](docs/rules/invalid-nullable-input-type.md): Prevent errors on nullable input types
- [invalid-nullable-output-type](docs/rules/invalid-nullable-output-type.md): Prevent errors on nullable output types
- [missing-decorator-type](docs/rules/missing-decorator-type.md): Find missing type functions in decorators
- [wrong-decorator-signature](docs/rules/wrong-decorator-signature.md): Find mismatches between decorators and decorated types## License
This plugin is licensed under the [Apache 2.0 license](https://opensource.org/licenses/Apache-2.0).