@jimmy.codes/eslint-config 5.2.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
  }[]>;
@@ -16012,8 +16015,15 @@ declare const defineConfig: ({ astro, autoDetect, ignores, jest, nextjs, overrid
16012
16015
  };
16013
16016
  };
16014
16017
  rules: {
16018
+ "n/handle-callback-err": ["error", string];
16019
+ "n/no-deprecated-api": "error";
16020
+ "n/no-exports-assign": "error";
16021
+ "n/no-new-require": "error";
16022
+ "n/no-path-concat": "error";
16015
16023
  "n/no-process-exit": "off";
16024
+ "n/prefer-global/console": ["error", "always"];
16016
16025
  "n/prefer-node-protocol": "error";
16026
+ "n/process-exit-as-throw": "error";
16017
16027
  };
16018
16028
  } | {
16019
16029
  name: string;
@@ -17758,11 +17768,13 @@ declare const defineConfig: ({ astro, autoDetect, ignores, jest, nextjs, overrid
17758
17768
  files: string[];
17759
17769
  name: string;
17760
17770
  plugins: {
17761
- "@tanstack/query": eslint.ESLint.Plugin;
17771
+ "@tanstack/query": _tanstack_eslint_plugin_query.Plugin;
17762
17772
  };
17763
17773
  rules: {
17764
17774
  "@tanstack/query/exhaustive-deps": "error";
17765
- "@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";
17766
17778
  "@tanstack/query/stable-query-client": "error";
17767
17779
  };
17768
17780
  } | {
package/dist/index.js CHANGED
@@ -298,9 +298,16 @@ import nodePlugin2 from "eslint-plugin-n";
298
298
 
299
299
  // src/rules/node.ts
300
300
  var nodeRules = {
301
+ "n/handle-callback-err": ["error", "^(err|error)$"],
302
+ "n/no-deprecated-api": "error",
303
+ "n/no-exports-assign": "error",
304
+ "n/no-new-require": "error",
305
+ "n/no-path-concat": "error",
301
306
  "n/no-process-exit": "off",
302
307
  // TODO [2025-12-31]: enable this rule
303
- "n/prefer-node-protocol": "error"
308
+ "n/prefer-global/console": ["error", "always"],
309
+ "n/prefer-node-protocol": "error",
310
+ "n/process-exit-as-throw": "error"
304
311
  };
305
312
 
306
313
  // src/configs/node.ts
@@ -485,22 +492,19 @@ var defineConfig = async ({
485
492
  typescript = false,
486
493
  vitest = false
487
494
  } = {}, ...moreOverrides) => {
488
- const resolveFlag = (explicit, detector) => {
495
+ const getFlag = (explicit, detector) => {
489
496
  return explicit || autoDetect && detector();
490
497
  };
491
- const isTypescriptEnabled = resolveFlag(typescript, hasTypescript);
492
- const isReactEnabled = resolveFlag(react, hasReact);
493
- const isAstroEnabled = resolveFlag(astro, hasAstro);
494
- const isTanstackQueryEnabled = resolveFlag(tanstackQuery, hasReactQuery);
495
- const isTestingLibraryEnabled = resolveFlag(
496
- testingLibrary,
497
- hasTestingLibrary
498
- );
499
- const isPlaywrightEnabled = resolveFlag(playwright, hasPlaywright);
500
- const isStorybookEnabled = resolveFlag(storybook, hasStorybook);
501
- const isNextjsEnabled = resolveFlag(nextjs, hasNext);
502
- const isJestEnabled = resolveFlag(jest, hasJest);
503
- 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);
504
508
  const baseConfigs = [
505
509
  javascriptConfig(),
506
510
  perfectionistConfig(),
@@ -514,7 +518,7 @@ var defineConfig = async ({
514
518
  const featureConfigs = await Promise.all([
515
519
  isTypescriptEnabled && unwrap(import("./typescript-IBCLQD7Q.js")),
516
520
  isReactEnabled && unwrap(import("./react-X5DWOH4Y.js")),
517
- isTanstackQueryEnabled && unwrap(import("./tanstack-query-UHBVVQ7V.js")),
521
+ isTanstackQueryEnabled && unwrap(import("./tanstack-query-P4IBOLDK.js")),
518
522
  isAstroEnabled && unwrap(import("./astro-Z5RFF624.js")),
519
523
  isJestEnabled && unwrap(import("./jest-AHG2WRSU.js")),
520
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.2.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",
@@ -40,7 +40,7 @@
40
40
  "eslint-plugin-jest-dom": "^5.5.0",
41
41
  "eslint-plugin-jsdoc": "^50.6.8",
42
42
  "eslint-plugin-jsx-a11y": "^6.10.2",
43
- "eslint-plugin-n": "^17.15.1",
43
+ "eslint-plugin-n": "^17.16.2",
44
44
  "eslint-plugin-perfectionist": "^4.9.0",
45
45
  "eslint-plugin-playwright": "^2.2.0",
46
46
  "eslint-plugin-react": "^7.37.4",