ESLint plugin for Relay, version 2.0.0, released under MIT license. It provides lint rules to catch common problems in Relay code, such as invalid GraphQL syntax, naming convention violations, missing colocated fragment spreads, and unused fields. The plugin ships with recommended and strict configurations, and supports suppression of certain rules within graphql tagged templates. Key differentiators: it provides faster feedback than the Relay Compiler for syntax and naming issues, and includes rules like `must-colocate-fragment-spreads` that enforce best practices for data fetching. It is actively maintained by the Relay team.
npm install eslint-plugin-relayVerified import paths — ran on the pinned version, not inferred.
Installs and configures eslint-plugin-relay with all core rules enabled to catch common Relay code issues.
Consider disabling this rule if your project uses non-unique module names or relative imports.
No fix needed; rule still works, but you can rely on Relay Compiler for syntax validation.
Use `eslint-disable-next-line` comment before the line you want to suppress, not inline.
Run `npm i --save-dev eslint-plugin-relay` and ensure it is listed in your package.json.
Use 'error' correctly: `'relay/graphql-syntax': 'error'`.