1.0.1 • Published 6 months ago
@kejistan/eslint-plugin-relay v1.0.1
eslint-plugin-relay
Additional eslint rules about relay best practices
Installation
You'll first need to install ESLint:
npm i eslint --save-devNext, install @kejistan/eslint-plugin-relay:
npm install @kejistan/eslint-plugin-relay --save-devUsage
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