@tanstack/eslint-plugin-query
Advanced tools
Comparing version 5.8.3 to 5.8.4
// src/configs.ts | ||
import { rules } from "./rules.js"; | ||
function generateRecommendedConfig(allRules) { | ||
return Object.entries(allRules).reduce((memo, [name, rule]) => { | ||
const { recommended } = rule.meta.docs || {}; | ||
return { | ||
...memo, | ||
...recommended ? { [`@tanstack/query/${name}`]: recommended } : {} | ||
}; | ||
}, {}); | ||
return Object.entries(allRules).reduce( | ||
(memo, [name, rule]) => { | ||
const { recommended } = rule.meta.docs || {}; | ||
return { | ||
...memo, | ||
...recommended ? { [`@tanstack/query/${name}`]: recommended } : {} | ||
}; | ||
}, | ||
{} | ||
); | ||
} | ||
@@ -12,0 +15,0 @@ var configs = { |
{ | ||
"name": "@tanstack/eslint-plugin-query", | ||
"version": "5.8.3", | ||
"version": "5.8.4", | ||
"description": "ESLint plugin for TanStack Query", | ||
@@ -5,0 +5,0 @@ "author": "Eliya Cohen", |
@@ -7,10 +7,13 @@ import { rules } from './rules' | ||
) { | ||
return Object.entries(allRules).reduce((memo, [name, rule]) => { | ||
const { recommended } = rule.meta.docs || {} | ||
return Object.entries(allRules).reduce( | ||
(memo, [name, rule]) => { | ||
const { recommended } = rule.meta.docs || {} | ||
return { | ||
...memo, | ||
...(recommended ? { [`@tanstack/query/${name}`]: recommended } : {}), | ||
} | ||
}, {} as Record<string, 'strict' | 'error' | 'warn'>) | ||
return { | ||
...memo, | ||
...(recommended ? { [`@tanstack/query/${name}`]: recommended } : {}), | ||
} | ||
}, | ||
{} as Record<string, 'strict' | 'error' | 'warn'>, | ||
) | ||
} | ||
@@ -17,0 +20,0 @@ |
@@ -246,4 +246,4 @@ import { AST_NODE_TYPES } from '@typescript-eslint/utils' | ||
.getScope() | ||
.references.find((ref) => ref.identifier === node)?.resolved | ||
?.defs[0]?.node | ||
.references.find((ref) => ref.identifier === node)?.resolved?.defs[0] | ||
?.node | ||
@@ -250,0 +250,0 @@ if (resolvedNode?.type !== AST_NODE_TYPES.VariableDeclarator) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
375628
5763