eslint-plugin-relay
Advanced tools
Comparing version
@@ -17,3 +17,4 @@ /** | ||
'generated-flow-types': require('./src/rule-generated-flow-types'), | ||
'no-future-added-value': require('./src/rule-no-future-added-value'), | ||
'unused-fields': require('./src/rule-unused-fields') | ||
}; |
{ | ||
"name": "eslint-plugin-relay", | ||
"version": "0.0.24", | ||
"version": "0.0.25", | ||
"description": "ESLint plugin for Relay.", | ||
@@ -5,0 +5,0 @@ "main": "eslint-plugin-relay", |
@@ -6,8 +6,10 @@ # eslint-plugin-relay [](https://travis-ci.org/relayjs/eslint-plugin-relay) [](http://badge.fury.io/js/eslint-plugin-relay) | ||
## Install | ||
`npm i --save-dev eslint-plugin-relay` | ||
## How To Use | ||
1. Add `"relay"` to your eslint `plugins` section. | ||
2. Add the relay rules such as `"relay/graphql-syntax": "error"` to your eslint `rules` section, see the example for all rules. | ||
1. Add `"relay"` to your eslint `plugins` section. | ||
2. Add the relay rules such as `"relay/graphql-syntax": "error"` to your eslint `rules` section, see the example for all rules. | ||
Example .eslintrc.js: | ||
@@ -20,10 +22,10 @@ | ||
'relay/graphql-syntax': 'error', | ||
'relay/compat-uses-vars': 'warning', | ||
'relay/compat-uses-vars': 'warn', | ||
'relay/graphql-naming': 'error', | ||
'relay/generated-flow-types': 'warning', | ||
'relay/generated-flow-types': 'warn', | ||
'no-future-added-value': 'warn', | ||
'unused-fields': 'warn' | ||
}, | ||
plugins: [ | ||
'relay', | ||
] | ||
} | ||
plugins: ['relay'] | ||
}; | ||
``` | ||
@@ -30,0 +32,0 @@ |
41481
2.79%12
9.09%1128
3.01%38
5.56%