🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

eslint-plugin-relay

Package Overview
Dependencies
Maintainers
4
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-relay - npm Package Compare versions

Comparing version

to
1.2.0

2

package.json
{
"name": "eslint-plugin-relay",
"version": "1.1.0",
"version": "1.2.0",
"description": "ESLint plugin for Relay.",

@@ -5,0 +5,0 @@ "main": "eslint-plugin-relay",

@@ -70,6 +70,11 @@ /**

switch (field) {
case 'pageInfo':
case 'page_info':
case 'hasNextPage':
case 'has_next_page':
case 'hasPreviousPage':
case 'has_previous_page':
case 'startCursor':
case 'start_cursor':
case 'endCursor':
case 'end_cursor':

@@ -134,3 +139,9 @@ return true;

for (const field in queriedFields) {
if (!foundMemberAccesses[field] && !isPageInfoField(field)) {
if (
!foundMemberAccesses[field] &&
!isPageInfoField(field) &&
// Do not warn for unused __typename which can be a workaround
// when only interested in existence of an object.
field !== '__typename'
) {
context.report({

@@ -143,3 +154,5 @@ node: templateLiteral,

'information that file should export a fragment and colocate ' +
'the query for the data with the usage.'
'the query for the data with the usage.\n' +
'If only interested in the existence of a record, __typename ' +
'can be used without this warning.'
});

@@ -146,0 +159,0 @@ }