0.0.4 • Published 8 months ago

@kejistan/eslint-plugin-relay v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

eslint-plugin-relay

Additional eslint rules about relay best practices

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install @kejistan/eslint-plugin-relay:

npm install @kejistan/eslint-plugin-relay --save-dev

Usage

Add @kejistan/relay to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
  "plugins": ["@kejistan/relay"]
}

Then configure the rules you want to use under the rules section.

{
  "rules": {
    "@kejistan/relay/check-generic-annotations": "error",
    "@kejistan/relay/no-external-imports": "error"
  }
}

Supported Rules

  • check-generic-annotations Check that functions which require generic annotations are specifying the right generated type
  • no-external-imports Forbid imports of relay code generated by other files