@jimmy.codes/eslint-config 5.3.0 → 5.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import * as eslint from 'eslint';
2
- import { ESLint, Linter } from 'eslint';
2
+ import { Linter } from 'eslint';
3
3
  import * as eslint_plugin_astro from 'eslint-plugin-astro';
4
4
  import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
5
5
  import * as astro_eslint_parser from 'astro-eslint-parser';
6
+ import * as _tanstack_eslint_plugin_query from '@tanstack/eslint-plugin-query';
6
7
  import * as estree from 'estree';
7
8
  import * as eslint_plugin_react_hooks from 'eslint-plugin-react-hooks';
8
9
  import * as eslint_plugin_react_compiler from 'eslint-plugin-react-compiler';
@@ -428,11 +429,13 @@ declare function tanstackQueryConfig(): Promise<{
428
429
  files: string[];
429
430
  name: string;
430
431
  plugins: {
431
- "@tanstack/query": ESLint.Plugin;
432
+ "@tanstack/query": _tanstack_eslint_plugin_query.Plugin;
432
433
  };
433
434
  rules: {
434
435
  "@tanstack/query/exhaustive-deps": "error";
435
- "@tanstack/query/no-rest-destructuring": "warn";
436
+ "@tanstack/query/infinite-query-property-order": "error";
437
+ "@tanstack/query/no-rest-destructuring": "error";
438
+ "@tanstack/query/no-unstable-deps": "error";
436
439
  "@tanstack/query/stable-query-client": "error";
437
440
  };
438
441
  }[]>;
@@ -17765,11 +17768,13 @@ declare const defineConfig: ({ astro, autoDetect, ignores, jest, nextjs, overrid
17765
17768
  files: string[];
17766
17769
  name: string;
17767
17770
  plugins: {
17768
- "@tanstack/query": eslint.ESLint.Plugin;
17771
+ "@tanstack/query": _tanstack_eslint_plugin_query.Plugin;
17769
17772
  };
17770
17773
  rules: {
17771
17774
  "@tanstack/query/exhaustive-deps": "error";
17772
- "@tanstack/query/no-rest-destructuring": "warn";
17775
+ "@tanstack/query/infinite-query-property-order": "error";
17776
+ "@tanstack/query/no-rest-destructuring": "error";
17777
+ "@tanstack/query/no-unstable-deps": "error";
17773
17778
  "@tanstack/query/stable-query-client": "error";
17774
17779
  };
17775
17780
  } | {
package/dist/index.js CHANGED
@@ -492,22 +492,19 @@ var defineConfig = async ({
492
492
  typescript = false,
493
493
  vitest = false
494
494
  } = {}, ...moreOverrides) => {
495
- const resolveFlag = (explicit, detector) => {
495
+ const getFlag = (explicit, detector) => {
496
496
  return explicit || autoDetect && detector();
497
497
  };
498
- const isTypescriptEnabled = resolveFlag(typescript, hasTypescript);
499
- const isReactEnabled = resolveFlag(react, hasReact);
500
- const isAstroEnabled = resolveFlag(astro, hasAstro);
501
- const isTanstackQueryEnabled = resolveFlag(tanstackQuery, hasReactQuery);
502
- const isTestingLibraryEnabled = resolveFlag(
503
- testingLibrary,
504
- hasTestingLibrary
505
- );
506
- const isPlaywrightEnabled = resolveFlag(playwright, hasPlaywright);
507
- const isStorybookEnabled = resolveFlag(storybook, hasStorybook);
508
- const isNextjsEnabled = resolveFlag(nextjs, hasNext);
509
- const isJestEnabled = resolveFlag(jest, hasJest);
510
- const isVitestEnabled = resolveFlag(vitest, hasVitest);
498
+ const isTypescriptEnabled = getFlag(typescript, hasTypescript);
499
+ const isReactEnabled = getFlag(react, hasReact);
500
+ const isAstroEnabled = getFlag(astro, hasAstro);
501
+ const isTanstackQueryEnabled = getFlag(tanstackQuery, hasReactQuery);
502
+ const isTestingLibraryEnabled = getFlag(testingLibrary, hasTestingLibrary);
503
+ const isPlaywrightEnabled = getFlag(playwright, hasPlaywright);
504
+ const isStorybookEnabled = getFlag(storybook, hasStorybook);
505
+ const isNextjsEnabled = getFlag(nextjs, hasNext);
506
+ const isJestEnabled = getFlag(jest, hasJest);
507
+ const isVitestEnabled = getFlag(vitest, hasVitest);
511
508
  const baseConfigs = [
512
509
  javascriptConfig(),
513
510
  perfectionistConfig(),
@@ -521,7 +518,7 @@ var defineConfig = async ({
521
518
  const featureConfigs = await Promise.all([
522
519
  isTypescriptEnabled && unwrap(import("./typescript-IBCLQD7Q.js")),
523
520
  isReactEnabled && unwrap(import("./react-X5DWOH4Y.js")),
524
- isTanstackQueryEnabled && unwrap(import("./tanstack-query-UHBVVQ7V.js")),
521
+ isTanstackQueryEnabled && unwrap(import("./tanstack-query-P4IBOLDK.js")),
525
522
  isAstroEnabled && unwrap(import("./astro-Z5RFF624.js")),
526
523
  isJestEnabled && unwrap(import("./jest-AHG2WRSU.js")),
527
524
  isVitestEnabled && unwrap(import("./vitest-YI6KNRZE.js")),
@@ -14,14 +14,15 @@ async function tanstackQueryConfig() {
14
14
  return [
15
15
  {
16
16
  files: [GLOB_JSX, GLOB_TSX],
17
- name: "jimmy.codes/react/query",
17
+ name: "jimmy.codes/tanstack/react-query",
18
18
  plugins: {
19
- // TODO: remove unknown conversion when Plugin type is exported by @tanstack/query
20
19
  "@tanstack/query": queryPlugin
21
20
  },
22
21
  rules: {
23
22
  "@tanstack/query/exhaustive-deps": "error",
24
- "@tanstack/query/no-rest-destructuring": "warn",
23
+ "@tanstack/query/infinite-query-property-order": "error",
24
+ "@tanstack/query/no-rest-destructuring": "error",
25
+ "@tanstack/query/no-unstable-deps": "error",
25
26
  "@tanstack/query/stable-query-client": "error"
26
27
  }
27
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jimmy.codes/eslint-config",
3
- "version": "5.3.0",
3
+ "version": "5.4.0",
4
4
  "description": "A pragmatic and opinionated ESLint config for modern development.",
5
5
  "keywords": [
6
6
  "eslint",
@@ -26,7 +26,7 @@
26
26
  "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
27
27
  "@eslint/js": "^9.21.0",
28
28
  "@next/eslint-plugin-next": "^15.1.7",
29
- "@tanstack/eslint-plugin-query": "^5.66.1",
29
+ "@tanstack/eslint-plugin-query": "^5.68.0",
30
30
  "@types/eslint": "9.6.1",
31
31
  "@typescript-eslint/parser": "^8.26.1",
32
32
  "@typescript-eslint/utils": "^8.26.1",